Revert "Actually use the XML catalog from org/xmlresolver/catalog.xml"

This reverts commit d200c5d276948933cc31e678c71e7c2d3b4bd135.
diff --git a/lib/dtds/xhtml/dtd/xhtml-lat1.ent b/lib/dtds/xhtml/dtd/xhtml-lat1.ent
new file mode 100644
index 0000000..ffee223
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+    <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+    %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign = angled dash,
+                                  U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
diff --git a/lib/dtds/xhtml/dtd/xhtml-special.ent b/lib/dtds/xhtml/dtd/xhtml-special.ent
new file mode 100644
index 0000000..ca358b2
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLspecial PUBLIC
+        "-//W3C//ENTITIES Special for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+     %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
+<!ENTITY apos	 "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
+                                    U+02C6 ISOpub -->
+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
+                                    U+200C NEW RFC 2070 -->
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
+                                    U+2018 ISOnum -->
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
+                                    U+2019 ISOnum -->
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
+                                    U+201C ISOnum -->
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
+                                    U+201D ISOnum -->
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
+                                    U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
+                                    U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
diff --git a/lib/dtds/xhtml/dtd/xhtml-symbol.ent b/lib/dtds/xhtml/dtd/xhtml-symbol.ent
new file mode 100644
index 0000000..63c2abf
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLsymbol PUBLIC
+        "-//W3C//ENTITIES Symbols for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+     %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function
+                                    = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+                                    U+03D1 NEW -->
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
+                                    U+03D2 NEW -->
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so rArr can be used for 'implies'
+     as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/lib/dtds/xhtml/dtd/xhtml.soc b/lib/dtds/xhtml/dtd/xhtml.soc
new file mode 100644
index 0000000..0624dea
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml.soc
@@ -0,0 +1,14 @@
+OVERRIDE	YES
+        -- Oasis entity catalog for Extensible HTML 1.0 --
+
+PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN"        "xhtml1-strict.dtd"
+PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN"  "xhtml1-transitional.dtd"
+PUBLIC  "-//W3C//DTD XHTML 1.0 Frameset//EN"      "xhtml1-frameset.dtd"
+
+        -- ISO latin 1 entity set for Extensible HTML (XML 1.0 format) --
+
+PUBLIC	"-//W3C//ENTITIES Latin 1 for XHTML//EN"  "xhtml-lat1.ent"
+PUBLIC	"-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent"
+PUBLIC	"-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent"
+
+SGMLDECL "xhtml1.dcl"
diff --git a/lib/dtds/xhtml/dtd/xhtml1-frameset.dtd b/lib/dtds/xhtml/dtd/xhtml1-frameset.dtd
new file mode 100644
index 0000000..6a6df55
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml1-frameset.dtd
@@ -0,0 +1,1213 @@
+<!--

+   Extensible HTML version 1.0 Frameset DTD

+

+   This is the same as HTML 4 Frameset except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"

+

+   $Revision: 1.26 $

+   $Date: 2002/08/01 18:16:48 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+     <!-- media type, as per [RFC2045] -->

+<!ENTITY % ContentType "CDATA">

+

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+<!ENTITY % ContentTypes "CDATA">

+

+    <!-- a character encoding, as per [RFC2045] -->

+<!ENTITY % Charset "CDATA">

+

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+<!ENTITY % Charsets "CDATA">

+

+    <!-- a language code, as per [RFC3066] -->

+<!ENTITY % LanguageCode "NMTOKEN">

+

+    <!-- a single character, as per section 2.2 of [XML] -->

+<!ENTITY % Character "CDATA">

+

+    <!-- one or more digits -->

+<!ENTITY % Number "CDATA">

+

+    <!-- space-separated list of link types -->

+<!ENTITY % LinkTypes "CDATA">

+

+    <!-- single or comma-separated list of media descriptors -->

+<!ENTITY % MediaDesc "CDATA">

+

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+<!ENTITY % URI "CDATA">

+

+    <!-- a space separated list of Uniform Resource Identifiers -->

+<!ENTITY % UriList "CDATA">

+

+    <!-- date and time information. ISO date format -->

+<!ENTITY % Datetime "CDATA">

+

+    <!-- script expression -->

+<!ENTITY % Script "CDATA">

+

+    <!-- style sheet data -->

+<!ENTITY % StyleSheet "CDATA">

+

+    <!-- used for titles etc. -->

+<!ENTITY % Text "CDATA">

+

+    <!-- render in this frame -->

+<!ENTITY % FrameTarget "NMTOKEN">

+

+    <!-- nn for pixels or nn% for percentage length -->

+<!ENTITY % Length "CDATA">

+

+    <!-- pixel, percentage, or relative -->

+<!ENTITY % MultiLength "CDATA">

+

+    <!-- comma-separated list of MultiLength -->

+<!ENTITY % MultiLengths "CDATA">

+

+    <!-- integer representing length in pixels -->

+<!ENTITY % Pixels "CDATA">

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+    <!-- comma separated list of lengths -->

+<!ENTITY % Coords "CDATA">

+

+<!-- used for object, applet, img, input and iframe -->

+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">

+

+<!-- a color using sRGB: #RRGGBB as Hex values -->

+<!ENTITY % Color "CDATA">

+

+<!-- There are also 16 widely known color names with their sRGB values:

+

+    Black  = #000000    Green  = #008000

+    Silver = #C0C0C0    Lime   = #00FF00

+    Gray   = #808080    Olive  = #808000

+    White  = #FFFFFF    Yellow = #FFFF00

+    Maroon = #800000    Navy   = #000080

+    Red    = #FF0000    Blue   = #0000FF

+    Purple = #800080    Teal   = #008080

+    Fuchsia= #FF00FF    Aqua   = #00FFFF

+-->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!-- text alignment for p, div, h1-h6. The default is

+     align="left" for ltr headings, "right" for rtl -->

+

+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.extra

+   "object | applet | img | map | iframe">

+	

+<!ENTITY % special.basic

+	"br | span | bdo">

+

+<!ENTITY % special

+   "%special.basic; | %special.extra;">

+

+<!ENTITY % fontstyle.extra "big | small | font | basefont">

+

+<!ENTITY % fontstyle.basic "tt | i | b | u

+                      | s | strike ">

+

+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">

+

+<!ENTITY % phrase.extra "sub | sup">

+<!ENTITY % phrase.basic "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym">

+

+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl | menu | dir">

+<!ENTITY % blocktext "pre | hr | blockquote | address | center">

+

+<!ENTITY % block

+    "p | %heading; | div | %lists; | %blocktext; | isindex | fieldset | table">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding img, object, applet, big, small,

+     sub, sup, font, or basefont -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |

+	   %inline.forms; | %misc.inline;)*">

+

+

+<!-- form uses %Flow; excluding form -->

+

+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+      table | br | span | bdo | object | applet | img | map |

+      %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+<!--doc:This element identifies the document to be XHTML. The remainder of the XHTML document is contained by this element.-->

+<!ELEMENT html (head, frameset)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">

+

+<!--doc:The HEAD element contains information about the current document,for example the title and the list of keywords that may be used by the search engines.-->

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!--doc:The TITLE element is not considered part of the flow of text. It is displayed as the page header or window title.-->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+<!--doc:The BASE element allows authors to specify a document's base URI explicitly. The path information specified by the BASE element only affects relative URIs from the same document.-->

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  id          ID             #IMPLIED

+  href        %URI;          #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The META element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.). The specification does not define a normative set of properties.-->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--doc:This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times. Although LINK has no content, it conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links).-->

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The STYLE element allows authors to put style sheet rules in the head of the document. XHTML permits any number of STYLE elements in the HEAD section of a document. Some style sheet implementations may allow a wider variety of rules in the STYLE element than in the style attribute. For example, with CSS, rules may be declared within a STYLE element.-->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!--doc:The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an XHTML document.-->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  language    CDATA          #IMPLIED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!--doc:The NOSCRIPT element allows authors to provide alternate content when a script is not executed. The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases: 1. The user agent is configured not to evaluate scripts; 2The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document.-->

+<!ELEMENT noscript %Flow;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--======================= Frames =======================================-->

+

+<!--doc:An HTML document that describes frame layout (called a frameset document) has a different makeup than an HTML document without frames. A standard document has one HEAD section and one BODY. A frameset document has a HEAD, and a FRAMESET in place of the BODY.-->

+<!ELEMENT frameset (frameset|frame|noframes)*>

+<!ATTLIST frameset

+  %coreattrs;

+  rows        %MultiLengths; #IMPLIED

+  cols        %MultiLengths; #IMPLIED

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  >

+

+<!-- reserved frame names start with "_" otherwise starts with letter -->

+

+<!--doc:The FRAME element defines the contents and appearance of a single frame.-->

+<!ELEMENT frame EMPTY>

+<!ATTLIST frame

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  noresize    (noresize)     #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  >

+

+<!--doc:The IFRAME element allows authors to insert a frame within a block of text. Inserting an inline frame within a section of text is much like inserting an object via the OBJECT element: they both allow you to insert an XHTML document in the middle of another, they may both be aligned with surrounding text, etc.-->

+<!ELEMENT iframe %Flow;>

+<!ATTLIST iframe

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  align       %ImgAlign;     #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!--doc:The NOFRAMES element specifies content that should be displayed only by user agents that do not support frames or are configured not to display frames. User agents that support frames must only display the contents of a NOFRAMES declaration when configured not to display frames. User agents that do not support frames must display the contents of NOFRAMES in any case.-->

+<!ELEMENT noframes (body)>

+<!ATTLIST noframes

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+<!--doc:The body of a document contains the document's content. The content may be presented by a user agent in a variety of ways. For example, for visual browsers, you can think of the body as a canvas where the content appears: text, images, colors, graphics, etc.-->

+<!ELEMENT body %Flow;>

+<!ATTLIST body

+  %attrs;

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  background  %URI;          #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  text        %Color;        #IMPLIED

+  link        %Color;        #IMPLIED

+  vlink       %Color;        #IMPLIED

+  alink       %Color;        #IMPLIED

+  >

+

+<!--doc:The DIV element defines a division/section in a document. It offer a generic mechanism for adding structure to documents. This element define content to be block-level but impose no other presentational idioms on the content.-->

+<!ELEMENT div %Flow;>  

+<!ATTLIST div

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Paragraphs =======================================-->

+<!--doc:The P element represents a paragraph. It cannot contain block-level elements (including P itself).-->

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Headings =========================================-->

+

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Lists ============================================-->

+

+<!-- Unordered list bullet styles -->

+

+<!ENTITY % ULStyle "(disc|square|circle)">

+

+<!--doc:The UL element defines an unordered list. Unordered list items are not numbered.-->

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  type        %ULStyle;     #IMPLIED

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- Ordered list numbering style

+

+    1   arabic numbers      1, 2, 3, ...

+    a   lower alpha         a, b, c, ...

+    A   upper alpha         A, B, C, ...

+    i   lower roman         i, ii, iii, ...

+    I   upper roman         I, II, III, ...

+

+    The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list.

+-->

+<!ENTITY % OLStyle "CDATA">

+

+<!--doc:The OL element defines an ordered list. Ordered list items are numbered.-->

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  type        %OLStyle;      #IMPLIED

+  compact     (compact)      #IMPLIED

+  start       %Number;       #IMPLIED

+  >

+

+<!--doc:The MENU element was designed to be used for single column menu lists. (DEPRECATED)-->

+<!ELEMENT menu (li)+>

+<!ATTLIST menu

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!--doc:The DIR element was designed to be used for creating multicolumn directory lists. (DEPRECATED)-->

+<!ELEMENT dir (li)+>

+<!ATTLIST dir

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->

+<!ENTITY % LIStyle "CDATA">

+

+<!--doc:The LI element is used to define a list item. The LI element is used in ordered (OL) and unordered lists (UL).-->

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  type        %LIStyle;      #IMPLIED

+  value       %Number;       #IMPLIED

+  >

+

+<!--doc:The DL element is used to define a definition list. They consist consist of two parts for each item: a term (DT) and a description (DD).-->

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  compact     (compact)      #IMPLIED

+  >

+

+<!--doc:The DT element defines a term in a definition list.-->

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!--doc:The DD element defines the description of a term in a definition list.-->

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!--doc:The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document.-->

+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+

+<!--doc:The HR element causes a horizontal rule to be rendered by visual user agents.-->

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  align       (left|center|right) #IMPLIED

+  noshade     (noshade)      #IMPLIED

+  size        %Pixels;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!--doc:The PRE element defines blocks of preformatted text. The text enclosed in the pre element preserves spaces and line breaks and is rendered in a fixed-pitch font.-->

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  width       %Number;      #IMPLIED

+  xml:space   (preserve)    #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+

+<!--doc:The BLOCKQUOTE element defines the start of a long quotation (block-level content) . It creates white space on both sides of the text.-->

+<!ELEMENT blockquote %Flow;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Text alignment ===================================-->

+

+<!--doc:The CENTER element is exactly equivalent to specifying the DIV element with the align attribute set to "center". The CENTER element is deprecated.-->

+<!ELEMENT center %Flow;>

+<!ATTLIST center

+  %attrs;

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+

+<!--doc:INS is used to markup sections of the document that have been inserted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--doc:DEL is used to markup sections of the document that have been deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+<!--doc:The A element defines an anchor element. An anchor can be used: 1.To create a link to another document by using the href attribute; 2.To create a bookmark inside a document by using the name or id attribute.-->

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!--doc:The SPAN element is used to group inline-elements in a document. Use the SPAN element to group inline-elements to format them with styles.-->

+<!ELEMENT span %Inline;> 

+<!ATTLIST span

+  %attrs;

+  >

+

+<!--doc:The BDO element overrides the default text direction. It should be used in scenarios where absolute control over sequence order is required (e.g., multi-language part numbers).-->

+<!ELEMENT bdo %Inline;>  

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!--doc:The BR element forcibly breaks (ends) the current line of text. Use the BR element to enter blank lines, not to separate paragraphs.-->

+<!ELEMENT br EMPTY>   

+<!ATTLIST br

+  %coreattrs;

+  clear       (left|all|right|none) "none"

+  >

+

+<!--doc:Renders as emphasized text. Generally, visual user agents present EM text in italics.-->

+<!ELEMENT em %Inline;>   

+<!ATTLIST em %attrs;>

+

+<!--doc:Renders as strong emphasized text. Generally, visual user agents present STRONG text in bold font.-->

+<!ELEMENT strong %Inline;>   

+<!ATTLIST strong %attrs;>

+

+<!--doc:Indicates that this is the defining instance of the enclosed term.-->

+<!ELEMENT dfn %Inline;>   

+<!ATTLIST dfn %attrs;>

+

+<!--doc:Designates a fragment of computer code.-->

+<!ELEMENT code %Inline;>   

+<!ATTLIST code %attrs;>

+

+<!--doc:Designates sample output from programs, scripts, etc.-->

+<!ELEMENT samp %Inline;>   

+<!ATTLIST samp %attrs;>

+

+<!--doc:Indicates text to be entered by the user.-->

+<!ELEMENT kbd %Inline;>  

+<!ATTLIST kbd %attrs;>

+

+<!--doc:Indicates an instance of a variable or program argument.-->

+<!ELEMENT var %Inline;>   

+<!ATTLIST var %attrs;>

+

+<!--doc:Contains a citation or a reference to other sources.-->

+<!ELEMENT cite %Inline;>   

+<!ATTLIST cite %attrs;>

+

+<!--doc:The ABBR element is used to indicates an abbreviated form, like "ie.", "Ltd.", "etc.".-->

+<!ELEMENT abbr %Inline;>   

+<!ATTLIST abbr %attrs;>

+

+<!--doc:The ACRONYM element defines an acronym, like "USA" or "F.B.I".-->

+<!ELEMENT acronym %Inline;>   

+<!ATTLIST acronym %attrs;>

+

+<!--doc:The Q element defines the start of a short quotation. It does not render as anything special, you have to use styles to format the text.-->

+<!ELEMENT q %Inline;>   

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--doc:The SUB element defines subscript text.-->

+<!ELEMENT sub %Inline;> 

+<!ATTLIST sub %attrs;>

+

+<!--doc:The SUP element defines superscript text.-->

+<!ELEMENT sup %Inline;> 

+<!ATTLIST sup %attrs;>

+

+<!--doc:Renders as teletype or mono spaced text.-->

+<!ELEMENT tt %Inline;>   

+<!ATTLIST tt %attrs;>

+

+<!--doc:Renders as italic text style.-->

+<!ELEMENT i %Inline;>   

+<!ATTLIST i %attrs;>

+

+<!--doc:Renders as bold text style.-->

+<!ELEMENT b %Inline;>   

+<!ATTLIST b %attrs;>

+

+<!--doc:Renders text in a "large" font.-->

+<!ELEMENT big %Inline;>   

+<!ATTLIST big %attrs;>

+

+<!--doc:Renders text in a "small" font.-->

+<!ELEMENT small %Inline;>   

+<!ATTLIST small %attrs;>

+

+<!--doc:Renders underlined style text. (DEPRECATED)-->

+<!ELEMENT u %Inline;>   

+<!ATTLIST u %attrs;>

+

+<!--doc:Render strike-through style text.-->

+<!ELEMENT s %Inline;>   

+<!ATTLIST s %attrs;>

+

+<!--doc:Render strike-through style text.-->

+<!ELEMENT strike %Inline;>   

+<!ATTLIST strike %attrs;>

+

+<!--doc:The BASEFONT element sets the base font size (using the size attribute). Font size changes achieved with FONT are relative to the base font size set by BASEFONT. If BASEFONT is not used, the default base font size is 3.-->

+<!ELEMENT basefont EMPTY>  

+<!ATTLIST basefont

+  id          ID             #IMPLIED

+  size        CDATA          #REQUIRED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--doc:The FONT element changes the font size and color for text in its contents.-->

+<!ELEMENT font %Inline;> 

+<!ATTLIST font

+  %coreattrs;

+  %i18n;

+  size        CDATA          #IMPLIED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--==================== Object ======================================-->

+<!--doc:Defines an embedded object. This element allows to specify the data and parameters for objects inserted into documents.-->

+<!ELEMENT object (#PCDATA | param | %block; | form |%inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--doc:PARAM elements specify a set of values that may be required by an object at run-time. Any number of PARAM elements may appear in the content of an OBJECT or APPLET element, in any order, but must be placed at the start of the content of the enclosing OBJECT or APPLET element.-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #REQUIRED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--doc:This element, supported by all Java-enabled browsers, allows designers to embed a Java applet in an XHTML document. It has been deprecated in favor of the OBJECT element.-->

+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST applet

+  %coreattrs;

+  codebase    %URI;          #IMPLIED

+  archive     CDATA          #IMPLIED

+  code        CDATA          #IMPLIED

+  object      CDATA          #IMPLIED

+  alt         %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  width       %Length;       #REQUIRED

+  height      %Length;       #REQUIRED

+  align       %ImgAlign;     #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+<!--doc:The IMG element embeds an image in the current document at the location of the element's definition. The IMG element has no content; it is usually replaced inline by the image designated by the src attribute, the exception being for left or right-aligned images that are "floated" out of line. Note that in this DTD there is no name attribute. That is only available in the transitional and frameset DTD.-->

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  name        NMTOKEN        #IMPLIED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document

+  or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+<!-- These can be placed in the same document or grouped in a

+     separate document although this isn't yet widely supported -->

+<!--doc:The MAP element specifies a client-side image map (or other navigation mechanism) that may be associated with another elements (IMG, OBJECT, or INPUT). An image map is associated with an element via the element's usemap attribute. The MAP element may be used without an associated image for general navigation mechanisms.-->

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  >

+  

+<!--doc:Defines a region in an image map. This element is always nested inside a MAP element. This element has no content but specify the geometric region of the image map and the link associated with the region. Note that user agents do not generally render AREA elements. Therefore, authors must provide alternate text for each AREA with the alt attribute.-->

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--================ Forms ===============================================-->

+

+<!--doc:The FORM element creates a form. A form can contain textfields, checkboxes, radio-buttons etc. Forms are used to pass user-data to a specified URL, usually a CGI.-->

+<!ELEMENT form %form.content;>   

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  name        NMTOKEN        #IMPLIED

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The LABEL element may be used to attach information to controls. Each LABEL element is associated with exactly one form control. The "for" attribute binds a label to another element. Set the value of the "for" attribute equal to the value of the "id" attribute of the related element.-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+

+

+<!--doc:The INPUT element defines the start of an input field where the user can enter data. The INPUT element is empty, it contains attributes only.-->

+<!ELEMENT input EMPTY>     

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  >

+

+<!--doc:The select element creates a drop-down list. Use this element in the FORM element to accept user input.-->

+<!ELEMENT select (optgroup|option)+>  

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The OPTGROUP element allows authors to group choices logically. This is particularly helpful when the user must choose from a long list of options; groups of related choices are easier to grasp and remember than a single long list of options.-->

+<!ELEMENT optgroup (option)+>   

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!--doc:The option element defines an option in the drop-down list. Use this element in conjunction with the SELECT element, elsewhere it is meaningless.-->

+<!ELEMENT option (#PCDATA)>     

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!--doc:The TEXTAREA element creates a multi-line text input control. User agents should use the contents of this element as the initial value of the control and should render this text initially.-->

+<!ELEMENT textarea (#PCDATA)>     

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The FIELDSET element allows authors to group thematically related controls and labels. Grouping controls makes it easier for users to understand their purpose while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible.-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!ENTITY % LAlign "(top|bottom|left|right)">

+

+<!--doc:The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually.-->

+<!ELEMENT legend %Inline;>     

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  align       %LAlign;       #IMPLIED

+  >

+

+<!--

+Content is %Flow; excluding a, form, form controls, iframe

+--> 

+<!--doc:The BUTTON element defines a push button. Inside a button element you can put content for example images, text.-->

+<!ELEMENT button %button.content;>  

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!--doc:This element creates a single-line text input control. Authors should use the INPUT element to create text input controls. (DEPRECATED)-->

+<!ELEMENT isindex EMPTY>

+<!ATTLIST isindex

+  %coreattrs;

+  %i18n;

+  prompt      %Text;         #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the table. 

+ The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around the table should be rendered. 

+ The values are not the same as CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal placement of table relative to document -->

+<!ENTITY % TAlign "(left|center|right)">

+

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=":"

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+

+<!--doc:The TABLE element defines a table. Inside a TABLE element there can be table headers, table rows, table cells.-->

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!--doc:The CAPTION element defines a table caption.-->

+<!ELEMENT caption  %Inline;>

+<!--doc:Defines a table header. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT thead    (tr)+>

+<!--doc:Defines a table footer. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tfoot    (tr)+>

+<!--doc:Defines a table body. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tbody    (tr)+>

+<!--doc:Defines different formatting groups of table columns. The colgroup element is an empty element that contains attributes only. To create columns, you must specify td elements within a tr element.-->

+<!ELEMENT colgroup (col)*>

+<!--doc:The COL element allows authors to group together attribute specifications for table columns. The COL does not group columns together structurally that is the role of the COLGROUP element. COL elements are empty and serve only as a support for attributes. They may appear inside or outside an explicit column group (i.e., COLGROUP element).-->

+<!ELEMENT col      EMPTY>

+<!--doc:The TR elements acts as a container for a row of table cells.-->

+<!ELEMENT tr       (th|td)+>

+<!--doc:The TH element defines a cell in a table that contains header information. User agents have two pieces of header information available: the contents of the TH element and the value of the abbr attribute.-->

+<!ELEMENT th       %Flow;>

+<!--doc:The TD element defines a cell in a table that contains data.-->

+<!ELEMENT td       %Flow;>

+

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  align       %TAlign;       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!ENTITY % CAlign "(top|bottom|left|right)">

+

+<!ATTLIST caption

+  %attrs;

+  align       %CAlign;       #IMPLIED

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Pixels;       #IMPLIED

+  height      %Pixels;       #IMPLIED

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Pixels;       #IMPLIED

+  height      %Pixels;       #IMPLIED

+  >

+

diff --git a/lib/dtds/xhtml/dtd/xhtml1-strict.dtd b/lib/dtds/xhtml/dtd/xhtml1-strict.dtd
new file mode 100644
index 0000000..c06e419
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml1-strict.dtd
@@ -0,0 +1,966 @@
+<!--

+   Extensible HTML version 1.0 Strict DTD

+

+   This is the same as HTML 4 Strict except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

+

+   $Revision: 1.24 $

+   $Date: 2002/07/31 19:34:51 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+

+<!ENTITY % ContentType "CDATA">

+    <!-- media type, as per [RFC2045] -->

+

+<!ENTITY % ContentTypes "CDATA">

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+

+<!ENTITY % Charset "CDATA">

+    <!-- a character encoding, as per [RFC2045] -->

+

+<!ENTITY % Charsets "CDATA">

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+

+<!ENTITY % LanguageCode "NMTOKEN">

+    <!-- a language code, as per [RFC3066] -->

+

+<!ENTITY % Character "CDATA">

+    <!-- a single character, as per section 2.2 of [XML] -->

+

+<!ENTITY % Number "CDATA">

+    <!-- one or more digits -->

+

+<!ENTITY % LinkTypes "CDATA">

+    <!-- space-separated list of link types -->

+

+<!ENTITY % MediaDesc "CDATA">

+    <!-- single or comma-separated list of media descriptors -->

+

+<!ENTITY % URI "CDATA">

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+

+<!ENTITY % UriList "CDATA">

+    <!-- a space separated list of Uniform Resource Identifiers -->

+

+<!ENTITY % Datetime "CDATA">

+    <!-- date and time information. ISO date format -->

+

+<!ENTITY % Script "CDATA">

+    <!-- script expression -->

+

+<!ENTITY % StyleSheet "CDATA">

+    <!-- style sheet data -->

+

+<!ENTITY % Text "CDATA">

+    <!-- used for titles etc. -->

+

+<!ENTITY % Length "CDATA">

+    <!-- nn for pixels or nn% for percentage length -->

+

+<!ENTITY % MultiLength "CDATA">

+    <!-- pixel, percentage, or relative -->

+

+<!ENTITY % Pixels "CDATA">

+    <!-- integer representing length in pixels -->

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+<!ENTITY % Coords "CDATA">

+    <!-- comma separated list of lengths -->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.pre

+   "br | span | bdo | map">

+

+

+<!ENTITY % special

+   "%special.pre; | object | img ">

+

+<!ENTITY % fontstyle "tt | i | b | big | small ">

+

+<!ENTITY % phrase "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym | sub | sup ">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl">

+<!ENTITY % blocktext "pre | hr | blockquote | address">

+

+<!ENTITY % block

+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">

+

+<!ENTITY % Block "(%block; | form | %misc;)*">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding big, small, sup or sup -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;

+      | %inline.forms;)*">

+

+<!-- form uses %Block; excluding form -->

+

+<!ENTITY % form.content "(%block; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form and form controls -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+    table | %special; | %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+<!--doc:This element identifies the document to be XHTML. The remainder of the XHTML document is contained by this element.-->

+<!ELEMENT html (head, body)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object)*">

+

+ 

+<!--doc:The HEAD element contains information about the current document,for example the title and the list of keywords that may be used by the search engines.-->

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!--doc:The TITLE element is not considered part of the flow of text. It is displayed as the page header or window title.-->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+<!--doc:The BASE element allows authors to specify a document's base URI explicitly. The path information specified by the BASE element only affects relative URIs from the same document.-->

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  href        %URI;          #REQUIRED

+  id          ID             #IMPLIED

+  >

+

+<!--doc:The META element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.). The specification does not define a normative set of properties.-->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--doc:This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times. Although LINK has no content, it conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links).-->

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  >

+

+<!--doc:The STYLE element allows authors to put style sheet rules in the head of the document. XHTML permits any number of STYLE elements in the HEAD section of a document. Some style sheet implementations may allow a wider variety of rules in the STYLE element than in the style attribute. For example, with CSS, rules may be declared within a STYLE element.-->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!--doc:The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an XHTML document.-->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+

+<!--doc:The NOSCRIPT element allows authors to provide alternate content when a script is not executed. The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases: 1. The user agent is configured not to evaluate scripts; 2The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document.-->

+<!ELEMENT noscript %Block;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+

+<!--doc:The body of a document contains the document's content. The content may be presented by a user agent in a variety of ways. For example, for visual browsers, you can think of the body as a canvas where the content appears: text, images, colors, graphics, etc.-->

+<!ELEMENT body %Block;>

+<!ATTLIST body

+  %attrs;

+  onload          %Script;   #IMPLIED

+  onunload        %Script;   #IMPLIED

+  >

+

+<!--doc:The DIV element defines a division/section in a document. It offer a generic mechanism for adding structure to documents. This element define content to be block-level but impose no other presentational idioms on the content.-->

+<!ELEMENT div %Flow;>  

+<!ATTLIST div

+  %attrs;

+  >

+

+<!--=================== Paragraphs =======================================-->

+<!--doc:The P element represents a paragraph. It cannot contain block-level elements (including P itself).-->

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  >

+

+<!--=================== Headings =========================================-->

+

+

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+   %attrs;

+   >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+   %attrs;

+   >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+   %attrs;

+   >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+   %attrs;

+   >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+   %attrs;

+   >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+   %attrs;

+   >

+

+<!--=================== Lists ============================================-->

+

+

+<!--doc:The UL element defines an unordered list. Unordered list items are not numbered.-->

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  >

+

+<!--doc:The OL element defines an ordered list. Ordered list items are numbered.-->

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  >

+

+<!--doc:The LI element is used to define a list item. The LI element is used in ordered (OL) and unordered lists (UL).-->

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  >

+

+<!--doc:The DL element is used to define a definition list. They consist consist of two parts for each item: a term (DT) and a description (DD).-->

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  >

+

+<!--doc:The DT element defines a term in a definition list.-->

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!--doc:The DD element defines the description of a term in a definition list.-->

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!--doc:The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document.-->

+<!ELEMENT address %Inline;>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+<!--doc:The HR element causes a horizontal rule to be rendered by visual user agents.-->

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!--doc:The PRE element defines blocks of preformatted text. The text enclosed in the pre element preserves spaces and line breaks and is rendered in a fixed-pitch font.-->

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  xml:space (preserve) #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+<!--doc:The BLOCKQUOTE element defines the start of a long quotation (block-level content) . It creates white space on both sides of the text.-->

+<!ELEMENT blockquote %Block;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+<!--doc:INS is used to markup sections of the document that have been inserted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--doc:DEL is used to markup sections of the document that have been deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+

+<!--doc:The A element defines an anchor element. An anchor can be used: 1.To create a link to another document by using the href attribute; 2.To create a bookmark inside a document by using the name or id attribute.-->

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!--doc:The SPAN element is used to group inline-elements in a document. Use the SPAN element to group inline-elements to format them with styles.-->

+<!ELEMENT span %Inline;> 

+<!ATTLIST span

+  %attrs;

+  >

+

+<!--doc:The BDO element overrides the default text direction. It should be used in scenarios where absolute control over sequence order is required (e.g., multi-language part numbers).-->

+<!ELEMENT bdo %Inline;>  

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!--doc:The BR element forcibly breaks (ends) the current line of text. Use the BR element to enter blank lines, not to separate paragraphs.-->

+<!ELEMENT br EMPTY>   

+<!ATTLIST br

+  %coreattrs;

+  >

+

+<!--doc:Renders as emphasized text. Generally, visual user agents present EM text in italics.-->

+<!ELEMENT em %Inline;>   

+<!ATTLIST em %attrs;>

+

+<!--doc:Renders as strong emphasized text. Generally, visual user agents present STRONG text in bold font.-->

+<!ELEMENT strong %Inline;>   

+<!ATTLIST strong %attrs;>

+

+<!--doc:Indicates that this is the defining instance of the enclosed term.-->

+<!ELEMENT dfn %Inline;>   

+<!ATTLIST dfn %attrs;>

+

+<!--doc:Designates a fragment of computer code.-->

+<!ELEMENT code %Inline;>   

+<!ATTLIST code %attrs;>

+

+<!--doc:Designates sample output from programs, scripts, etc.-->

+<!ELEMENT samp %Inline;>   

+<!ATTLIST samp %attrs;>

+

+<!--doc:Indicates text to be entered by the user.-->

+<!ELEMENT kbd %Inline;>  

+<!ATTLIST kbd %attrs;>

+

+<!--doc:Indicates an instance of a variable or program argument.-->

+<!ELEMENT var %Inline;>   

+<!ATTLIST var %attrs;>

+

+<!--doc:Contains a citation or a reference to other sources.-->

+<!ELEMENT cite %Inline;>   

+<!ATTLIST cite %attrs;>

+

+<!--doc:The ABBR element is used to indicates an abbreviated form, like "ie.", "Ltd.", "etc.".-->

+<!ELEMENT abbr %Inline;>   

+<!ATTLIST abbr %attrs;>

+

+<!--doc:The ACRONYM element defines an acronym, like "USA" or "F.B.I".-->

+<!ELEMENT acronym %Inline;>   

+<!ATTLIST acronym %attrs;>

+

+<!--doc:The Q element defines the start of a short quotation. It does not render as anything special, you have to use styles to format the text.-->

+<!ELEMENT q %Inline;>   

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--doc:The SUB element defines subscript text.-->

+<!ELEMENT sub %Inline;> 

+<!ATTLIST sub %attrs;>

+

+<!--doc:The SUP element defines superscript text.-->

+<!ELEMENT sup %Inline;> 

+<!ATTLIST sup %attrs;>

+

+<!--doc:Renders as teletype or mono spaced text.-->

+<!ELEMENT tt %Inline;>   

+<!ATTLIST tt %attrs;>

+

+<!--doc:Renders as italic text style.-->

+<!ELEMENT i %Inline;>   

+<!ATTLIST i %attrs;>

+

+<!--doc:Renders as bold text style.-->

+<!ELEMENT b %Inline;>   

+<!ATTLIST b %attrs;>

+

+<!--doc:Renders text in a "large" font.-->

+<!ELEMENT big %Inline;>   

+<!ATTLIST big %attrs;>

+

+<!--doc:Renders text in a "small" font.-->

+<!ELEMENT small %Inline;>   

+<!ATTLIST small %attrs;>

+

+<!--==================== Object ======================================-->

+<!--Defines an embedded object. This element allows you to specify the data and parameters for objects inserted into XHTML documents, and the code that can be used to display/manipulate that data.

+-->

+

+<!--doc:Defines an embedded object. This element allows to specify the data and parameters for objects inserted into documents.-->

+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  >

+

+<!--doc:PARAM elements specify a set of values that may be required by an object at run-time. Any number of PARAM elements may appear in the content of an OBJECT or APPLET element, in any order, but must be placed at the start of the content of the enclosing OBJECT or APPLET element.-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+

+<!--doc:The IMG element embeds an image in the current document at the location of the element's definition. The IMG element has no content; it is usually replaced inline by the image designated by the src attribute, the exception being for left or right-aligned images that are "floated" out of line. Note that in this DTD there is no name attribute. That is only available in the transitional and frameset DTD.-->

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document

+  or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+

+<!--doc:The MAP element specifies a client-side image map (or other navigation mechanism) that may be associated with another elements (IMG, OBJECT, or INPUT). An image map is associated with an element via the element's usemap attribute. The MAP element may be used without an associated image for general navigation mechanisms.-->

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  >

+

+<!--doc:Defines a region in an image map. This element is always nested inside a MAP element. This element has no content but specify the geometric region of the image map and the link associated with the region. Note that user agents do not generally render AREA elements. Therefore, authors must provide alternate text for each AREA with the alt attribute.-->

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  >

+

+<!--================ Forms ===============================================-->

+

+<!--doc:The FORM element creates a form. A form can contain textfields, checkboxes, radio-buttons etc. Forms are used to pass user-data to a specified URL, usually a CGI.-->

+<!ELEMENT form %form.content;>   

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  >

+

+<!--doc:The LABEL element may be used to attach information to controls. Each LABEL element is associated with exactly one form control. The "for" attribute binds a label to another element. Set the value of the "for" attribute equal to the value of the "id" attribute of the related element.-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+   

+<!--doc:The INPUT element defines the start of an input field where the user can enter data. The INPUT element is empty, it contains attributes only.-->

+<!ELEMENT input EMPTY>     

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  >

+

+<!--doc:The select element creates a drop-down list. Use this element in the FORM element to accept user input.-->

+<!ELEMENT select (optgroup|option)+>  

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The OPTGROUP element allows authors to group choices logically. This is particularly helpful when the user must choose from a long list of options; groups of related choices are easier to grasp and remember than a single long list of options.-->

+<!ELEMENT optgroup (option)+>   

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!--doc:The option element defines an option in the drop-down list. Use this element in conjunction with the SELECT element, elsewhere it is meaningless.-->

+<!ELEMENT option (#PCDATA)>     

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!--doc:The TEXTAREA element creates a multi-line text input control. User agents should use the contents of this element as the initial value of the control and should render this text initially.-->

+<!ELEMENT textarea (#PCDATA)>     

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The FIELDSET element allows authors to group thematically related controls and labels. Grouping controls makes it easier for users to understand their purpose while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible.-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!--doc:The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually.-->

+<!ELEMENT legend %Inline;>     

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  >

+

+<!--

+ Content is %Flow; excluding a, form and form controls

+--> 

+<!--doc:The BUTTON element defines a push button. Inside a button element you can put content for example images, text.-->

+<!ELEMENT button %button.content;>  

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the table. The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around the table should be rendered. 

+ The values are not the same as CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=':'

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+  

+<!--doc:The TABLE element defines a table. Inside a TABLE element there can be table headers, table rows, table cells.-->

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!--doc:The CAPTION element defines a table caption.-->

+<!ELEMENT caption  %Inline;>

+<!--doc:Defines a table header. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT thead    (tr)+>

+<!--doc:Defines a table footer. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tfoot    (tr)+>

+<!--doc:Defines a table body. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tbody    (tr)+>

+<!--doc:Defines different formatting groups of table columns. The colgroup element is an empty element that contains attributes only. To create columns, you must specify td elements within a tr element.-->

+<!ELEMENT colgroup (col)*>

+<!--doc:The COL element allows authors to group together attribute specifications for table columns. The COL does not group columns together structurally that is the role of the COLGROUP element. COL elements are empty and serve only as a support for attributes. They may appear inside or outside an explicit column group (i.e., COLGROUP element).-->

+<!ELEMENT col      EMPTY>

+<!--doc:The TR elements acts as a container for a row of table cells.-->

+<!ELEMENT tr       (th|td)+>

+<!--doc:The TH element defines a cell in a table that contains header information. User agents have two pieces of header information available: the contents of the TH element and the value of the abbr attribute.-->

+<!ELEMENT th       %Flow;>

+<!--doc:The TD element defines a cell in a table that contains data.-->

+<!ELEMENT td       %Flow;>

+

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  >

+

+<!ATTLIST caption

+  %attrs;

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  >

+

diff --git a/lib/dtds/xhtml/dtd/xhtml1-transitional.dtd b/lib/dtds/xhtml/dtd/xhtml1-transitional.dtd
new file mode 100644
index 0000000..85dc78f
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml1-transitional.dtd
@@ -0,0 +1,1189 @@
+<!--

+   Extensible HTML version 1.0 Transitional DTD

+

+   This is the same as HTML 4 Transitional except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

+

+   $Revision: 1.27 $

+   $Date: 2002/08/01 18:16:48 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+

+<!ENTITY % ContentType "CDATA">

+    <!-- media type, as per [RFC2045] -->

+

+<!ENTITY % ContentTypes "CDATA">

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+

+<!ENTITY % Charset "CDATA">

+    <!-- a character encoding, as per [RFC2045] -->

+

+<!ENTITY % Charsets "CDATA">

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+

+<!ENTITY % LanguageCode "NMTOKEN">

+    <!-- a language code, as per [RFC3066] -->

+

+<!ENTITY % Character "CDATA">

+    <!-- a single character, as per section 2.2 of [XML] -->

+

+<!ENTITY % Number "CDATA">

+    <!-- one or more digits -->

+

+<!ENTITY % LinkTypes "CDATA">

+    <!-- space-separated list of link types -->

+

+<!ENTITY % MediaDesc "CDATA">

+    <!-- single or comma-separated list of media descriptors -->

+

+<!ENTITY % URI "CDATA">

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+

+<!ENTITY % UriList "CDATA">

+    <!-- a space separated list of Uniform Resource Identifiers -->

+

+<!ENTITY % Datetime "CDATA">

+    <!-- date and time information. ISO date format -->

+

+<!ENTITY % Script "CDATA">

+    <!-- script expression -->

+

+<!ENTITY % StyleSheet "CDATA">

+    <!-- style sheet data -->

+

+<!ENTITY % Text "CDATA">

+    <!-- used for titles etc. -->

+

+<!ENTITY % FrameTarget "NMTOKEN">

+    <!-- render in this frame -->

+

+<!ENTITY % Length "CDATA">

+    <!-- nn for pixels or nn% for percentage length -->

+

+<!ENTITY % MultiLength "CDATA">

+    <!-- pixel, percentage, or relative -->

+

+<!ENTITY % Pixels "CDATA">

+    <!-- integer representing length in pixels -->

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+<!ENTITY % Coords "CDATA">

+    <!-- comma separated list of lengths -->

+

+<!-- used for object, applet, img, input and iframe -->

+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">

+

+<!-- a color using sRGB: #RRGGBB as Hex values -->

+<!ENTITY % Color "CDATA">

+

+<!-- There are also 16 widely known color names with their sRGB values:

+

+    Black  = #000000    Green  = #008000

+    Silver = #C0C0C0    Lime   = #00FF00

+    Gray   = #808080    Olive  = #808000

+    White  = #FFFFFF    Yellow = #FFFF00

+    Maroon = #800000    Navy   = #000080

+    Red    = #FF0000    Blue   = #0000FF

+    Purple = #800080    Teal   = #008080

+    Fuchsia= #FF00FF    Aqua   = #00FFFF

+-->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!-- text alignment for p, div, h1-h6. The default is

+     align="left" for ltr headings, "right" for rtl -->

+

+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.extra

+   "object | applet | img | map | iframe">

+	

+<!ENTITY % special.basic

+	"br | span | bdo">

+

+<!ENTITY % special

+   "%special.basic; | %special.extra;">

+

+<!ENTITY % fontstyle.extra "big | small | font | basefont">

+

+<!ENTITY % fontstyle.basic "tt | i | b | u

+                      | s | strike ">

+

+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">

+

+<!ENTITY % phrase.extra "sub | sup">

+<!ENTITY % phrase.basic "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym">

+

+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl | menu | dir">

+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">

+

+<!ENTITY % block

+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding img, object, applet, big, small,

+     font, or basefont -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |

+	   %inline.forms; | %misc.inline;)*">

+

+<!-- form uses %Flow; excluding form -->

+

+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+      table | br | span | bdo | object | applet | img | map |

+      %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+

+<!--doc:This element identifies the document to be XHTML. The remainder of the XHTML document is contained by this element.-->

+<!ELEMENT html (head, body)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">

+

+

+<!--doc:The HEAD element contains information about the current document,for example the title and the list of keywords that may be used by the search engines.-->

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!--doc:The TITLE element is not considered part of the flow of text. It is displayed as the page header or window title.-->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+

+<!--doc:The BASE element allows authors to specify a document's base URI explicitly. The path information specified by the BASE element only affects relative URIs from the same document.-->

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  id          ID             #IMPLIED

+  href        %URI;          #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The META element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.). The specification does not define a normative set of properties.-->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--doc:This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times. Although LINK has no content, it conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links).-->

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The STYLE element allows authors to put style sheet rules in the head of the document. XHTML permits any number of STYLE elements in the HEAD section of a document. Some style sheet implementations may allow a wider variety of rules in the STYLE element than in the style attribute. For example, with CSS, rules may be declared within a STYLE element.-->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!--doc:The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an XHTML document.-->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  language    CDATA          #IMPLIED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!--doc:The NOSCRIPT element allows authors to provide alternate content when a script is not executed. The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases: 1. The user agent is configured not to evaluate scripts; 2The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document.-->

+<!ELEMENT noscript %Flow;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--======================= Frames =======================================-->

+

+

+<!--doc:The IFRAME element allows authors to insert a frame within a block of text. Inserting an inline frame within a section of text is much like inserting an object via the OBJECT element: they both allow you to insert an XHTML document in the middle of another, they may both be aligned with surrounding text, etc.-->

+<!ELEMENT iframe %Flow;>

+<!ATTLIST iframe

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  align       %ImgAlign;     #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+

+<!--doc:The NOFRAMES element specifies content that should be displayed only by user agents that do not support frames or are configured not to display frames. User agents that support frames must only display the contents of a NOFRAMES declaration when configured not to display frames. User agents that do not support frames must display the contents of NOFRAMES in any case.-->

+<!ELEMENT noframes %Flow;>

+<!ATTLIST noframes

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+<!--doc:The body of a document contains the document's content. The content may be presented by a user agent in a variety of ways. For example, for visual browsers, you can think of the body as a canvas where the content appears: text, images, colors, graphics, etc.-->

+<!ELEMENT body %Flow;>

+<!ATTLIST body

+  %attrs;

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  background  %URI;          #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  text        %Color;        #IMPLIED

+  link        %Color;        #IMPLIED

+  vlink       %Color;        #IMPLIED

+  alink       %Color;        #IMPLIED

+  >

+

+<!--doc:The DIV element defines a division/section in a document. It offer a generic mechanism for adding structure to documents. This element define content to be block-level but impose no other presentational idioms on the content.-->

+<!ELEMENT div %Flow;>  

+<!ATTLIST div

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Paragraphs =======================================-->

+<!--doc:The P element represents a paragraph. It cannot contain block-level elements (including P itself).-->

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Headings =========================================-->

+

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+  %attrs;

+  %TextAlign;

+  >

+<!--doc:There are six levels of headings in XHTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.-->

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Lists ============================================-->

+

+<!-- Unordered list bullet styles -->

+

+<!ENTITY % ULStyle "(disc|square|circle)">

+

+<!--doc:The UL element defines an unordered list. Unordered list items are not numbered.-->

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  type        %ULStyle;     #IMPLIED

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- Ordered list numbering style

+

+    1   arabic numbers      1, 2, 3, ...

+    a   lower alpha         a, b, c, ...

+    A   upper alpha         A, B, C, ...

+    i   lower roman         i, ii, iii, ...

+    I   upper roman         I, II, III, ...

+

+    The style is applied to the sequence number which by default

+    is reset to 1 for the first list item in an ordered list.

+-->

+<!ENTITY % OLStyle "CDATA">

+

+<!--doc:The OL element defines an ordered list. Ordered list items are numbered.-->

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  type        %OLStyle;      #IMPLIED

+  compact     (compact)      #IMPLIED

+  start       %Number;       #IMPLIED

+  >

+

+<!--doc:The MENU element was designed to be used for single column menu lists. (DEPRECATED)-->

+<!ELEMENT menu (li)+>

+<!ATTLIST menu

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!--doc:The DIR element was designed to be used for creating multicolumn directory lists. (DEPRECATED)-->

+<!ELEMENT dir (li)+>

+<!ATTLIST dir

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!ENTITY % LIStyle "CDATA">

+

+<!--doc:The LI element is used to define a list item. The LI element is used in ordered (OL) and unordered lists (UL).-->

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  type        %LIStyle;      #IMPLIED

+  value       %Number;       #IMPLIED

+  >

+

+<!--doc:The DL element is used to define a definition list. They consist consist of two parts for each item: a term (DT) and a description (DD).-->

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  compact     (compact)      #IMPLIED

+  >

+<!--doc:The DT element defines a term in a definition list.-->

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!--doc:The DD element defines the description of a term in a definition list.-->

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!--doc:The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document.-->

+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+

+<!--doc:The HR element causes a horizontal rule to be rendered by visual user agents.-->

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  align       (left|center|right) #IMPLIED

+  noshade     (noshade)      #IMPLIED

+  size        %Pixels;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!--doc:The PRE element defines blocks of preformatted text. The text enclosed in the pre element preserves spaces and line breaks and is rendered in a fixed-pitch font.-->

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  width       %Number;      #IMPLIED

+  xml:space   (preserve)    #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+

+<!--doc:The BLOCKQUOTE element defines the start of a long quotation (block-level content) . It creates white space on both sides of the text.-->

+<!ELEMENT blockquote %Flow;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Text alignment ===================================-->

+

+<!--doc:The CENTER element is exactly equivalent to specifying the DIV element with the align attribute set to "center". The CENTER element is deprecated.-->

+<!ELEMENT center %Flow;>

+<!ATTLIST center

+  %attrs;

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+<!--doc:INS is used to markup sections of the document that have been inserted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--doc:DEL is used to markup sections of the document that have been deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).-->

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+

+<!--doc:The A element defines an anchor element. An anchor can be used: 1.To create a link to another document by using the href attribute; 2.To create a bookmark inside a document by using the name or id attribute.-->

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!--doc:The SPAN element is used to group inline-elements in a document. Use the SPAN element to group inline-elements to format them with styles.-->

+<!ELEMENT span %Inline;> 

+<!ATTLIST span

+  %attrs;

+  >

+

+<!--doc:The BDO element overrides the default text direction. It should be used in scenarios where absolute control over sequence order is required (e.g., multi-language part numbers).-->

+<!ELEMENT bdo %Inline;>  

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!--doc:The BR element forcibly breaks (ends) the current line of text. Use the BR element to enter blank lines, not to separate paragraphs.-->

+<!ELEMENT br EMPTY>   

+<!ATTLIST br

+  %coreattrs;

+  clear       (left|all|right|none) "none"

+  >

+

+<!--doc:Renders as emphasized text. Generally, visual user agents present EM text in italics.-->

+<!ELEMENT em %Inline;>   

+<!ATTLIST em %attrs;>

+

+<!--doc:Renders as strong emphasized text. Generally, visual user agents present STRONG text in bold font.-->

+<!ELEMENT strong %Inline;>   

+<!ATTLIST strong %attrs;>

+

+<!--doc:Indicates that this is the defining instance of the enclosed term.-->

+<!ELEMENT dfn %Inline;>   

+<!ATTLIST dfn %attrs;>

+

+<!--doc:Designates a fragment of computer code.-->

+<!ELEMENT code %Inline;>   

+<!ATTLIST code %attrs;>

+

+<!--doc:Designates sample output from programs, scripts, etc.-->

+<!ELEMENT samp %Inline;>   

+<!ATTLIST samp %attrs;>

+

+<!--doc:Indicates text to be entered by the user.-->

+<!ELEMENT kbd %Inline;>  

+<!ATTLIST kbd %attrs;>

+

+<!--doc:Indicates an instance of a variable or program argument.-->

+<!ELEMENT var %Inline;>   

+<!ATTLIST var %attrs;>

+

+<!--doc:Contains a citation or a reference to other sources.-->

+<!ELEMENT cite %Inline;>   

+<!ATTLIST cite %attrs;>

+

+<!--doc:The ABBR element is used to indicates an abbreviated form, like "ie.", "Ltd.", "etc.".-->

+<!ELEMENT abbr %Inline;>   

+<!ATTLIST abbr %attrs;>

+

+<!--doc:The ACRONYM element defines an acronym, like "USA" or "F.B.I".-->

+<!ELEMENT acronym %Inline;>   

+<!ATTLIST acronym %attrs;>

+

+<!--doc:The Q element defines the start of a short quotation. It does not render as anything special, you have to use styles to format the text.-->

+<!ELEMENT q %Inline;>   

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--doc:The SUB element defines subscript text.-->

+<!ELEMENT sub %Inline;> 

+<!ATTLIST sub %attrs;>

+

+<!--doc:The SUP element defines superscript text.-->

+<!ELEMENT sup %Inline;> 

+<!ATTLIST sup %attrs;>

+

+<!--doc:Renders as teletype or mono spaced text.-->

+<!ELEMENT tt %Inline;>   

+<!ATTLIST tt %attrs;>

+

+<!--doc:Renders as italic text style.-->

+<!ELEMENT i %Inline;>   

+<!ATTLIST i %attrs;>

+

+<!--doc:Renders as bold text style.-->

+<!ELEMENT b %Inline;>   

+<!ATTLIST b %attrs;>

+

+<!--doc:Renders text in a "large" font.-->

+<!ELEMENT big %Inline;>   

+<!ATTLIST big %attrs;>

+

+<!--doc:Renders text in a "small" font.-->

+<!ELEMENT small %Inline;>   

+<!ATTLIST small %attrs;>

+

+<!--doc:Renders underlined style text. (DEPRECATED)-->

+<!ELEMENT u %Inline;>   

+<!ATTLIST u %attrs;>

+

+<!--doc:Render strike-through style text.-->

+<!ELEMENT s %Inline;>   

+<!ATTLIST s %attrs;>

+

+<!--doc:Render strike-through style text.-->

+<!ELEMENT strike %Inline;>   

+<!ATTLIST strike %attrs;>

+

+<!--doc:The BASEFONT element sets the base font size (using the size attribute). Font size changes achieved with FONT are relative to the base font size set by BASEFONT. If BASEFONT is not used, the default base font size is 3.-->

+<!ELEMENT basefont EMPTY>  

+<!ATTLIST basefont

+  id          ID             #IMPLIED

+  size        CDATA          #REQUIRED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--doc:The FONT element changes the font size and color for text in its contents.-->

+<!ELEMENT font %Inline;> 

+<!ATTLIST font

+  %coreattrs;

+  %i18n;

+  size        CDATA          #IMPLIED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--==================== Object ======================================-->

+<!--doc:Defines an embedded object. This element allows to specify the data and parameters for objects inserted into documents.-->

+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--doc:PARAM elements specify a set of values that may be required by an object at run-time. Any number of PARAM elements may appear in the content of an OBJECT or APPLET element, in any order, but must be placed at the start of the content of the enclosing OBJECT or APPLET element.-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #REQUIRED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--=================== Java applet ==================================-->

+<!--doc:This element, supported by all Java-enabled browsers, allows designers to embed a Java applet in an XHTML document. It has been deprecated in favor of the OBJECT element.-->

+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST applet

+  %coreattrs;

+  codebase    %URI;          #IMPLIED

+  archive     CDATA          #IMPLIED

+  code        CDATA          #IMPLIED

+  object      CDATA          #IMPLIED

+  alt         %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  width       %Length;       #REQUIRED

+  height      %Length;       #REQUIRED

+  align       %ImgAlign;     #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+

+<!--doc:The IMG element embeds an image in the current document at the location of the element's definition. The IMG element has no content; it is usually replaced inline by the image designated by the src attribute, the exception being for left or right-aligned images that are "floated" out of line. Note that in this DTD there is no name attribute. That is only available in the transitional and frameset DTD.-->

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  name        NMTOKEN        #IMPLIED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Length;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+

+<!--doc:The MAP element specifies a client-side image map (or other navigation mechanism) that may be associated with another elements (IMG, OBJECT, or INPUT). An image map is associated with an element via the element's usemap attribute. The MAP element may be used without an associated image for general navigation mechanisms.-->

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        CDATA          #IMPLIED

+  >

+  

+<!--doc: Defines a region in an image map. This element is always nested inside a MAP tag. This element has no content but specify the geometric region of the image map and the link associated with the region. Note that user agents do not generally render AREA elements. Therefore, authors must provide alternate text for each AREA with the alt attribute.-->

+<!--doc:Defines a region in an image map. This element is always nested inside a MAP element. This element has no content but specify the geometric region of the image map and the link associated with the region. Note that user agents do not generally render AREA elements. Therefore, authors must provide alternate text for each AREA with the alt attribute.-->

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--================ Forms ===============================================-->

+

+<!--doc:The FORM element creates a form. A form can contain textfields, checkboxes, radio-buttons etc. Forms are used to pass user-data to a specified URL, usually a CGI.-->

+<!ELEMENT form %form.content;>   

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  name        NMTOKEN        #IMPLIED

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--doc:The LABEL element may be used to attach information to controls. Each LABEL element is associated with exactly one form control. The "for" attribute binds a label to another element. Set the value of the "for" attribute equal to the value of the "id" attribute of the related element.-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+

+<!-- the name attribute is required for all but submit & reset -->

+

+<!--doc:The INPUT element defines the start of an input field where the user can enter data. The INPUT element is empty, it contains attributes only.-->

+<!ELEMENT input EMPTY>     

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  >

+

+<!--doc:The select element creates a drop-down list. Use this element in the FORM element to accept user input.-->

+<!ELEMENT select (optgroup|option)+>  

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The OPTGROUP element allows authors to group choices logically. This is particularly helpful when the user must choose from a long list of options; groups of related choices are easier to grasp and remember than a single long list of options.-->

+<!ELEMENT optgroup (option)+>   

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!--doc:The option element defines an option in the drop-down list. Use this element in conjunction with the SELECT element, elsewhere it is meaningless.-->

+<!ELEMENT option (#PCDATA)>     

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!--doc:The TEXTAREA element creates a multi-line text input control. User agents should use the contents of this element as the initial value of the control and should render this text initially.-->

+<!ELEMENT textarea (#PCDATA)>     

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--doc:The FIELDSET element allows authors to group thematically related controls and labels. Grouping controls makes it easier for users to understand their purpose while simultaneously facilitating tabbing navigation for visual user agents and speech navigation for speech-oriented user agents. The proper use of this element makes documents more accessible.-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!ENTITY % LAlign "(top|bottom|left|right)">

+

+<!--doc:The LEGEND element allows authors to assign a caption to a FIELDSET. The legend improves accessibility when the FIELDSET is rendered non-visually.-->

+<!ELEMENT legend %Inline;>     

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  align       %LAlign;       #IMPLIED

+  >

+

+<!--

+ Content is %Flow; excluding a, form, form controls, iframe

+--> 

+<!--doc:The BUTTON element defines a push button. Inside a button element you can put content for example images, text.-->

+<!ELEMENT button %button.content;>  

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!--doc:This element creates a single-line text input control. Authors should use the INPUT element to create text input controls. (DEPRECATED)-->

+<!ELEMENT isindex EMPTY>

+<!ATTLIST isindex

+  %coreattrs;

+  %i18n;

+  prompt      %Text;         #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the

+ table. The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around

+ the table should be rendered. The values are not the same as

+ CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal placement of table relative to document -->

+<!ENTITY % TAlign "(left|center|right)">

+

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=':'

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+  

+<!--doc:The TABLE element defines a table. Inside a TABLE element there can be table headers, table rows, table cells.-->

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!--doc:The CAPTION element defines a table caption.-->

+<!ELEMENT caption  %Inline;>

+<!--doc:Defines a table header. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT thead    (tr)+>

+<!--doc:Defines a table footer. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tfoot    (tr)+>

+<!--doc:Defines a table body. Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and TBODY elements, respectively. This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.-->

+<!ELEMENT tbody    (tr)+>

+<!--doc:Defines different formatting groups of table columns. The colgroup element is an empty element that contains attributes only. To create columns, you must specify td elements within a tr element.-->

+<!ELEMENT colgroup (col)*>

+<!--doc:The COL element allows authors to group together attribute specifications for table columns. The COL does not group columns together structurally that is the role of the COLGROUP element. COL elements are empty and serve only as a support for attributes. They may appear inside or outside an explicit column group (i.e., COLGROUP element).-->

+<!ELEMENT col      EMPTY>

+<!--doc:The TR elements acts as a container for a row of table cells.-->

+<!ELEMENT tr       (th|td)+>

+<!--doc:The TH element defines a cell in a table that contains header information. User agents have two pieces of header information available: the contents of the TH element and the value of the abbr attribute.-->

+<!ELEMENT th       %Flow;>

+<!--doc:The TD element defines a cell in a table that contains data.-->

+<!ELEMENT td       %Flow;>

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  align       %TAlign;       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!ENTITY % CAlign "(top|bottom|left|right)">

+

+<!ATTLIST caption

+  %attrs;

+  align       %CAlign;       #IMPLIED

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Length;       #IMPLIED

+  height      %Length;       #IMPLIED

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Length;       #IMPLIED

+  height      %Length;       #IMPLIED

+  >

+

diff --git a/lib/dtds/xhtml/dtd/xhtml1.dcl b/lib/dtds/xhtml/dtd/xhtml1.dcl
new file mode 100644
index 0000000..912fd06
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtml1.dcl
@@ -0,0 +1,192 @@
+<!SGML "ISO 8879:1986 (WWW)"
+
+     -- SGML Declaration for XML 1.0 --
+
+     -- from: 
+        Final text of revised Web SGML Adaptations Annex (TC2) to ISO 8879:1986
+        ISO/IEC JTC1/SC34 N0029: 1998-12-06
+        Annex L.2 (informative): SGML Declaration for XML
+
+        changes made to accommodate validation are noted with 'VALID:'
+     --
+
+     CHARSET
+         BASESET
+             "ISO Registration Number 177//CHARSET
+              ISO/IEC 10646-1:1993 UCS-4 with implementation
+              level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+                 0        9  UNUSED
+                 9        2       9
+                11        2  UNUSED
+                13        1      13
+                14       18  UNUSED
+                32       95      32
+               127        1  UNUSED
+               128       32  UNUSED
+               160    55136     160
+             55296     2048  UNUSED  -- surrogates --
+             57344     8190   57344
+             65534        2  UNUSED  -- FFFE and FFFF --
+             65536  1048576   65536
+
+     CAPACITY NONE  -- Capacities are not restricted in XML --
+
+     SCOPE DOCUMENT
+
+     SYNTAX
+         SHUNCHAR NONE
+         BASESET "ISO Registration Number 177//CHARSET
+                  ISO/IEC 10646-1:1993 UCS-4 with implementation
+                  level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+             0 1114112 0
+         FUNCTION
+             RE    13
+             RS    10
+             SPACE 32
+             TAB   SEPCHAR 9
+         NAMING
+             LCNMSTRT ""
+             UCNMSTRT ""
+             NAMESTRT
+                 58 95 192-214 216-246 248-305 308-318 321-328
+                 330-382 384-451 461-496 500-501 506-535 592-680
+                 699-705 902 904-906 908 910-929 931-974 976-982
+                 986 988 990 992 994-1011 1025-1036 1038-1103
+                 1105-1116 1118-1153 1168-1220 1223-1224
+                 1227-1228 1232-1259 1262-1269 1272-1273
+                 1329-1366 1369 1377-1414 1488-1514 1520-1522
+                 1569-1594 1601-1610 1649-1719 1722-1726
+                 1728-1742 1744-1747 1749 1765-1766 2309-2361
+                 2365 2392-2401 2437-2444 2447-2448 2451-2472
+                 2474-2480 2482 2486-2489 2524-2525 2527-2529
+                 2544-2545 2565-2570 2575-2576 2579-2600
+                 2602-2608 2610-2611 2613-2614 2616-2617
+                 2649-2652 2654 2674-2676 2693-2699 2701
+                 2703-2705 2707-2728 2730-2736 2738-2739
+                 2741-2745 2749 2784 2821-2828 2831-2832
+                 2835-2856 2858-2864 2866-2867 2870-2873 2877
+                 2908-2909 2911-2913 2949-2954 2958-2960
+                 2962-2965 2969-2970 2972 2974-2975 2979-2980
+                 2984-2986 2990-2997 2999-3001 3077-3084
+                 3086-3088 3090-3112 3114-3123 3125-3129
+                 3168-3169 3205-3212 3214-3216 3218-3240
+                 3242-3251 3253-3257 3294 3296-3297 3333-3340
+                 3342-3344 3346-3368 3370-3385 3424-3425
+                 3585-3630 3632 3634-3635 3648-3653 3713-3714
+                 3716 3719-3720 3722 3725 3732-3735 3737-3743
+                 3745-3747 3749 3751 3754-3755 3757-3758 3760
+                 3762-3763 3773 3776-3780 3904-3911 3913-3945
+                 4256-4293 4304-4342 4352 4354-4355 4357-4359
+                 4361 4363-4364 4366-4370 4412 4414 4416 4428
+                 4430 4432 4436-4437 4441 4447-4449 4451 4453
+                 4455 4457 4461-4462 4466-4467 4469 4510 4520
+                 4523 4526-4527 4535-4536 4538 4540-4546 4587
+                 4592 4601 7680-7835 7840-7929 7936-7957
+                 7960-7965 7968-8005 8008-8013 8016-8023 8025
+                 8027 8029 8031-8061 8064-8116 8118-8124 8126
+                 8130-8132 8134-8140 8144-8147 8150-8155
+                 8160-8172 8178-8180 8182-8188 8486 8490-8491
+                 8494 8576-8578 12295 12321-12329 12353-12436
+                 12449-12538 12549-12588 19968-40869 44032-55203
+
+             LCNMCHAR ""
+             UCNMCHAR ""
+             NAMECHAR
+                 45-46 183 720-721 768-837 864-865 903 1155-1158
+                 1425-1441 1443-1465 1467-1469 1471 1473-1474
+                 1476 1600 1611-1618 1632-1641 1648 1750-1764
+                 1767-1768 1770-1773 1776-1785 2305-2307 2364
+                 2366-2381 2385-2388 2402-2403 2406-2415
+                 2433-2435 2492 2494-2500 2503-2504 2507-2509
+                 2519 2530-2531 2534-2543 2562 2620 2622-2626
+                 2631-2632 2635-2637 2662-2673 2689-2691 2748
+                 2750-2757 2759-2761 2763-2765 2790-2799
+                 2817-2819 2876 2878-2883 2887-2888 2891-2893
+                 2902-2903 2918-2927 2946-2947 3006-3010
+                 3014-3016 3018-3021 3031 3047-3055 3073-3075
+                 3134-3140 3142-3144 3146-3149 3157-3158
+                 3174-3183 3202-3203 3262-3268 3270-3272
+                 3274-3277 3285-3286 3302-3311 3330-3331
+                 3390-3395 3398-3400 3402-3405 3415 3430-3439
+                 3633 3636-3642 3654-3662 3664-3673 3761
+                 3764-3769 3771-3772 3782 3784-3789 3792-3801
+                 3864-3865 3872-3881 3893 3895 3897 3902-3903
+                 3953-3972 3974-3979 3984-3989 3991 3993-4013
+                 4017-4023 4025 8400-8412 8417 12293 12330-12335
+                 12337-12341 12441-12442 12445-12446 12540-12542
+
+             NAMECASE
+                 GENERAL NO
+                 ENTITY  NO
+         DELIM
+             GENERAL  SGMLREF
+             HCRO     "&#38;#x"
+                      -- Ampersand followed by "#x" (without quotes) --
+             NESTC    "/"
+             NET      ">"
+             PIC      "?>"
+             SHORTREF NONE
+
+         NAMES
+             SGMLREF
+
+         QUANTITY
+             NONE -- Quantities are not restricted in XML --
+
+         ENTITIES
+             "amp"  38
+             "lt"   60
+             "gt"   62
+             "quot" 34
+             "apos" 39
+
+     FEATURES
+         MINIMIZE
+             DATATAG NO
+             OMITTAG NO
+             RANK    NO
+             SHORTTAG
+                 STARTTAG
+                     EMPTY    NO
+                     UNCLOSED NO
+                     NETENABL IMMEDNET
+                 ENDTAG
+                     EMPTY    NO
+                     UNCLOSED NO
+                 ATTRIB
+                     DEFAULT  YES
+                     OMITNAME NO
+                     VALUE    NO
+             EMPTYNRM  YES
+             IMPLYDEF
+                 ATTLIST  NO  -- VALID: was YES --
+                 DOCTYPE  NO
+                 ELEMENT  NO  -- VALID: was YES --
+                 ENTITY   NO
+                 NOTATION NO  -- VALID: was YES --
+         LINK
+             SIMPLE   NO
+             IMPLICIT NO
+             EXPLICIT NO
+         OTHER
+             CONCUR   NO
+             SUBDOC   NO
+             FORMAL   NO
+             URN      NO
+             KEEPRSRE YES
+             VALIDITY TYPE -- VALID: was NOASSERT --
+             ENTITIES
+                 REF      ANY
+                 INTEGRAL YES
+
+     APPINFO NONE
+
+     SEEALSO "ISO 8879//NOTATION Extensible Markup Language (XML) 1.0//EN"
+>
+<!-- Id: $Id$ SMI
+     Revisions:
+#1999-04-09  changes for XML validation
+#2001-04-08  updated ISO registration number for UCS-4
+-->
diff --git a/lib/dtds/xhtml/dtd/xhtmlcatalog.xml b/lib/dtds/xhtml/dtd/xhtmlcatalog.xml
new file mode 100644
index 0000000..51f001c
--- /dev/null
+++ b/lib/dtds/xhtml/dtd/xhtmlcatalog.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+                         "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<!--
+  Comment the DTD declaration to avoid looking for it on the web.
+  Alternatively we can place a copy of the DTD locally and refer to it.
+-->
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+  <public publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" uri="xhtml1-transitional.dtd"/>
+  <public publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" uri="xhtml1-strict.dtd"/>
+  <public publicId="-//W3C//DTD HTML 4.01 Transitional//EN" uri="xhtml1-transitional.dtd"/>
+  
+  <public publicId="-//W3C//DTD XHTML 1.0 Frameset//EN" uri="xhtml1-frameset.dtd"/>
+  <public publicId="-//W3C//ENTITIES Latin 1 for XHTML//EN" uri="xhtml-lat1.ent"/>
+  <public publicId="-//W3C//ENTITIES Symbols for XHTML//EN" uri="xhtml-symbol.ent"/>
+  <public publicId="-//W3C//ENTITIES Special for XHTML//EN" uri="xhtml-special.ent"/>
+  
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" uri="xhtml1-transitional.dtd"/>
+  <system systemId="http://www.w3.org/TR/html4/loose.dtd" uri="xhtml1-transitional.dtd"/>
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" uri="xhtml1-strict.dtd"/>
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" uri="xhtml1-frameset.dtd"/>
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent" uri="xhtml-lat1.ent"/>
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent" uri="xhtml-symbol.ent"/>
+  <system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent" uri="xhtml-special.ent"/>
+  
+</catalog>
diff --git a/lib/dtds/xhtml/html2dita/build.xml b/lib/dtds/xhtml/html2dita/build.xml
new file mode 100644
index 0000000..1a853fe
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/build.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>

+<!-- (c) Copyright IBM Corp. 2005, 2006 All Rights Reserved. -->

+

+<project name="html2dita" basedir="." default="html2dita">

+

+    <property name="args.input" value="." />

+    <property name="args.include.subdirs" value="no" />

+    <property name="args.output" value="." />

+    <property name="args.dita.ext" value=".dita" />

+    <property name="args.xsl" value="h2d.xsl" />

+    <property name="temp.dir" value="temp"/>

+

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: init                      

+         - - - - - - - - - - - - - - - - - -->

+    <target name="init"

+            depends="checkinputs"

+            description="-->Init properties base on input parameters">

+        <available file="${args.input}" type="file" property="isInputFile" />

+        <available file="${args.input}" type="dir" property="isInputDir" />

+        <mkdir dir="${args.output}" />

+        <condition property="includes.pattern" value="**/*.html,**/*.htm,**/*.xhtml,**/*.xml">

+            <equals arg1="${args.include.subdirs}"

+                    arg2="yes"

+                    casesensitive="false" />

+        </condition>

+        <condition property="includes.pattern" value="**/*.html,**/*.htm,**/*.xhtml,**/*.xml">

+            <not>

+                <isset property="includes.pattern" />

+            </not>

+        </condition>

+    </target>

+

+

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: checkinputs                      

+         - - - - - - - - - - - - - - - - - -->

+    <target name="checkinputs" description="-->Check input parameters">

+        <fail message="Input parameter 'args.input=${args.input}' does not exist.">

+            <condition>

+                <not>

+                    <available file="${args.input}" />

+                </not>

+            </condition>

+        </fail>

+        <fail message="Input parameter 'args.xsl=${args.xsl}' does not exist">

+            <condition>

+                <not>

+                    <available file="${args.xsl}" />

+                </not>

+            </condition>

+        </fail>

+    </target>

+

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: clean-temp                      

+         - - - - - - - - - - - - - - - - - -->

+    <target name="clean-temp" description="-->Clean temp directory">

+      <delete dir="${temp.dir}"/>

+    </target>

+      

+    <!-- ================================= 

+          public target: html2dita              

+         ================================= -->

+    <target name="html2dita"

+            depends="html2dita-single, html2dita-batch, clean-temp"

+            description="-->Migrate one or more HTML files to DITA files">

+    </target>

+

+

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: preprocess-batch              

+         - - - - - - - - - - - - - - - - - -->

+    <target name="preprocess-batch" 

+            if="isInputDir" 

+            description="-->Remove xmlns from HTML files">

+      <xslt

+            basedir="${args.input}"

+            destdir="${temp.dir}"

+            includes="${includes.pattern}"

+            style="preprocess.xsl"

+            force="true">

+        <mapper type="identity"/>

+      </xslt>

+    </target>

+      

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: html2dita-batch              

+         - - - - - - - - - - - - - - - - - -->

+    <target name="html2dita-batch"

+            depends="init, preprocess-batch"

+            if="isInputDir"

+            description="-->Migrate HTML files to DITA files in batches">

+

+        <xslt

+              basedir="${temp.dir}"

+              destdir="${args.output}"

+              includes="${includes.pattern}"

+              extension="${args.dita.ext}"

+              style="${args.xsl}"

+              force="true">

+            <param name="infotype"

+                   expression="${args.infotype}"

+                   if="args.infotype" />

+            <param name="dita-extension"

+                   expression="${args.dita.ext}"

+                   if="args.dita.ext" />

+            <param name="default-lang"

+                   expression="${args.lang}"

+                   if="args.lang" />

+        </xslt>

+    </target>

+

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: preprocess-single              

+         - - - - - - - - - - - - - - - - - -->

+    <target name="preprocess-single" 

+            if="isInputFile"

+            description="-->Remove xmlns from HTML file">

+      <basename file="${args.input}" property="filename" />

+      <dirname file="${args.input}" property="args.input.dir"/>

+      <xslt

+            basedir="${args.input.dir}"

+            destdir="${temp.dir}"

+            includes="${filename}"            

+            style="preprocess.xsl"

+            force="true">

+        <mapper type="identity"/>

+      </xslt>

+    </target>

+    

+    <!-- - - - - - - - - - - - - - - - - - 

+          private target: html2dita-batch              

+         - - - - - - - - - - - - - - - - - -->

+    <target name="html2dita-single"

+            depends="init, preprocess-single"

+            if="isInputFile"

+            description="-->Migrate single HTML file to DITA file">

+        <xslt

+              basedir="${temp.dir}"

+              includes="${filename}"

+              destdir="${args.output}"

+              extension="${args.dita.ext}"

+              style="${args.xsl}"

+              force="true">

+            <param name="infotype"

+                   expression="${args.infotype}"

+                   if="args.infotype" />

+            <param name="dita-extension"

+                   expression="${args.dita.ext}"

+                   if="args.dita.ext" />

+            <param name="default-lang"

+                   expression="${args.lang}"

+                   if="args.lang" />

+            <param name="FILENAME" expression="${filename}" if="filename" />

+        </xslt>

+    </target>

+

+

+</project>
\ No newline at end of file
diff --git a/lib/dtds/xhtml/html2dita/catalog.xml b/lib/dtds/xhtml/html2dita/catalog.xml
new file mode 100644
index 0000000..6994414
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/catalog.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!-- This file is part of the DITA Open Toolkit project hosted on 

+  Sourceforge.net. See the accompanying license.txt file for 

+  applicable licenses.-->

+  <!--

+    | (C) Copyright IBM Corporation 2006. All Rights Reserved.

+    *-->

+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"

+  prefer="public">

+  

+  <public publicId="-//W3C//DTD XHTML 1.0 Strict//EN" uri="dtd/xhtml1-strict.dtd"/>

+    <public publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" uri="dtd/xhtml1-transitional.dtd"/>

+    <public publicId="-//W3C//DTD XHTML 1.0 Frameset//EN" uri="dtd/xhtml1-frameset.dtd"/>

+    <public publicId="-//W3C//ENTITIES Latin 1 for XHTML//EN" uri="dtd/xhtml-lat1.ent"/>

+    <public publicId="-//W3C//ENTITIES Symbols for XHTML//EN" uri="dtd/xhtml-symbol.ent"/>

+    <public publicId="-//W3C//ENTITIES Special for XHTML//EN" uri="dtd/xhtml-special.ent"/>

+  

+</catalog>
\ No newline at end of file
diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml-lat1.ent b/lib/dtds/xhtml/html2dita/dtd/xhtml-lat1.ent
new file mode 100644
index 0000000..7b7b407
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986

+     Permission to copy in any form is granted for use with

+     conforming SGML systems and applications as defined in

+     ISO 8879, provided this notice is included in all copies.

+-->

+<!-- Character entity set. Typical invocation:

+    <!ENTITY % HTMLlat1 PUBLIC

+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">

+    %HTMLlat1;

+-->

+

+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,

+                                  U+00A0 ISOnum -->

+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->

+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->

+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->

+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->

+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->

+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,

+                                  U+00A6 ISOnum -->

+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->

+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,

+                                  U+00A8 ISOdia -->

+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->

+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->

+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark

+                                  = left pointing guillemet, U+00AB ISOnum -->

+<!ENTITY not    "&#172;"> <!-- not sign = angled dash,

+                                  U+00AC ISOnum -->

+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,

+                                  U+00AD ISOnum -->

+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,

+                                  U+00AE ISOnum -->

+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline

+                                  = APL overbar, U+00AF ISOdia -->

+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->

+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,

+                                  U+00B1 ISOnum -->

+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two

+                                  = squared, U+00B2 ISOnum -->

+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three

+                                  = cubed, U+00B3 ISOnum -->

+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,

+                                  U+00B4 ISOdia -->

+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->

+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,

+                                  U+00B6 ISOnum -->

+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma

+                                  = Greek middle dot, U+00B7 ISOnum -->

+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->

+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,

+                                  U+00B9 ISOnum -->

+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,

+                                  U+00BA ISOnum -->

+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark

+                                  = right pointing guillemet, U+00BB ISOnum -->

+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter

+                                  = fraction one quarter, U+00BC ISOnum -->

+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half

+                                  = fraction one half, U+00BD ISOnum -->

+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters

+                                  = fraction three quarters, U+00BE ISOnum -->

+<!ENTITY iquest "&#191;"> <!-- inverted question mark

+                                  = turned question mark, U+00BF ISOnum -->

+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave

+                                  = latin capital letter A grave,

+                                  U+00C0 ISOlat1 -->

+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,

+                                  U+00C1 ISOlat1 -->

+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,

+                                  U+00C2 ISOlat1 -->

+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,

+                                  U+00C3 ISOlat1 -->

+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,

+                                  U+00C4 ISOlat1 -->

+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above

+                                  = latin capital letter A ring,

+                                  U+00C5 ISOlat1 -->

+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE

+                                  = latin capital ligature AE,

+                                  U+00C6 ISOlat1 -->

+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,

+                                  U+00C7 ISOlat1 -->

+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,

+                                  U+00C8 ISOlat1 -->

+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,

+                                  U+00C9 ISOlat1 -->

+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,

+                                  U+00CA ISOlat1 -->

+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,

+                                  U+00CB ISOlat1 -->

+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,

+                                  U+00CC ISOlat1 -->

+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,

+                                  U+00CD ISOlat1 -->

+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,

+                                  U+00CE ISOlat1 -->

+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,

+                                  U+00CF ISOlat1 -->

+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->

+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,

+                                  U+00D1 ISOlat1 -->

+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,

+                                  U+00D2 ISOlat1 -->

+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,

+                                  U+00D3 ISOlat1 -->

+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,

+                                  U+00D4 ISOlat1 -->

+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,

+                                  U+00D5 ISOlat1 -->

+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,

+                                  U+00D6 ISOlat1 -->

+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->

+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke

+                                  = latin capital letter O slash,

+                                  U+00D8 ISOlat1 -->

+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,

+                                  U+00D9 ISOlat1 -->

+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,

+                                  U+00DA ISOlat1 -->

+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,

+                                  U+00DB ISOlat1 -->

+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,

+                                  U+00DC ISOlat1 -->

+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,

+                                  U+00DD ISOlat1 -->

+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,

+                                  U+00DE ISOlat1 -->

+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,

+                                  U+00DF ISOlat1 -->

+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave

+                                  = latin small letter a grave,

+                                  U+00E0 ISOlat1 -->

+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,

+                                  U+00E1 ISOlat1 -->

+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,

+                                  U+00E2 ISOlat1 -->

+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,

+                                  U+00E3 ISOlat1 -->

+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,

+                                  U+00E4 ISOlat1 -->

+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above

+                                  = latin small letter a ring,

+                                  U+00E5 ISOlat1 -->

+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae

+                                  = latin small ligature ae, U+00E6 ISOlat1 -->

+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,

+                                  U+00E7 ISOlat1 -->

+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,

+                                  U+00E8 ISOlat1 -->

+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,

+                                  U+00E9 ISOlat1 -->

+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,

+                                  U+00EA ISOlat1 -->

+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,

+                                  U+00EB ISOlat1 -->

+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,

+                                  U+00EC ISOlat1 -->

+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,

+                                  U+00ED ISOlat1 -->

+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,

+                                  U+00EE ISOlat1 -->

+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,

+                                  U+00EF ISOlat1 -->

+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->

+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,

+                                  U+00F1 ISOlat1 -->

+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,

+                                  U+00F2 ISOlat1 -->

+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,

+                                  U+00F3 ISOlat1 -->

+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,

+                                  U+00F4 ISOlat1 -->

+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,

+                                  U+00F5 ISOlat1 -->

+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,

+                                  U+00F6 ISOlat1 -->

+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->

+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,

+                                  = latin small letter o slash,

+                                  U+00F8 ISOlat1 -->

+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,

+                                  U+00F9 ISOlat1 -->

+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,

+                                  U+00FA ISOlat1 -->

+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,

+                                  U+00FB ISOlat1 -->

+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,

+                                  U+00FC ISOlat1 -->

+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,

+                                  U+00FD ISOlat1 -->

+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,

+                                  U+00FE ISOlat1 -->

+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,

+                                  U+00FF ISOlat1 -->

diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml-special.ent b/lib/dtds/xhtml/html2dita/dtd/xhtml-special.ent
new file mode 100644
index 0000000..2ea205f
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->

+

+<!-- Character entity set. Typical invocation:

+     <!ENTITY % HTMLspecial PUBLIC

+        "-//W3C//ENTITIES Special for XHTML//EN"

+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">

+     %HTMLspecial;

+-->

+

+<!-- Portions (C) International Organization for Standardization 1986:

+     Permission to copy in any form is granted for use with

+     conforming SGML systems and applications as defined in

+     ISO 8879, provided this notice is included in all copies.

+-->

+

+<!-- Relevant ISO entity set is given unless names are newly introduced.

+     New names (i.e., not in ISO 8879 list) do not clash with any

+     existing ISO 8879 entity names. ISO 10646 character numbers

+     are given for each character, in hex. values are decimal

+     conversions of the ISO 10646 values and refer to the document

+     character set. Names are Unicode names. 

+-->

+

+<!-- C0 Controls and Basic Latin -->

+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->

+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->

+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->

+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->

+<!ENTITY apos	 "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->

+

+<!-- Latin Extended-A -->

+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,

+                                    U+0152 ISOlat2 -->

+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->

+<!-- ligature is a misnomer, this is a separate character in some languages -->

+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,

+                                    U+0160 ISOlat2 -->

+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,

+                                    U+0161 ISOlat2 -->

+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,

+                                    U+0178 ISOlat2 -->

+

+<!-- Spacing Modifier Letters -->

+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,

+                                    U+02C6 ISOpub -->

+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->

+

+<!-- General Punctuation -->

+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->

+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->

+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->

+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,

+                                    U+200C NEW RFC 2070 -->

+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->

+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->

+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->

+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->

+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->

+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,

+                                    U+2018 ISOnum -->

+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,

+                                    U+2019 ISOnum -->

+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->

+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,

+                                    U+201C ISOnum -->

+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,

+                                    U+201D ISOnum -->

+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->

+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->

+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->

+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->

+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,

+                                    U+2039 ISO proposed -->

+<!-- lsaquo is proposed but not yet ISO standardized -->

+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,

+                                    U+203A ISO proposed -->

+<!-- rsaquo is proposed but not yet ISO standardized -->

+

+<!-- Currency Symbols -->

+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->

diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml-symbol.ent b/lib/dtds/xhtml/html2dita/dtd/xhtml-symbol.ent
new file mode 100644
index 0000000..3f8f8e6
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->

+

+<!-- Character entity set. Typical invocation:

+     <!ENTITY % HTMLsymbol PUBLIC

+        "-//W3C//ENTITIES Symbols for XHTML//EN"

+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">

+     %HTMLsymbol;

+-->

+

+<!-- Portions (C) International Organization for Standardization 1986:

+     Permission to copy in any form is granted for use with

+     conforming SGML systems and applications as defined in

+     ISO 8879, provided this notice is included in all copies.

+-->

+

+<!-- Relevant ISO entity set is given unless names are newly introduced.

+     New names (i.e., not in ISO 8879 list) do not clash with any

+     existing ISO 8879 entity names. ISO 10646 character numbers

+     are given for each character, in hex. values are decimal

+     conversions of the ISO 10646 values and refer to the document

+     character set. Names are Unicode names. 

+-->

+

+<!-- Latin Extended-B -->

+<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function

+                                    = florin, U+0192 ISOtech -->

+

+<!-- Greek -->

+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->

+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->

+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,

+                                    U+0393 ISOgrk3 -->

+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,

+                                    U+0394 ISOgrk3 -->

+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->

+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->

+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->

+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,

+                                    U+0398 ISOgrk3 -->

+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->

+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->

+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,

+                                    U+039B ISOgrk3 -->

+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->

+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->

+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->

+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->

+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->

+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->

+<!-- there is no Sigmaf, and no U+03A2 character either -->

+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,

+                                    U+03A3 ISOgrk3 -->

+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->

+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,

+                                    U+03A5 ISOgrk3 -->

+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,

+                                    U+03A6 ISOgrk3 -->

+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->

+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,

+                                    U+03A8 ISOgrk3 -->

+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,

+                                    U+03A9 ISOgrk3 -->

+

+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,

+                                    U+03B1 ISOgrk3 -->

+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->

+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,

+                                    U+03B3 ISOgrk3 -->

+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,

+                                    U+03B4 ISOgrk3 -->

+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,

+                                    U+03B5 ISOgrk3 -->

+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->

+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->

+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,

+                                    U+03B8 ISOgrk3 -->

+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->

+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,

+                                    U+03BA ISOgrk3 -->

+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,

+                                    U+03BB ISOgrk3 -->

+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->

+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->

+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->

+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->

+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->

+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->

+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,

+                                    U+03C2 ISOgrk3 -->

+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,

+                                    U+03C3 ISOgrk3 -->

+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->

+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,

+                                    U+03C5 ISOgrk3 -->

+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->

+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->

+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->

+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,

+                                    U+03C9 ISOgrk3 -->

+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,

+                                    U+03D1 NEW -->

+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,

+                                    U+03D2 NEW -->

+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->

+

+<!-- General Punctuation -->

+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,

+                                     U+2022 ISOpub  -->

+<!-- bullet is NOT the same as bullet operator, U+2219 -->

+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,

+                                     U+2026 ISOpub  -->

+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->

+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,

+                                     U+2033 ISOtech -->

+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,

+                                     U+203E NEW -->

+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->

+

+<!-- Letterlike Symbols -->

+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set

+                                     = Weierstrass p, U+2118 ISOamso -->

+<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,

+                                     U+2111 ISOamso -->

+<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,

+                                     U+211C ISOamso -->

+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->

+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,

+                                     U+2135 NEW -->

+<!-- alef symbol is NOT the same as hebrew letter alef,

+     U+05D0 although the same glyph could be used to depict both characters -->

+

+<!-- Arrows -->

+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->

+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->

+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->

+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->

+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->

+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards

+                                     = carriage return, U+21B5 NEW -->

+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->

+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow

+    but also does not have any other character for that function. So lArr can

+    be used for 'is implied by' as ISOtech suggests -->

+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->

+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,

+                                     U+21D2 ISOtech -->

+<!-- Unicode does not say this is the 'implies' character but does not have 

+     another character with this function so rArr can be used for 'implies'

+     as ISOtech suggests -->

+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->

+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,

+                                     U+21D4 ISOamsa -->

+

+<!-- Mathematical Operators -->

+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->

+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->

+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->

+<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->

+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,

+                                     U+2207 ISOtech -->

+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->

+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->

+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->

+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,

+                                     U+220F ISOamsb -->

+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though

+     the same glyph might be used for both -->

+<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->

+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'

+     though the same glyph might be used for both -->

+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->

+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->

+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,

+                                     U+221A ISOtech -->

+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->

+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->

+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->

+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->

+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->

+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->

+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->

+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->

+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->

+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,

+                                     U+223C ISOtech -->

+<!-- tilde operator is NOT the same character as the tilde, U+007E,

+     although the same glyph might be used to represent both  -->

+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->

+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,

+                                     U+2248 ISOamsr -->

+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->

+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->

+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->

+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,

+                                     U+2265 ISOtech -->

+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->

+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->

+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->

+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->

+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,

+                                     U+2287 ISOtech -->

+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,

+                                     U+2295 ISOamsb -->

+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,

+                                     U+2297 ISOamsb -->

+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,

+                                     U+22A5 ISOtech -->

+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->

+<!-- dot operator is NOT the same character as U+00B7 middle dot -->

+

+<!-- Miscellaneous Technical -->

+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,

+                                     U+2308 ISOamsc  -->

+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->

+<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,

+                                     U+230A ISOamsc  -->

+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->

+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,

+                                     U+2329 ISOtech -->

+<!-- lang is NOT the same character as U+003C 'less than sign' 

+     or U+2039 'single left-pointing angle quotation mark' -->

+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,

+                                     U+232A ISOtech -->

+<!-- rang is NOT the same character as U+003E 'greater than sign' 

+     or U+203A 'single right-pointing angle quotation mark' -->

+

+<!-- Geometric Shapes -->

+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->

+

+<!-- Miscellaneous Symbols -->

+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->

+<!-- black here seems to mean filled as opposed to hollow -->

+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,

+                                     U+2663 ISOpub -->

+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,

+                                     U+2665 ISOpub -->

+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->

diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml1-frameset.dtd b/lib/dtds/xhtml/html2dita/dtd/xhtml1-frameset.dtd
new file mode 100644
index 0000000..4e09bc5
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml1-frameset.dtd
@@ -0,0 +1,1235 @@
+<!--

+   Extensible HTML version 1.0 Frameset DTD

+

+   This is the same as HTML 4 Frameset except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"

+

+   $Revision: 1.2 $

+   $Date: 2010/12/09 10:20:36 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+

+<!ENTITY % ContentType "CDATA">

+    <!-- media type, as per [RFC2045] -->

+

+<!ENTITY % ContentTypes "CDATA">

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+

+<!ENTITY % Charset "CDATA">

+    <!-- a character encoding, as per [RFC2045] -->

+

+<!ENTITY % Charsets "CDATA">

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+

+<!ENTITY % LanguageCode "NMTOKEN">

+    <!-- a language code, as per [RFC3066] -->

+

+<!ENTITY % Character "CDATA">

+    <!-- a single character, as per section 2.2 of [XML] -->

+

+<!ENTITY % Number "CDATA">

+    <!-- one or more digits -->

+

+<!ENTITY % LinkTypes "CDATA">

+    <!-- space-separated list of link types -->

+

+<!ENTITY % MediaDesc "CDATA">

+    <!-- single or comma-separated list of media descriptors -->

+

+<!ENTITY % URI "CDATA">

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+

+<!ENTITY % UriList "CDATA">

+    <!-- a space separated list of Uniform Resource Identifiers -->

+

+<!ENTITY % Datetime "CDATA">

+    <!-- date and time information. ISO date format -->

+

+<!ENTITY % Script "CDATA">

+    <!-- script expression -->

+

+<!ENTITY % StyleSheet "CDATA">

+    <!-- style sheet data -->

+

+<!ENTITY % Text "CDATA">

+    <!-- used for titles etc. -->

+

+<!ENTITY % FrameTarget "NMTOKEN">

+    <!-- render in this frame -->

+

+<!ENTITY % Length "CDATA">

+    <!-- nn for pixels or nn% for percentage length -->

+

+<!ENTITY % MultiLength "CDATA">

+    <!-- pixel, percentage, or relative -->

+

+<!ENTITY % MultiLengths "CDATA">

+    <!-- comma-separated list of MultiLength -->

+

+<!ENTITY % Pixels "CDATA">

+    <!-- integer representing length in pixels -->

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+<!ENTITY % Coords "CDATA">

+    <!-- comma separated list of lengths -->

+

+<!-- used for object, applet, img, input and iframe -->

+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">

+

+<!-- a color using sRGB: #RRGGBB as Hex values -->

+<!ENTITY % Color "CDATA">

+

+<!-- There are also 16 widely known color names with their sRGB values:

+

+    Black  = #000000    Green  = #008000

+    Silver = #C0C0C0    Lime   = #00FF00

+    Gray   = #808080    Olive  = #808000

+    White  = #FFFFFF    Yellow = #FFFF00

+    Maroon = #800000    Navy   = #000080

+    Red    = #FF0000    Blue   = #0000FF

+    Purple = #800080    Teal   = #008080

+    Fuchsia= #FF00FF    Aqua   = #00FFFF

+-->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!-- text alignment for p, div, h1-h6. The default is

+     align="left" for ltr headings, "right" for rtl -->

+

+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.extra

+   "object | applet | img | map | iframe">

+	

+<!ENTITY % special.basic

+	"br | span | bdo">

+

+<!ENTITY % special

+   "%special.basic; | %special.extra;">

+

+<!ENTITY % fontstyle.extra "big | small | font | basefont">

+

+<!ENTITY % fontstyle.basic "tt | i | b | u

+                      | s | strike ">

+

+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">

+

+<!ENTITY % phrase.extra "sub | sup">

+<!ENTITY % phrase.basic "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym">

+

+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl | menu | dir">

+<!ENTITY % blocktext "pre | hr | blockquote | address | center">

+

+<!ENTITY % block

+    "p | %heading; | div | %lists; | %blocktext; | isindex | fieldset | table">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding img, object, applet, big, small,

+     sub, sup, font, or basefont -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |

+	   %inline.forms; | %misc.inline;)*">

+

+

+<!-- form uses %Flow; excluding form -->

+

+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+      table | br | span | bdo | object | applet | img | map |

+      %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+<!-- the namespace URI designates the document profile -->

+

+<!ELEMENT html (head, frameset)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">

+

+<!-- content model is %head.misc; combined with a single

+     title and an optional base element in any order -->

+

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!-- The title element is not considered part of the flow of text.

+       It should be displayed, for example as the page header or

+       window title. Exactly one title is required per document.

+    -->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+<!-- document base URI -->

+

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  id          ID             #IMPLIED

+  href        %URI;          #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!-- generic metainformation -->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--

+  Relationship values can be used in principle:

+

+   a) for document specific toolbars/menus when used

+      with the link element in document head e.g.

+        start, contents, previous, next, index, end, help

+   b) to link to a separate style sheet (rel="stylesheet")

+   c) to make a link to a script (rel="script")

+   d) by stylesheets to control how collections of

+      html nodes are rendered into printed documents

+   e) to make a link to a printable version of this document

+      e.g. a PostScript or PDF version (rel="alternate" media="print")

+-->

+

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!-- style info, which may include CDATA sections -->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- script statements, which may include CDATA sections -->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  language    CDATA          #IMPLIED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- alternate content container for non script-based rendering -->

+

+<!ELEMENT noscript %Flow;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--======================= Frames =======================================-->

+

+<!-- only one noframes element permitted per document -->

+

+<!ELEMENT frameset (frameset|frame|noframes)*>

+<!ATTLIST frameset

+  %coreattrs;

+  rows        %MultiLengths; #IMPLIED

+  cols        %MultiLengths; #IMPLIED

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  >

+

+<!-- reserved frame names start with "_" otherwise starts with letter -->

+

+<!-- tiled window within frameset -->

+

+<!ELEMENT frame EMPTY>

+<!ATTLIST frame

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  noresize    (noresize)     #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  >

+

+<!-- inline subwindow -->

+

+<!ELEMENT iframe %Flow;>

+<!ATTLIST iframe

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  align       %ImgAlign;     #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!-- alternate content container for non frame-based rendering -->

+

+<!ELEMENT noframes (body)>

+<!ATTLIST noframes

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+

+<!ELEMENT body %Flow;>

+<!ATTLIST body

+  %attrs;

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  background  %URI;          #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  text        %Color;        #IMPLIED

+  link        %Color;        #IMPLIED

+  vlink       %Color;        #IMPLIED

+  alink       %Color;        #IMPLIED

+  >

+

+<!ELEMENT div %Flow;>  <!-- generic language/style container -->

+<!ATTLIST div

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Paragraphs =======================================-->

+

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Headings =========================================-->

+

+<!--

+  There are six levels of headings from h1 (the most important)

+  to h6 (the least important).

+-->

+

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Lists ============================================-->

+

+<!-- Unordered list bullet styles -->

+

+<!ENTITY % ULStyle "(disc|square|circle)">

+

+<!-- Unordered list -->

+

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  type        %ULStyle;     #IMPLIED

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- Ordered list numbering style

+

+    1   arabic numbers      1, 2, 3, ...

+    a   lower alpha         a, b, c, ...

+    A   upper alpha         A, B, C, ...

+    i   lower roman         i, ii, iii, ...

+    I   upper roman         I, II, III, ...

+

+    The style is applied to the sequence number which by default

+    is reset to 1 for the first list item in an ordered list.

+-->

+<!ENTITY % OLStyle "CDATA">

+

+<!-- Ordered (numbered) list -->

+

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  type        %OLStyle;      #IMPLIED

+  compact     (compact)      #IMPLIED

+  start       %Number;       #IMPLIED

+  >

+

+<!-- single column list (DEPRECATED) --> 

+<!ELEMENT menu (li)+>

+<!ATTLIST menu

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- multiple column list (DEPRECATED) --> 

+<!ELEMENT dir (li)+>

+<!ATTLIST dir

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->

+<!ENTITY % LIStyle "CDATA">

+

+<!-- list item -->

+

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  type        %LIStyle;      #IMPLIED

+  value       %Number;       #IMPLIED

+  >

+

+<!-- definition lists - dt for term, dd for its definition -->

+

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  compact     (compact)      #IMPLIED

+  >

+

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!-- information on author -->

+

+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  align       (left|center|right) #IMPLIED

+  noshade     (noshade)      #IMPLIED

+  size        %Pixels;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!-- content is %Inline; excluding 

+        "img|object|applet|big|small|sub|sup|font|basefont" -->

+

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  width       %Number;      #IMPLIED

+  xml:space   (preserve)    #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+

+<!ELEMENT blockquote %Flow;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Text alignment ===================================-->

+

+<!-- center content -->

+<!ELEMENT center %Flow;>

+<!ATTLIST center

+  %attrs;

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+

+<!--

+  ins/del are allowed in block and inline content, but its

+  inappropriate to include block content within an ins element

+  occurring in inline content.

+-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+<!-- content is %Inline; except that anchors shouldn't be nested -->

+

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!ELEMENT span %Inline;> <!-- generic language/style container -->

+<!ATTLIST span

+  %attrs;

+  >

+

+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!ELEMENT br EMPTY>   <!-- forced line break -->

+<!ATTLIST br

+  %coreattrs;

+  clear       (left|all|right|none) "none"

+  >

+

+<!ELEMENT em %Inline;>   <!-- emphasis -->

+<!ATTLIST em %attrs;>

+

+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->

+<!ATTLIST strong %attrs;>

+

+<!ELEMENT dfn %Inline;>   <!-- definitional -->

+<!ATTLIST dfn %attrs;>

+

+<!ELEMENT code %Inline;>   <!-- program code -->

+<!ATTLIST code %attrs;>

+

+<!ELEMENT samp %Inline;>   <!-- sample -->

+<!ATTLIST samp %attrs;>

+

+<!ELEMENT kbd %Inline;>  <!-- something user would type -->

+<!ATTLIST kbd %attrs;>

+

+<!ELEMENT var %Inline;>   <!-- variable -->

+<!ATTLIST var %attrs;>

+

+<!ELEMENT cite %Inline;>   <!-- citation -->

+<!ATTLIST cite %attrs;>

+

+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->

+<!ATTLIST abbr %attrs;>

+

+<!ELEMENT acronym %Inline;>   <!-- acronym -->

+<!ATTLIST acronym %attrs;>

+

+<!ELEMENT q %Inline;>   <!-- inlined quote -->

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!ELEMENT sub %Inline;> <!-- subscript -->

+<!ATTLIST sub %attrs;>

+

+<!ELEMENT sup %Inline;> <!-- superscript -->

+<!ATTLIST sup %attrs;>

+

+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->

+<!ATTLIST tt %attrs;>

+

+<!ELEMENT i %Inline;>   <!-- italic font -->

+<!ATTLIST i %attrs;>

+

+<!ELEMENT b %Inline;>   <!-- bold font -->

+<!ATTLIST b %attrs;>

+

+<!ELEMENT big %Inline;>   <!-- bigger font -->

+<!ATTLIST big %attrs;>

+

+<!ELEMENT small %Inline;>   <!-- smaller font -->

+<!ATTLIST small %attrs;>

+

+<!ELEMENT u %Inline;>   <!-- underline -->

+<!ATTLIST u %attrs;>

+

+<!ELEMENT s %Inline;>   <!-- strike-through -->

+<!ATTLIST s %attrs;>

+

+<!ELEMENT strike %Inline;>   <!-- strike-through -->

+<!ATTLIST strike %attrs;>

+

+<!ELEMENT basefont EMPTY>  <!-- base font size -->

+<!ATTLIST basefont

+  id          ID             #IMPLIED

+  size        CDATA          #REQUIRED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!ELEMENT font %Inline;> <!-- local change to font -->

+<!ATTLIST font

+  %coreattrs;

+  %i18n;

+  size        CDATA          #IMPLIED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--==================== Object ======================================-->

+<!--

+  object is used to embed objects as part of HTML pages.

+  param elements should precede other content. Parameters

+  can also be expressed as attribute/value pairs on the

+  object element itself when brevity is desired.

+-->

+

+<!ELEMENT object (#PCDATA | param | %block; | form |%inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--

+  param is used to supply a named property value.

+  In XML it would seem natural to follow RDF and support an

+  abbreviated syntax where the param elements are replaced

+  by attribute value pairs on the object start tag.

+-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #REQUIRED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--=================== Java applet ==================================-->

+<!--

+  One of code or object attributes must be present.

+  Place param elements before other content.

+-->

+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST applet

+  %coreattrs;

+  codebase    %URI;          #IMPLIED

+  archive     CDATA          #IMPLIED

+  code        CDATA          #IMPLIED

+  object      CDATA          #IMPLIED

+  alt         %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  width       %Length;       #REQUIRED

+  height      %Length;       #REQUIRED

+  align       %ImgAlign;     #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+<!--

+   To avoid accessibility problems for people who aren't

+   able to see the image, you should provide a text

+   description using the alt and longdesc attributes.

+   In addition, avoid the use of server-side image maps.

+-->

+

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  name        NMTOKEN        #IMPLIED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document

+  or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+<!-- These can be placed in the same document or grouped in a

+     separate document although this isn't yet widely supported -->

+

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  >

+

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--================ Forms ===============================================-->

+

+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  name        NMTOKEN        #IMPLIED

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--

+  Each label must not contain more than ONE field

+  Label elements shouldn't be nested.

+-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+

+<!-- the name attribute is required for all but submit & reset -->

+

+<!ELEMENT input EMPTY>     <!-- form control -->

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  >

+

+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!ELEMENT optgroup (option)+>   <!-- option group -->

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--

+  The fieldset element is used to group form fields.

+  Only one legend element should occur in the content

+  and if present should only be preceded by whitespace.

+-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!ENTITY % LAlign "(top|bottom|left|right)">

+

+<!ELEMENT legend %Inline;>     <!-- fieldset label -->

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  align       %LAlign;       #IMPLIED

+  >

+

+<!--

+ Content is %Flow; excluding a, form, form controls, iframe

+--> 

+<!ELEMENT button %button.content;>  <!-- push button -->

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!-- single-line text input control (DEPRECATED) -->

+<!ELEMENT isindex EMPTY>

+<!ATTLIST isindex

+  %coreattrs;

+  %i18n;

+  prompt      %Text;         #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the

+ table. The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around

+ the table should be rendered. The values are not the same as

+ CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal placement of table relative to document -->

+<!ENTITY % TAlign "(left|center|right)">

+

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=":"

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!ELEMENT caption  %Inline;>

+<!ELEMENT thead    (tr)+>

+<!ELEMENT tfoot    (tr)+>

+<!ELEMENT tbody    (tr)+>

+<!ELEMENT colgroup (col)*>

+<!ELEMENT col      EMPTY>

+<!ELEMENT tr       (th|td)+>

+<!ELEMENT th       %Flow;>

+<!ELEMENT td       %Flow;>

+

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  align       %TAlign;       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!ENTITY % CAlign "(top|bottom|left|right)">

+

+<!ATTLIST caption

+  %attrs;

+  align       %CAlign;       #IMPLIED

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Pixels;       #IMPLIED

+  height      %Pixels;       #IMPLIED

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Pixels;       #IMPLIED

+  height      %Pixels;       #IMPLIED

+  >

+

diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml1-strict.dtd b/lib/dtds/xhtml/html2dita/dtd/xhtml1-strict.dtd
new file mode 100644
index 0000000..984532c
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml1-strict.dtd
@@ -0,0 +1,978 @@
+<!--

+   Extensible HTML version 1.0 Strict DTD

+

+   This is the same as HTML 4 Strict except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

+

+   $Revision: 1.2 $

+   $Date: 2010/12/09 10:20:36 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+

+<!ENTITY % ContentType "CDATA">

+    <!-- media type, as per [RFC2045] -->

+

+<!ENTITY % ContentTypes "CDATA">

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+

+<!ENTITY % Charset "CDATA">

+    <!-- a character encoding, as per [RFC2045] -->

+

+<!ENTITY % Charsets "CDATA">

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+

+<!ENTITY % LanguageCode "NMTOKEN">

+    <!-- a language code, as per [RFC3066] -->

+

+<!ENTITY % Character "CDATA">

+    <!-- a single character, as per section 2.2 of [XML] -->

+

+<!ENTITY % Number "CDATA">

+    <!-- one or more digits -->

+

+<!ENTITY % LinkTypes "CDATA">

+    <!-- space-separated list of link types -->

+

+<!ENTITY % MediaDesc "CDATA">

+    <!-- single or comma-separated list of media descriptors -->

+

+<!ENTITY % URI "CDATA">

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+

+<!ENTITY % UriList "CDATA">

+    <!-- a space separated list of Uniform Resource Identifiers -->

+

+<!ENTITY % Datetime "CDATA">

+    <!-- date and time information. ISO date format -->

+

+<!ENTITY % Script "CDATA">

+    <!-- script expression -->

+

+<!ENTITY % StyleSheet "CDATA">

+    <!-- style sheet data -->

+

+<!ENTITY % Text "CDATA">

+    <!-- used for titles etc. -->

+

+<!ENTITY % Length "CDATA">

+    <!-- nn for pixels or nn% for percentage length -->

+

+<!ENTITY % MultiLength "CDATA">

+    <!-- pixel, percentage, or relative -->

+

+<!ENTITY % Pixels "CDATA">

+    <!-- integer representing length in pixels -->

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+<!ENTITY % Coords "CDATA">

+    <!-- comma separated list of lengths -->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.pre

+   "br | span | bdo | map">

+

+

+<!ENTITY % special

+   "%special.pre; | object | img ">

+

+<!ENTITY % fontstyle "tt | i | b | big | small ">

+

+<!ENTITY % phrase "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym | sub | sup ">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl">

+<!ENTITY % blocktext "pre | hr | blockquote | address">

+

+<!ENTITY % block

+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">

+

+<!ENTITY % Block "(%block; | form | %misc;)*">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding big, small, sup or sup -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;

+      | %inline.forms;)*">

+

+<!-- form uses %Block; excluding form -->

+

+<!ENTITY % form.content "(%block; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form and form controls -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+    table | %special; | %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+<!-- the namespace URI designates the document profile -->

+

+<!ELEMENT html (head, body)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object)*">

+

+<!-- content model is %head.misc; combined with a single

+     title and an optional base element in any order -->

+

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!-- The title element is not considered part of the flow of text.

+       It should be displayed, for example as the page header or

+       window title. Exactly one title is required per document.

+    -->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+<!-- document base URI -->

+

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  href        %URI;          #REQUIRED

+  id          ID             #IMPLIED

+  >

+

+<!-- generic metainformation -->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--

+  Relationship values can be used in principle:

+

+   a) for document specific toolbars/menus when used

+      with the link element in document head e.g.

+        start, contents, previous, next, index, end, help

+   b) to link to a separate style sheet (rel="stylesheet")

+   c) to make a link to a script (rel="script")

+   d) by stylesheets to control how collections of

+      html nodes are rendered into printed documents

+   e) to make a link to a printable version of this document

+      e.g. a PostScript or PDF version (rel="alternate" media="print")

+-->

+

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  >

+

+<!-- style info, which may include CDATA sections -->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- script statements, which may include CDATA sections -->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- alternate content container for non script-based rendering -->

+

+<!ELEMENT noscript %Block;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+

+<!ELEMENT body %Block;>

+<!ATTLIST body

+  %attrs;

+  onload          %Script;   #IMPLIED

+  onunload        %Script;   #IMPLIED

+  >

+

+<!ELEMENT div %Flow;>  <!-- generic language/style container -->

+<!ATTLIST div

+  %attrs;

+  >

+

+<!--=================== Paragraphs =======================================-->

+

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  >

+

+<!--=================== Headings =========================================-->

+

+<!--

+  There are six levels of headings from h1 (the most important)

+  to h6 (the least important).

+-->

+

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+   %attrs;

+   >

+

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+   %attrs;

+   >

+

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+   %attrs;

+   >

+

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+   %attrs;

+   >

+

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+   %attrs;

+   >

+

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+   %attrs;

+   >

+

+<!--=================== Lists ============================================-->

+

+<!-- Unordered list -->

+

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  >

+

+<!-- Ordered (numbered) list -->

+

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  >

+

+<!-- list item -->

+

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  >

+

+<!-- definition lists - dt for term, dd for its definition -->

+

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  >

+

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!-- information on author -->

+

+<!ELEMENT address %Inline;>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->

+

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  xml:space (preserve) #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+

+<!ELEMENT blockquote %Block;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+<!--

+  ins/del are allowed in block and inline content, but its

+  inappropriate to include block content within an ins element

+  occurring in inline content.

+-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+<!-- content is %Inline; except that anchors shouldn't be nested -->

+

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!ELEMENT span %Inline;> <!-- generic language/style container -->

+<!ATTLIST span

+  %attrs;

+  >

+

+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!ELEMENT br EMPTY>   <!-- forced line break -->

+<!ATTLIST br

+  %coreattrs;

+  >

+

+<!ELEMENT em %Inline;>   <!-- emphasis -->

+<!ATTLIST em %attrs;>

+

+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->

+<!ATTLIST strong %attrs;>

+

+<!ELEMENT dfn %Inline;>   <!-- definitional -->

+<!ATTLIST dfn %attrs;>

+

+<!ELEMENT code %Inline;>   <!-- program code -->

+<!ATTLIST code %attrs;>

+

+<!ELEMENT samp %Inline;>   <!-- sample -->

+<!ATTLIST samp %attrs;>

+

+<!ELEMENT kbd %Inline;>  <!-- something user would type -->

+<!ATTLIST kbd %attrs;>

+

+<!ELEMENT var %Inline;>   <!-- variable -->

+<!ATTLIST var %attrs;>

+

+<!ELEMENT cite %Inline;>   <!-- citation -->

+<!ATTLIST cite %attrs;>

+

+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->

+<!ATTLIST abbr %attrs;>

+

+<!ELEMENT acronym %Inline;>   <!-- acronym -->

+<!ATTLIST acronym %attrs;>

+

+<!ELEMENT q %Inline;>   <!-- inlined quote -->

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!ELEMENT sub %Inline;> <!-- subscript -->

+<!ATTLIST sub %attrs;>

+

+<!ELEMENT sup %Inline;> <!-- superscript -->

+<!ATTLIST sup %attrs;>

+

+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->

+<!ATTLIST tt %attrs;>

+

+<!ELEMENT i %Inline;>   <!-- italic font -->

+<!ATTLIST i %attrs;>

+

+<!ELEMENT b %Inline;>   <!-- bold font -->

+<!ATTLIST b %attrs;>

+

+<!ELEMENT big %Inline;>   <!-- bigger font -->

+<!ATTLIST big %attrs;>

+

+<!ELEMENT small %Inline;>   <!-- smaller font -->

+<!ATTLIST small %attrs;>

+

+<!--==================== Object ======================================-->

+<!--

+  object is used to embed objects as part of HTML pages.

+  param elements should precede other content. Parameters

+  can also be expressed as attribute/value pairs on the

+  object element itself when brevity is desired.

+-->

+

+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  >

+

+<!--

+  param is used to supply a named property value.

+  In XML it would seem natural to follow RDF and support an

+  abbreviated syntax where the param elements are replaced

+  by attribute value pairs on the object start tag.

+-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+<!--

+   To avoid accessibility problems for people who aren't

+   able to see the image, you should provide a text

+   description using the alt and longdesc attributes.

+   In addition, avoid the use of server-side image maps.

+   Note that in this DTD there is no name attribute. That

+   is only available in the transitional and frameset DTD.

+-->

+

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document

+  or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+<!-- These can be placed in the same document or grouped in a

+     separate document although this isn't yet widely supported -->

+

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  >

+

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  >

+

+<!--================ Forms ===============================================-->

+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  >

+

+<!--

+  Each label must not contain more than ONE field

+  Label elements shouldn't be nested.

+-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+

+<!-- the name attribute is required for all but submit & reset -->

+

+<!ELEMENT input EMPTY>     <!-- form control -->

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  >

+

+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!ELEMENT optgroup (option)+>   <!-- option group -->

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--

+  The fieldset element is used to group form fields.

+  Only one legend element should occur in the content

+  and if present should only be preceded by whitespace.

+-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!ELEMENT legend %Inline;>     <!-- fieldset label -->

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  >

+

+<!--

+ Content is %Flow; excluding a, form and form controls

+--> 

+<!ELEMENT button %button.content;>  <!-- push button -->

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the

+ table. The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around

+ the table should be rendered. The values are not the same as

+ CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=':'

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!ELEMENT caption  %Inline;>

+<!ELEMENT thead    (tr)+>

+<!ELEMENT tfoot    (tr)+>

+<!ELEMENT tbody    (tr)+>

+<!ELEMENT colgroup (col)*>

+<!ELEMENT col      EMPTY>

+<!ELEMENT tr       (th|td)+>

+<!ELEMENT th       %Flow;>

+<!ELEMENT td       %Flow;>

+

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  >

+

+<!ATTLIST caption

+  %attrs;

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  >

+

diff --git a/lib/dtds/xhtml/html2dita/dtd/xhtml1-transitional.dtd b/lib/dtds/xhtml/html2dita/dtd/xhtml1-transitional.dtd
new file mode 100644
index 0000000..b80359a
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/dtd/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--

+   Extensible HTML version 1.0 Transitional DTD

+

+   This is the same as HTML 4 Transitional except for

+   changes due to the differences between XML and SGML.

+

+   Namespace = http://www.w3.org/1999/xhtml

+

+   For further information, see: http://www.w3.org/TR/xhtml1

+

+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),

+   All Rights Reserved. 

+

+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:

+

+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

+

+   $Revision: 1.2 $

+   $Date: 2010/12/09 10:20:36 $

+

+-->

+

+<!--================ Character mnemonic entities =========================-->

+

+<!ENTITY % HTMLlat1 PUBLIC

+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"

+   "xhtml-lat1.ent">

+%HTMLlat1;

+

+<!ENTITY % HTMLsymbol PUBLIC

+   "-//W3C//ENTITIES Symbols for XHTML//EN"

+   "xhtml-symbol.ent">

+%HTMLsymbol;

+

+<!ENTITY % HTMLspecial PUBLIC

+   "-//W3C//ENTITIES Special for XHTML//EN"

+   "xhtml-special.ent">

+%HTMLspecial;

+

+<!--================== Imported Names ====================================-->

+

+<!ENTITY % ContentType "CDATA">

+    <!-- media type, as per [RFC2045] -->

+

+<!ENTITY % ContentTypes "CDATA">

+    <!-- comma-separated list of media types, as per [RFC2045] -->

+

+<!ENTITY % Charset "CDATA">

+    <!-- a character encoding, as per [RFC2045] -->

+

+<!ENTITY % Charsets "CDATA">

+    <!-- a space separated list of character encodings, as per [RFC2045] -->

+

+<!ENTITY % LanguageCode "NMTOKEN">

+    <!-- a language code, as per [RFC3066] -->

+

+<!ENTITY % Character "CDATA">

+    <!-- a single character, as per section 2.2 of [XML] -->

+

+<!ENTITY % Number "CDATA">

+    <!-- one or more digits -->

+

+<!ENTITY % LinkTypes "CDATA">

+    <!-- space-separated list of link types -->

+

+<!ENTITY % MediaDesc "CDATA">

+    <!-- single or comma-separated list of media descriptors -->

+

+<!ENTITY % URI "CDATA">

+    <!-- a Uniform Resource Identifier, see [RFC2396] -->

+

+<!ENTITY % UriList "CDATA">

+    <!-- a space separated list of Uniform Resource Identifiers -->

+

+<!ENTITY % Datetime "CDATA">

+    <!-- date and time information. ISO date format -->

+

+<!ENTITY % Script "CDATA">

+    <!-- script expression -->

+

+<!ENTITY % StyleSheet "CDATA">

+    <!-- style sheet data -->

+

+<!ENTITY % Text "CDATA">

+    <!-- used for titles etc. -->

+

+<!ENTITY % FrameTarget "NMTOKEN">

+    <!-- render in this frame -->

+

+<!ENTITY % Length "CDATA">

+    <!-- nn for pixels or nn% for percentage length -->

+

+<!ENTITY % MultiLength "CDATA">

+    <!-- pixel, percentage, or relative -->

+

+<!ENTITY % Pixels "CDATA">

+    <!-- integer representing length in pixels -->

+

+<!-- these are used for image maps -->

+

+<!ENTITY % Shape "(rect|circle|poly|default)">

+

+<!ENTITY % Coords "CDATA">

+    <!-- comma separated list of lengths -->

+

+<!-- used for object, applet, img, input and iframe -->

+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">

+

+<!-- a color using sRGB: #RRGGBB as Hex values -->

+<!ENTITY % Color "CDATA">

+

+<!-- There are also 16 widely known color names with their sRGB values:

+

+    Black  = #000000    Green  = #008000

+    Silver = #C0C0C0    Lime   = #00FF00

+    Gray   = #808080    Olive  = #808000

+    White  = #FFFFFF    Yellow = #FFFF00

+    Maroon = #800000    Navy   = #000080

+    Red    = #FF0000    Blue   = #0000FF

+    Purple = #800080    Teal   = #008080

+    Fuchsia= #FF00FF    Aqua   = #00FFFF

+-->

+

+<!--=================== Generic Attributes ===============================-->

+

+<!-- core attributes common to most elements

+  id       document-wide unique id

+  class    space separated list of classes

+  style    associated style info

+  title    advisory title/amplification

+-->

+<!ENTITY % coreattrs

+ "id          ID             #IMPLIED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED"

+  >

+

+<!-- internationalization attributes

+  lang        language code (backwards compatible)

+  xml:lang    language code (as per XML 1.0 spec)

+  dir         direction for weak/neutral text

+-->

+<!ENTITY % i18n

+ "lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #IMPLIED"

+  >

+

+<!-- attributes for common UI events

+  onclick     a pointer button was clicked

+  ondblclick  a pointer button was double clicked

+  onmousedown a pointer button was pressed down

+  onmouseup   a pointer button was released

+  onmousemove a pointer was moved onto the element

+  onmouseout  a pointer was moved away from the element

+  onkeypress  a key was pressed and released

+  onkeydown   a key was pressed down

+  onkeyup     a key was released

+-->

+<!ENTITY % events

+ "onclick     %Script;       #IMPLIED

+  ondblclick  %Script;       #IMPLIED

+  onmousedown %Script;       #IMPLIED

+  onmouseup   %Script;       #IMPLIED

+  onmouseover %Script;       #IMPLIED

+  onmousemove %Script;       #IMPLIED

+  onmouseout  %Script;       #IMPLIED

+  onkeypress  %Script;       #IMPLIED

+  onkeydown   %Script;       #IMPLIED

+  onkeyup     %Script;       #IMPLIED"

+  >

+

+<!-- attributes for elements that can get the focus

+  accesskey   accessibility key character

+  tabindex    position in tabbing order

+  onfocus     the element got the focus

+  onblur      the element lost the focus

+-->

+<!ENTITY % focus

+ "accesskey   %Character;    #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED"

+  >

+

+<!ENTITY % attrs "%coreattrs; %i18n; %events;">

+

+<!-- text alignment for p, div, h1-h6. The default is

+     align="left" for ltr headings, "right" for rtl -->

+

+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">

+

+<!--=================== Text Elements ====================================-->

+

+<!ENTITY % special.extra

+   "object | applet | img | map | iframe">

+	

+<!ENTITY % special.basic

+	"br | span | bdo">

+

+<!ENTITY % special

+   "%special.basic; | %special.extra;">

+

+<!ENTITY % fontstyle.extra "big | small | font | basefont">

+

+<!ENTITY % fontstyle.basic "tt | i | b | u

+                      | s | strike ">

+

+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">

+

+<!ENTITY % phrase.extra "sub | sup">

+<!ENTITY % phrase.basic "em | strong | dfn | code | q |

+                   samp | kbd | var | cite | abbr | acronym">

+

+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">

+

+<!ENTITY % inline.forms "input | select | textarea | label | button">

+

+<!-- these can occur at block or inline level -->

+<!ENTITY % misc.inline "ins | del | script">

+

+<!-- these can only occur at block level -->

+<!ENTITY % misc "noscript | %misc.inline;">

+

+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">

+

+<!-- %Inline; covers inline or "text-level" elements -->

+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

+

+<!--================== Block level elements ==============================-->

+

+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">

+<!ENTITY % lists "ul | ol | dl | menu | dir">

+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">

+

+<!ENTITY % block

+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">

+

+<!-- %Flow; mixes block and inline and is used for list items etc. -->

+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">

+

+<!--================== Content models for exclusions =====================-->

+

+<!-- a elements use %Inline; excluding a -->

+

+<!ENTITY % a.content

+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">

+

+<!-- pre uses %Inline excluding img, object, applet, big, small,

+     font, or basefont -->

+

+<!ENTITY % pre.content

+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |

+	   %inline.forms; | %misc.inline;)*">

+

+<!-- form uses %Flow; excluding form -->

+

+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">

+

+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->

+

+<!ENTITY % button.content

+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |

+      table | br | span | bdo | object | applet | img | map |

+      %fontstyle; | %phrase; | %misc;)*">

+

+<!--================ Document Structure ==================================-->

+

+<!-- the namespace URI designates the document profile -->

+

+<!ELEMENT html (head, body)>

+<!ATTLIST html

+  %i18n;

+  id          ID             #IMPLIED

+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'

+  >

+

+<!--================ Document Head =======================================-->

+

+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">

+

+<!-- content model is %head.misc; combined with a single

+     title and an optional base element in any order -->

+

+<!ELEMENT head (%head.misc;,

+     ((title, %head.misc;, (base, %head.misc;)?) |

+      (base, %head.misc;, (title, %head.misc;))))>

+

+<!ATTLIST head

+  %i18n;

+  id          ID             #IMPLIED

+  profile     %URI;          #IMPLIED

+  >

+

+<!-- The title element is not considered part of the flow of text.

+       It should be displayed, for example as the page header or

+       window title. Exactly one title is required per document.

+    -->

+<!ELEMENT title (#PCDATA)>

+<!ATTLIST title 

+  %i18n;

+  id          ID             #IMPLIED

+  >

+

+<!-- document base URI -->

+

+<!ELEMENT base EMPTY>

+<!ATTLIST base

+  id          ID             #IMPLIED

+  href        %URI;          #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!-- generic metainformation -->

+<!ELEMENT meta EMPTY>

+<!ATTLIST meta

+  %i18n;

+  id          ID             #IMPLIED

+  http-equiv  CDATA          #IMPLIED

+  name        CDATA          #IMPLIED

+  content     CDATA          #REQUIRED

+  scheme      CDATA          #IMPLIED

+  >

+

+<!--

+  Relationship values can be used in principle:

+

+   a) for document specific toolbars/menus when used

+      with the link element in document head e.g.

+        start, contents, previous, next, index, end, help

+   b) to link to a separate style sheet (rel="stylesheet")

+   c) to make a link to a script (rel="script")

+   d) by stylesheets to control how collections of

+      html nodes are rendered into printed documents

+   e) to make a link to a printable version of this document

+      e.g. a PostScript or PDF version (rel="alternate" media="print")

+-->

+

+<!ELEMENT link EMPTY>

+<!ATTLIST link

+  %attrs;

+  charset     %Charset;      #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  type        %ContentType;  #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  media       %MediaDesc;    #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!-- style info, which may include CDATA sections -->

+<!ELEMENT style (#PCDATA)>

+<!ATTLIST style

+  %i18n;

+  id          ID             #IMPLIED

+  type        %ContentType;  #REQUIRED

+  media       %MediaDesc;    #IMPLIED

+  title       %Text;         #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- script statements, which may include CDATA sections -->

+<!ELEMENT script (#PCDATA)>

+<!ATTLIST script

+  id          ID             #IMPLIED

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #REQUIRED

+  language    CDATA          #IMPLIED

+  src         %URI;          #IMPLIED

+  defer       (defer)        #IMPLIED

+  xml:space   (preserve)     #FIXED 'preserve'

+  >

+

+<!-- alternate content container for non script-based rendering -->

+

+<!ELEMENT noscript %Flow;>

+<!ATTLIST noscript

+  %attrs;

+  >

+

+<!--======================= Frames =======================================-->

+

+<!-- inline subwindow -->

+

+<!ELEMENT iframe %Flow;>

+<!ATTLIST iframe

+  %coreattrs;

+  longdesc    %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  src         %URI;          #IMPLIED

+  frameborder (1|0)          "1"

+  marginwidth %Pixels;       #IMPLIED

+  marginheight %Pixels;      #IMPLIED

+  scrolling   (yes|no|auto)  "auto"

+  align       %ImgAlign;     #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!-- alternate content container for non frame-based rendering -->

+

+<!ELEMENT noframes %Flow;>

+<!ATTLIST noframes

+  %attrs;

+  >

+

+<!--=================== Document Body ====================================-->

+

+<!ELEMENT body %Flow;>

+<!ATTLIST body

+  %attrs;

+  onload      %Script;       #IMPLIED

+  onunload    %Script;       #IMPLIED

+  background  %URI;          #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  text        %Color;        #IMPLIED

+  link        %Color;        #IMPLIED

+  vlink       %Color;        #IMPLIED

+  alink       %Color;        #IMPLIED

+  >

+

+<!ELEMENT div %Flow;>  <!-- generic language/style container -->

+<!ATTLIST div

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Paragraphs =======================================-->

+

+<!ELEMENT p %Inline;>

+<!ATTLIST p

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Headings =========================================-->

+

+<!--

+  There are six levels of headings from h1 (the most important)

+  to h6 (the least important).

+-->

+

+<!ELEMENT h1  %Inline;>

+<!ATTLIST h1

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h2 %Inline;>

+<!ATTLIST h2

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h3 %Inline;>

+<!ATTLIST h3

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h4 %Inline;>

+<!ATTLIST h4

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h5 %Inline;>

+<!ATTLIST h5

+  %attrs;

+  %TextAlign;

+  >

+

+<!ELEMENT h6 %Inline;>

+<!ATTLIST h6

+  %attrs;

+  %TextAlign;

+  >

+

+<!--=================== Lists ============================================-->

+

+<!-- Unordered list bullet styles -->

+

+<!ENTITY % ULStyle "(disc|square|circle)">

+

+<!-- Unordered list -->

+

+<!ELEMENT ul (li)+>

+<!ATTLIST ul

+  %attrs;

+  type        %ULStyle;     #IMPLIED

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- Ordered list numbering style

+

+    1   arabic numbers      1, 2, 3, ...

+    a   lower alpha         a, b, c, ...

+    A   upper alpha         A, B, C, ...

+    i   lower roman         i, ii, iii, ...

+    I   upper roman         I, II, III, ...

+

+    The style is applied to the sequence number which by default

+    is reset to 1 for the first list item in an ordered list.

+-->

+<!ENTITY % OLStyle "CDATA">

+

+<!-- Ordered (numbered) list -->

+

+<!ELEMENT ol (li)+>

+<!ATTLIST ol

+  %attrs;

+  type        %OLStyle;      #IMPLIED

+  compact     (compact)      #IMPLIED

+  start       %Number;       #IMPLIED

+  >

+

+<!-- single column list (DEPRECATED) --> 

+<!ELEMENT menu (li)+>

+<!ATTLIST menu

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- multiple column list (DEPRECATED) --> 

+<!ELEMENT dir (li)+>

+<!ATTLIST dir

+  %attrs;

+  compact     (compact)     #IMPLIED

+  >

+

+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->

+<!ENTITY % LIStyle "CDATA">

+

+<!-- list item -->

+

+<!ELEMENT li %Flow;>

+<!ATTLIST li

+  %attrs;

+  type        %LIStyle;      #IMPLIED

+  value       %Number;       #IMPLIED

+  >

+

+<!-- definition lists - dt for term, dd for its definition -->

+

+<!ELEMENT dl (dt|dd)+>

+<!ATTLIST dl

+  %attrs;

+  compact     (compact)      #IMPLIED

+  >

+

+<!ELEMENT dt %Inline;>

+<!ATTLIST dt

+  %attrs;

+  >

+

+<!ELEMENT dd %Flow;>

+<!ATTLIST dd

+  %attrs;

+  >

+

+<!--=================== Address ==========================================-->

+

+<!-- information on author -->

+

+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>

+<!ATTLIST address

+  %attrs;

+  >

+

+<!--=================== Horizontal Rule ==================================-->

+

+<!ELEMENT hr EMPTY>

+<!ATTLIST hr

+  %attrs;

+  align       (left|center|right) #IMPLIED

+  noshade     (noshade)      #IMPLIED

+  size        %Pixels;       #IMPLIED

+  width       %Length;       #IMPLIED

+  >

+

+<!--=================== Preformatted Text ================================-->

+

+<!-- content is %Inline; excluding 

+        "img|object|applet|big|small|sub|sup|font|basefont" -->

+

+<!ELEMENT pre %pre.content;>

+<!ATTLIST pre

+  %attrs;

+  width       %Number;      #IMPLIED

+  xml:space   (preserve)    #FIXED 'preserve'

+  >

+

+<!--=================== Block-like Quotes ================================-->

+

+<!ELEMENT blockquote %Flow;>

+<!ATTLIST blockquote

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!--=================== Text alignment ===================================-->

+

+<!-- center content -->

+<!ELEMENT center %Flow;>

+<!ATTLIST center

+  %attrs;

+  >

+

+<!--=================== Inserted/Deleted Text ============================-->

+

+<!--

+  ins/del are allowed in block and inline content, but its

+  inappropriate to include block content within an ins element

+  occurring in inline content.

+-->

+<!ELEMENT ins %Flow;>

+<!ATTLIST ins

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!ELEMENT del %Flow;>

+<!ATTLIST del

+  %attrs;

+  cite        %URI;          #IMPLIED

+  datetime    %Datetime;     #IMPLIED

+  >

+

+<!--================== The Anchor Element ================================-->

+

+<!-- content is %Inline; except that anchors shouldn't be nested -->

+

+<!ELEMENT a %a.content;>

+<!ATTLIST a

+  %attrs;

+  %focus;

+  charset     %Charset;      #IMPLIED

+  type        %ContentType;  #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  href        %URI;          #IMPLIED

+  hreflang    %LanguageCode; #IMPLIED

+  rel         %LinkTypes;    #IMPLIED

+  rev         %LinkTypes;    #IMPLIED

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--===================== Inline Elements ================================-->

+

+<!ELEMENT span %Inline;> <!-- generic language/style container -->

+<!ATTLIST span

+  %attrs;

+  >

+

+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->

+<!ATTLIST bdo

+  %coreattrs;

+  %events;

+  lang        %LanguageCode; #IMPLIED

+  xml:lang    %LanguageCode; #IMPLIED

+  dir         (ltr|rtl)      #REQUIRED

+  >

+

+<!ELEMENT br EMPTY>   <!-- forced line break -->

+<!ATTLIST br

+  %coreattrs;

+  clear       (left|all|right|none) "none"

+  >

+

+<!ELEMENT em %Inline;>   <!-- emphasis -->

+<!ATTLIST em %attrs;>

+

+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->

+<!ATTLIST strong %attrs;>

+

+<!ELEMENT dfn %Inline;>   <!-- definitional -->

+<!ATTLIST dfn %attrs;>

+

+<!ELEMENT code %Inline;>   <!-- program code -->

+<!ATTLIST code %attrs;>

+

+<!ELEMENT samp %Inline;>   <!-- sample -->

+<!ATTLIST samp %attrs;>

+

+<!ELEMENT kbd %Inline;>  <!-- something user would type -->

+<!ATTLIST kbd %attrs;>

+

+<!ELEMENT var %Inline;>   <!-- variable -->

+<!ATTLIST var %attrs;>

+

+<!ELEMENT cite %Inline;>   <!-- citation -->

+<!ATTLIST cite %attrs;>

+

+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->

+<!ATTLIST abbr %attrs;>

+

+<!ELEMENT acronym %Inline;>   <!-- acronym -->

+<!ATTLIST acronym %attrs;>

+

+<!ELEMENT q %Inline;>   <!-- inlined quote -->

+<!ATTLIST q

+  %attrs;

+  cite        %URI;          #IMPLIED

+  >

+

+<!ELEMENT sub %Inline;> <!-- subscript -->

+<!ATTLIST sub %attrs;>

+

+<!ELEMENT sup %Inline;> <!-- superscript -->

+<!ATTLIST sup %attrs;>

+

+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->

+<!ATTLIST tt %attrs;>

+

+<!ELEMENT i %Inline;>   <!-- italic font -->

+<!ATTLIST i %attrs;>

+

+<!ELEMENT b %Inline;>   <!-- bold font -->

+<!ATTLIST b %attrs;>

+

+<!ELEMENT big %Inline;>   <!-- bigger font -->

+<!ATTLIST big %attrs;>

+

+<!ELEMENT small %Inline;>   <!-- smaller font -->

+<!ATTLIST small %attrs;>

+

+<!ELEMENT u %Inline;>   <!-- underline -->

+<!ATTLIST u %attrs;>

+

+<!ELEMENT s %Inline;>   <!-- strike-through -->

+<!ATTLIST s %attrs;>

+

+<!ELEMENT strike %Inline;>   <!-- strike-through -->

+<!ATTLIST strike %attrs;>

+

+<!ELEMENT basefont EMPTY>  <!-- base font size -->

+<!ATTLIST basefont

+  id          ID             #IMPLIED

+  size        CDATA          #REQUIRED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!ELEMENT font %Inline;> <!-- local change to font -->

+<!ATTLIST font

+  %coreattrs;

+  %i18n;

+  size        CDATA          #IMPLIED

+  color       %Color;        #IMPLIED

+  face        CDATA          #IMPLIED

+  >

+

+<!--==================== Object ======================================-->

+<!--

+  object is used to embed objects as part of HTML pages.

+  param elements should precede other content. Parameters

+  can also be expressed as attribute/value pairs on the

+  object element itself when brevity is desired.

+-->

+

+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST object

+  %attrs;

+  declare     (declare)      #IMPLIED

+  classid     %URI;          #IMPLIED

+  codebase    %URI;          #IMPLIED

+  data        %URI;          #IMPLIED

+  type        %ContentType;  #IMPLIED

+  codetype    %ContentType;  #IMPLIED

+  archive     %UriList;      #IMPLIED

+  standby     %Text;         #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Pixels;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--

+  param is used to supply a named property value.

+  In XML it would seem natural to follow RDF and support an

+  abbreviated syntax where the param elements are replaced

+  by attribute value pairs on the object start tag.

+-->

+<!ELEMENT param EMPTY>

+<!ATTLIST param

+  id          ID             #IMPLIED

+  name        CDATA          #REQUIRED

+  value       CDATA          #IMPLIED

+  valuetype   (data|ref|object) "data"

+  type        %ContentType;  #IMPLIED

+  >

+

+<!--=================== Java applet ==================================-->

+<!--

+  One of code or object attributes must be present.

+  Place param elements before other content.

+-->

+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>

+<!ATTLIST applet

+  %coreattrs;

+  codebase    %URI;          #IMPLIED

+  archive     CDATA          #IMPLIED

+  code        CDATA          #IMPLIED

+  object      CDATA          #IMPLIED

+  alt         %Text;         #IMPLIED

+  name        NMTOKEN        #IMPLIED

+  width       %Length;       #REQUIRED

+  height      %Length;       #REQUIRED

+  align       %ImgAlign;     #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!--=================== Images ===========================================-->

+

+<!--

+   To avoid accessibility problems for people who aren't

+   able to see the image, you should provide a text

+   description using the alt and longdesc attributes.

+   In addition, avoid the use of server-side image maps.

+-->

+

+<!ELEMENT img EMPTY>

+<!ATTLIST img

+  %attrs;

+  src         %URI;          #REQUIRED

+  alt         %Text;         #REQUIRED

+  name        NMTOKEN        #IMPLIED

+  longdesc    %URI;          #IMPLIED

+  height      %Length;       #IMPLIED

+  width       %Length;       #IMPLIED

+  usemap      %URI;          #IMPLIED

+  ismap       (ismap)        #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  border      %Length;       #IMPLIED

+  hspace      %Pixels;       #IMPLIED

+  vspace      %Pixels;       #IMPLIED

+  >

+

+<!-- usemap points to a map element which may be in this document

+  or an external document, although the latter is not widely supported -->

+

+<!--================== Client-side image maps ============================-->

+

+<!-- These can be placed in the same document or grouped in a

+     separate document although this isn't yet widely supported -->

+

+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>

+<!ATTLIST map

+  %i18n;

+  %events;

+  id          ID             #REQUIRED

+  class       CDATA          #IMPLIED

+  style       %StyleSheet;   #IMPLIED

+  title       %Text;         #IMPLIED

+  name        CDATA          #IMPLIED

+  >

+

+<!ELEMENT area EMPTY>

+<!ATTLIST area

+  %attrs;

+  %focus;

+  shape       %Shape;        "rect"

+  coords      %Coords;       #IMPLIED

+  href        %URI;          #IMPLIED

+  nohref      (nohref)       #IMPLIED

+  alt         %Text;         #REQUIRED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--================ Forms ===============================================-->

+

+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->

+

+<!ATTLIST form

+  %attrs;

+  action      %URI;          #REQUIRED

+  method      (get|post)     "get"

+  name        NMTOKEN        #IMPLIED

+  enctype     %ContentType;  "application/x-www-form-urlencoded"

+  onsubmit    %Script;       #IMPLIED

+  onreset     %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  accept-charset %Charsets;  #IMPLIED

+  target      %FrameTarget;  #IMPLIED

+  >

+

+<!--

+  Each label must not contain more than ONE field

+  Label elements shouldn't be nested.

+-->

+<!ELEMENT label %Inline;>

+<!ATTLIST label

+  %attrs;

+  for         IDREF          #IMPLIED

+  accesskey   %Character;    #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  >

+

+<!ENTITY % InputType

+  "(text | password | checkbox |

+    radio | submit | reset |

+    file | hidden | image | button)"

+   >

+

+<!-- the name attribute is required for all but submit & reset -->

+

+<!ELEMENT input EMPTY>     <!-- form control -->

+<!ATTLIST input

+  %attrs;

+  %focus;

+  type        %InputType;    "text"

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  checked     (checked)      #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  size        CDATA          #IMPLIED

+  maxlength   %Number;       #IMPLIED

+  src         %URI;          #IMPLIED

+  alt         CDATA          #IMPLIED

+  usemap      %URI;          #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  accept      %ContentTypes; #IMPLIED

+  align       %ImgAlign;     #IMPLIED

+  >

+

+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->

+<!ATTLIST select

+  %attrs;

+  name        CDATA          #IMPLIED

+  size        %Number;       #IMPLIED

+  multiple    (multiple)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  tabindex    %Number;       #IMPLIED

+  onfocus     %Script;       #IMPLIED

+  onblur      %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!ELEMENT optgroup (option)+>   <!-- option group -->

+<!ATTLIST optgroup

+  %attrs;

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #REQUIRED

+  >

+

+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->

+<!ATTLIST option

+  %attrs;

+  selected    (selected)     #IMPLIED

+  disabled    (disabled)     #IMPLIED

+  label       %Text;         #IMPLIED

+  value       CDATA          #IMPLIED

+  >

+

+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->

+<!ATTLIST textarea

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  rows        %Number;       #REQUIRED

+  cols        %Number;       #REQUIRED

+  disabled    (disabled)     #IMPLIED

+  readonly    (readonly)     #IMPLIED

+  onselect    %Script;       #IMPLIED

+  onchange    %Script;       #IMPLIED

+  >

+

+<!--

+  The fieldset element is used to group form fields.

+  Only one legend element should occur in the content

+  and if present should only be preceded by whitespace.

+-->

+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>

+<!ATTLIST fieldset

+  %attrs;

+  >

+

+<!ENTITY % LAlign "(top|bottom|left|right)">

+

+<!ELEMENT legend %Inline;>     <!-- fieldset label -->

+<!ATTLIST legend

+  %attrs;

+  accesskey   %Character;    #IMPLIED

+  align       %LAlign;       #IMPLIED

+  >

+

+<!--

+ Content is %Flow; excluding a, form, form controls, iframe

+--> 

+<!ELEMENT button %button.content;>  <!-- push button -->

+<!ATTLIST button

+  %attrs;

+  %focus;

+  name        CDATA          #IMPLIED

+  value       CDATA          #IMPLIED

+  type        (button|submit|reset) "submit"

+  disabled    (disabled)     #IMPLIED

+  >

+

+<!-- single-line text input control (DEPRECATED) -->

+<!ELEMENT isindex EMPTY>

+<!ATTLIST isindex

+  %coreattrs;

+  %i18n;

+  prompt      %Text;         #IMPLIED

+  >

+

+<!--======================= Tables =======================================-->

+

+<!-- Derived from IETF HTML table standard, see [RFC1942] -->

+

+<!--

+ The border attribute sets the thickness of the frame around the

+ table. The default units are screen pixels.

+

+ The frame attribute specifies which parts of the frame around

+ the table should be rendered. The values are not the same as

+ CALS to avoid a name clash with the valign attribute.

+-->

+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

+

+<!--

+ The rules attribute defines which rules to draw between cells:

+

+ If rules is absent then assume:

+     "none" if border is absent or border="0" otherwise "all"

+-->

+

+<!ENTITY % TRules "(none | groups | rows | cols | all)">

+  

+<!-- horizontal placement of table relative to document -->

+<!ENTITY % TAlign "(left|center|right)">

+

+<!-- horizontal alignment attributes for cell contents

+

+  char        alignment char, e.g. char=':'

+  charoff     offset for alignment char

+-->

+<!ENTITY % cellhalign

+  "align      (left|center|right|justify|char) #IMPLIED

+   char       %Character;    #IMPLIED

+   charoff    %Length;       #IMPLIED"

+  >

+

+<!-- vertical alignment attributes for cell contents -->

+<!ENTITY % cellvalign

+  "valign     (top|middle|bottom|baseline) #IMPLIED"

+  >

+

+<!ELEMENT table

+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>

+<!ELEMENT caption  %Inline;>

+<!ELEMENT thead    (tr)+>

+<!ELEMENT tfoot    (tr)+>

+<!ELEMENT tbody    (tr)+>

+<!ELEMENT colgroup (col)*>

+<!ELEMENT col      EMPTY>

+<!ELEMENT tr       (th|td)+>

+<!ELEMENT th       %Flow;>

+<!ELEMENT td       %Flow;>

+

+<!ATTLIST table

+  %attrs;

+  summary     %Text;         #IMPLIED

+  width       %Length;       #IMPLIED

+  border      %Pixels;       #IMPLIED

+  frame       %TFrame;       #IMPLIED

+  rules       %TRules;       #IMPLIED

+  cellspacing %Length;       #IMPLIED

+  cellpadding %Length;       #IMPLIED

+  align       %TAlign;       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!ENTITY % CAlign "(top|bottom|left|right)">

+

+<!ATTLIST caption

+  %attrs;

+  align       %CAlign;       #IMPLIED

+  >

+

+<!--

+colgroup groups a set of col elements. It allows you to group

+several semantically related columns together.

+-->

+<!ATTLIST colgroup

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+ col elements define the alignment properties for cells in

+ one or more columns.

+

+ The width attribute specifies the width of the columns, e.g.

+

+     width=64        width in screen pixels

+     width=0.5*      relative width of 0.5

+

+ The span attribute causes the attributes of one

+ col element to apply to more than one column.

+-->

+<!ATTLIST col

+  %attrs;

+  span        %Number;       "1"

+  width       %MultiLength;  #IMPLIED

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!--

+    Use thead to duplicate headers when breaking table

+    across page boundaries, or for static headers when

+    tbody sections are rendered in scrolling panel.

+

+    Use tfoot to duplicate footers when breaking table

+    across page boundaries, or for static footers when

+    tbody sections are rendered in scrolling panel.

+

+    Use multiple tbody sections when rules are needed

+    between groups of table rows.

+-->

+<!ATTLIST thead

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tfoot

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tbody

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  >

+

+<!ATTLIST tr

+  %attrs;

+  %cellhalign;

+  %cellvalign;

+  bgcolor     %Color;        #IMPLIED

+  >

+

+<!-- Scope is simpler than headers attribute for common tables -->

+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">

+

+<!-- th is for headers, td for data and for cells acting as both -->

+

+<!ATTLIST th

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Length;       #IMPLIED

+  height      %Length;       #IMPLIED

+  >

+

+<!ATTLIST td

+  %attrs;

+  abbr        %Text;         #IMPLIED

+  axis        CDATA          #IMPLIED

+  headers     IDREFS         #IMPLIED

+  scope       %Scope;        #IMPLIED

+  rowspan     %Number;       "1"

+  colspan     %Number;       "1"

+  %cellhalign;

+  %cellvalign;

+  nowrap      (nowrap)       #IMPLIED

+  bgcolor     %Color;        #IMPLIED

+  width       %Length;       #IMPLIED

+  height      %Length;       #IMPLIED

+  >

+

diff --git a/lib/dtds/xhtml/html2dita/h2d.xsl b/lib/dtds/xhtml/html2dita/h2d.xsl
new file mode 100644
index 0000000..5a97f6b
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/h2d.xsl
@@ -0,0 +1,1990 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This file is part of the DITA Open Toolkit project hosted on 
+    Sourceforge.net. See the accompanying license.txt file for 
+    applicable licenses.-->
+<!--  h2d.xsl 
+ | Migrate XHTML content into DITA topics
+ |
+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005, 2006. All Rights Reserved.
+ +
+ | Udates:
+ | 2002/06/11 DRD: changed BR trap from PI to comment
+ | 2003/02/13 DRD: removed xhtml: namespace prefix baggage (use tidy's -doctype omit)
+ |                 added support for text nodes in task content pulls
+ |                 added renaming of related-links extensions to ".dita" instead of ".htm(l)"
+ |                 if any name/content metas (except generators), open a prolog and populate metadata
+ | 2003/03/27 DRD: extended meta trap to include "GENERATOR" (uc)
+ |                 added default xml:lang="en-us"
+ |                 added genidattribute to provide single place to generate topic id (needs work)
+ | 2003/03/28 RDA: Place <title> into <searchtitle> instead of <shortdesc>
+ |                 Do not create an XREF for <a> without @href
+ |                 Only create "Collected links" when links exist
+ |                 Do not add links to "Collected links" if they are within this file
+ |                 Add support for @format, @scope, and <desc> inside link
+ |                 Add variables to check for first heading level, to make sections later 
+ | 2003/04/04 RDA: Add FILENAME parameter to determine more unique file IDs
+ | 2003/04/05 RDA: Add support for multi-column tables, and for spanned rows (not yet spanned columns)
+ | 2003/05/07 RDA: Add support for thead, tbody, and caption within tables
+ | 2003/07/17 RDA: Allow underscores to appear in the topic ID, also period and dash if not
+ |                              the first character
+ | 2003/08/21 RDA: Allow spanned columns within tables
+ |                 Allow single paragraphs in table entries, to ignore the <p> tag
+ | 2003/10/07 RDA: Process span classes that were moved by tidy (like class=c1)
+ | 2003/10/13 RDA: Pre-process the HTML, if it contains lists that stop and start
+ | 2004/10/13 RDA: Pass through @compact, plus table/row attributes
+ |                 If a link starts with http:, https:, or ftp:, do not change extension
+ | 2004/11/22 RDA: Update to pass through comments
+ | 2005/01/08 RDA: Revised for external publication
+ | 2006/01/04 RDA: Added various bug fixes, mostly for tables and class attributes
+ |                 Updated public IDs to use the OASIS standard
+ +-->
+
+
+<!-- If you wish to set the doctype manually, you will need to comment out the
+     following 5 lines, and uncomment the xsl:stylesheet lines below. See the 
+     comments before that section for details. -->
+<!--<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+<xsl:output method="xml" indent="no" encoding="utf-8" />
+<xsl:param name="infotype">topic</xsl:param>-->
+
+<!-- If you wish to set the doctype dynamically, you will need to uncomment
+     the following section. The section sets the XSLT version as 1.1, which
+     allows some engines to use variables for system and public IDs.
+     Those variables are set here based on the infotype parameter, or they
+     can be passed in directly from the command line. -->
+<xsl:stylesheet version="1.1" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:saxon="http://icl.com/saxon"
+                extension-element-prefixes="saxon">
+<xsl:param name="infotype">topic</xsl:param>
+  <!-- Output XSLT messages warning various conversion problems + add XML comments in places where the conversion
+  is not perfect-->
+  <xsl:param name="verbose" select="false()"/>
+  <!-- Generate required cleanup elements -->
+  <xsl:param name="generateRequiredCleanup" select="false()"/>
+  <!-- Generate related links at the end of the topic -->
+  <xsl:param name="generateRelatedLinks" select="false()"/>
+  <!-- Convert XHTML metadata to DITA metadata -->
+  <xsl:param name="preserveMetadata" select="false()"/>
+
+<xsl:variable name="systemid">
+    <xsl:choose>
+        <xsl:when test="$infotype='concept'">concept.dtd</xsl:when>  
+        <xsl:when test="$infotype='task'">task.dtd</xsl:when>  
+        <xsl:when test="$infotype='reference'">reference.dtd</xsl:when>
+        <xsl:otherwise>topic.dtd</xsl:otherwise>
+    </xsl:choose>
+</xsl:variable>
+<xsl:variable name="publicid">
+    <xsl:choose>
+        <xsl:when test="$infotype='concept'">-//OASIS//DTD DITA Concept//EN</xsl:when>
+        <xsl:when test="$infotype='task'">-//OASIS//DTD DITA Task//EN</xsl:when>
+        <xsl:when test="$infotype='reference'">-//OASIS//DTD DITA Reference//EN</xsl:when>
+        <xsl:otherwise>-//OASIS//DTD DITA Topic//EN</xsl:otherwise>
+    </xsl:choose>
+</xsl:variable>
+  
+<xsl:output method="xml" indent="yes" encoding="UTF-8" />
+
+<!-- ========== PARAMETERS ============== -->
+
+<!-- what kind of topic to generate?  set up default of 'topic' but allow external override -->
+<!-- sample call: 
+     saxon tasktest.html h2d.xsl infotype=task > tasktest.dita
+  -->
+
+<!-- What extension should be used for links that go to other DITA topics?
+     Assumption is that local HTML targets will be converted to DITA. -->
+<xsl:param name="dita-extension">.dita</xsl:param>
+
+<!-- Create a parameter for the defualt language -->
+<xsl:param name="default-lang">en-us</xsl:param>
+
+<!-- Take the filename as an input parameter to determine the main topic's ID -->
+<xsl:param name="FILENAME">
+    <xsl:choose>
+        <xsl:when test="$infotype='concept' or $infotype='reference' or $infotype='task' or $infotype='topic'">
+            <xsl:value-of select="$infotype"/>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:value-of select="'topic'"/>
+        </xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="string-length()"/>
+    <xsl:value-of select="'.htm'"/>
+</xsl:param>
+
+<!-- Use the FILENAME to determine the ID for the output topic. Invalid ID characters
+     must be removed (replaced with generic D character). If a filename starts with
+     a number, which cannot start an ID, all numbers will be replaced with letters. -->
+<xsl:variable name="filename-id">
+  <xsl:choose>
+    <xsl:when test="starts-with($FILENAME,'0') or starts-with($FILENAME,'1') or
+                    starts-with($FILENAME,'2') or starts-with($FILENAME,'3') or
+                    starts-with($FILENAME,'4') or starts-with($FILENAME,'5') or
+                    starts-with($FILENAME,'6') or starts-with($FILENAME,'7') or
+                    starts-with($FILENAME,'8') or starts-with($FILENAME,'9') or
+                    starts-with($FILENAME,'.') or starts-with($FILENAME,'-')">
+      <xsl:value-of select="translate(substring-before($FILENAME,'.htm'),
+                                      '0123456789.-,!@#$%^()=+[]{}/\;&amp;',
+                                      'ABCDEFGHIJDDDDDDDDDDDDDDDDDDDDDD')"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="translate(substring-before($FILENAME,'.htm'),
+                                      ',!@#$%^()=+[]{}/\;&amp;',
+                                      'DDDDDDDDDDDDDDDDDDDDDD')"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<!-- eliminate whitespace in body as a migration concern -->
+<xsl:strip-space elements="body"/>
+
+<!-- RDA: use the 2 variables below, instead of the 6 starter files -->
+<xsl:variable name="main-head-level">
+  <xsl:choose>
+    <xsl:when test="/html/body/descendant::h1[1][not(preceding::h2|preceding::h3|preceding::h4|preceding::h5|preceding::h6)]">h1</xsl:when>
+    <xsl:when test="/html/body/descendant::h2[1][not(preceding::h3|preceding::h4|preceding::h5|preceding::h6)]">h2</xsl:when>
+    <xsl:when test="/html/body/descendant::h3[1][not(preceding::h4|preceding::h5|preceding::h6)]">h3</xsl:when>
+    <xsl:when test="/html/body/descendant::h4[1][not(preceding::h5|preceding::h6)]">h4</xsl:when>
+    <xsl:when test="/html/body/descendant::h5[1][not(preceding::h6)]">h5</xsl:when>
+    <xsl:when test="/html/body/descendant::h6[1]">h6</xsl:when>
+    <xsl:otherwise>h1</xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<xsl:template name="output-message">
+    <xsl:param name="msg" select="***"/>
+  <xsl:if test="$verbose">
+    <xsl:message><xsl:value-of select="$msg"/></xsl:message>
+  </xsl:if>
+</xsl:template>
+
+<!-- if needed, add the dita wrapper here -->
+<xsl:template match="/">
+ 
+  <!-- oXygen patch --> 
+  <xsl:text disable-output-escaping="yes" xml:space="preserve">
+&lt;!DOCTYPE </xsl:text> <xsl:value-of select="$infotype"/>
+  PUBLIC "<xsl:value-of select="$publicid"/>" "<xsl:value-of select="$systemid"/>" <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <!-- end oXygen patch -->
+  
+  <xsl:call-template name="validate-parameters"/>
+<!-- Some HTML editors store ordered lists as sequential lists, with all but the first
+     using @start to resume numbering. If a topic uses this, the lists will be pulled together.
+     They are placed in a variable that contains a cleaned up version of the original HTML. The
+     standard templates are then used to format the modified HTML. Templates for pre-processing
+     the HTML Are all at the bottom of the file.
+     If there are no lists with abnormal numbering, just start processing. -->
+  <xsl:choose>
+    <xsl:when test="not(//ol[@start])"><xsl:apply-templates select="*|comment()|text()|processing-instruction()"/></xsl:when>
+    <xsl:otherwise>
+      <!-- Process the entire file. Most elements are copied straight into the variable; ordered
+           lists and elements between them are modified slightly. --> 
+      <xsl:variable name="shift-lists">
+        <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+      </xsl:variable>
+      <!-- For some reason, if I do this without a mode, I get a Java overflow error. -->
+      <xsl:apply-templates select="html/preceding-sibling::comment()"/>
+      <xsl:apply-templates select="$shift-lists" mode="redirect"/>
+      <xsl:apply-templates select="html/following-sibling::comment()"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Process the HTML file that was placed in a variable using normal routines. -->
+<xsl:template match="*" mode="redirect">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- general the overall topic container and pull content for it -->
+
+<xsl:template match="*[local-name()='html']">
+  <xsl:choose>
+    <xsl:when test="$infotype='topic'"><xsl:call-template name="gen-topic"/></xsl:when>
+    <xsl:when test="$infotype='concept'"><xsl:call-template name="gen-concept"/></xsl:when>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="gen-task"/></xsl:when>
+    <xsl:when test="$infotype='reference'"><xsl:call-template name="gen-reference"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="gen-topic"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<!-- named templates for various infotyped topic shells -->
+
+<!-- Generic topic template -->
+
+<xsl:template name="gen-topic">
+  <topic xml:lang="{$default-lang}">
+    <xsl:call-template name="genidattribute"/>
+    <xsl:call-template name="gentitle"/>
+    <xsl:call-template name="gentitlealts"/>
+    <xsl:call-template name="genprolog"/>
+    <body>
+      <xsl:apply-templates select="(body/*|body/text()|body/comment())[1]" mode="creating-content-before-section"/>
+      <xsl:choose>
+        <xsl:when test="$main-head-level='h1'">
+          <xsl:apply-templates select="body/h1[preceding-sibling::h1]|body/h2|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h2'">
+          <xsl:apply-templates select="body/h1|body/h2[preceding-sibling::h2]|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h3'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3[preceding-sibling::h3]|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h4'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4[preceding-sibling::h4]|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h5'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4|body/h5[preceding-sibling::h5]|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:otherwise> <!-- Otherwise, level is h6 -->
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4|body/h5|body/h6[preceding-sibling::h6]|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:otherwise>
+      </xsl:choose>
+    </body>
+    <xsl:call-template name="genrellinks"/>
+  </topic>
+</xsl:template>
+
+
+<!-- Implementation note: except for topic, DITA infotypes have content models with strong
+     containment rules.  These implementations try to separate allowed body content from
+     contexts required by the target formats. This may need additional work.  With XHTML 2.0,
+     the tests for contextually introduced containment are eased and these templates can be
+     generalized and possibly made more robust. -->
+
+<!-- Concept topic template -->
+
+<!-- See task for ideas implemented here for separating regular body content from a first heading, which
+     ordinarily denotes one or more sections with NO following text.  We put EVERYTHING after the
+     first h2 into a section as a strong-arm way to enforce the concept model, but users will have
+     to check for intended scoping afterwards. -->
+
+<xsl:template name="gen-concept">
+  <concept xml:lang="{$default-lang}">
+    <xsl:call-template name="genidattribute"/>
+    <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:if>
+    <xsl:call-template name="gentitle"/>
+    <xsl:call-template name="gentitlealts"/>
+    <xsl:call-template name="genprolog"/>
+
+    <conbody>
+      <!-- Anything up to the first heading (except for whatever heading was pulled into <title>) will
+           be processed as it would for a topic. After a heading is encountered, a section will be created
+           for that and all following headings. Content up to the next heading will go into the section. -->
+      <xsl:apply-templates select="(body/*|body/text()|body/comment())[1]" mode="creating-content-before-section"/>
+      <xsl:choose>
+        <xsl:when test="$main-head-level='h1'">
+          <xsl:apply-templates select="body/h1[preceding-sibling::h1]|body/h2|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h2'">
+          <xsl:apply-templates select="body/h1|body/h2[preceding-sibling::h2]|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h3'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3[preceding-sibling::h3]|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h4'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4[preceding-sibling::h4]|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:when test="$main-head-level='h5'">
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4|body/h5[preceding-sibling::h5]|body/h6|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:when>
+        <xsl:otherwise> <!-- Otherwise, level is h6 -->
+          <xsl:apply-templates select="body/h1|body/h2|body/h3|body/h4|body/h5|body/h6[preceding-sibling::h6]|body/h7" mode="create-section-with-following-content"/>                              
+        </xsl:otherwise>
+      </xsl:choose>
+      
+    </conbody>
+    <xsl:call-template name="genrellinks"/>
+  </concept>
+</xsl:template>
+
+<xsl:template match="*|text()|comment()" mode="creating-content-before-section">
+  <xsl:apply-templates select="."/>
+  <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+</xsl:template>
+<xsl:template match="h1|h2|h3|h4|h5|h6" mode="creating-content-before-section">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h1' and self::h1 and not(preceding::h1)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h2' and self::h2 and not(preceding::h2)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h3' and self::h3 and not(preceding::h3)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h4' and self::h4 and not(preceding::h4)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h5' and self::h5 and not(preceding::h5)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h6' and self::h6 and not(preceding::h6)">
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="creating-content-before-section"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Reference topic template -->
+
+<xsl:template name="gen-reference">
+  <reference xml:lang="{$default-lang}">
+    <xsl:call-template name="genidattribute"/>
+    <xsl:call-template name="gentitle"/>
+    <xsl:call-template name="gentitlealts"/>
+    <xsl:call-template name="genprolog"/>
+    <refbody>
+      <!-- Processing is similar to concept, except that everything before the second heading must also be
+           placed into a section. Also, any tables can be outside of the section. -->
+      <xsl:choose>
+        <xsl:when test="$main-head-level='h1'">
+          <!-- First process anything that comes before any subheadings, or a second h1 -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/comment()[not(preceding::table or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/comment()[not(preceding::table or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1[2] or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1[preceding-sibling::h1]|body/h2|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h2'">
+          <!-- First process anything that comes before any subheadings, or a second h2 -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/comment()[not(preceding::table or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/comment()[not(preceding::table or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1 or preceding::h2[2] or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6)]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1|body/h2[preceding-sibling::h2]|body/h3|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h3'">
+          <!-- First process anything that comes before any subheadings, or a second h3 -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1 or preceding::h2 or preceding::h3[2] or preceding::h4 or preceding::h5 or preceding::h6)]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1|body/h2|body/h3[preceding-sibling::h3]|body/h4|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h4'">
+          <!-- First process anything that comes before any subheadings, or a second h4 -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]|
+                        body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]|
+                                           body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4[2] or preceding::h5 or preceding::h6)]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1|body/h2|body/h3|body/h4[preceding-sibling::h4]|body/h5|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:when test="$main-head-level='h5'">
+          <!-- First process anything that comes before any subheadings, or a second h5 -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]|
+                        body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]|
+                                           body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5[2] or preceding::h6)]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1|body/h2|body/h3|body/h4|body/h5[preceding-sibling::h5]|body/h6|body/h7" mode="create-section-with-following-content"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <!-- First process anything that comes before any subheadings, or a second heading -->
+          <xsl:if test="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]|
+                        body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]|
+                        body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                   preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]">
+            <section>
+              <xsl:apply-templates select="body/text()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]|
+                                           body/comment()[not(preceding::table or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]|
+                                           body/*[not(self::table or self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or
+                                                      preceding::table[parent::body] or preceding::h1 or preceding::h2 or preceding::h3 or preceding::h4 or preceding::h5 or preceding::h6[2])]"/>
+            </section>
+          </xsl:if>
+          <!-- Now turn any other headings into sections, with following stuff -->
+          <xsl:apply-templates select="body/table|body/h1|body/h2|body/h3|body/h4|body/h5|body/h6[preceding-sibling::h6]|body/h7" mode="create-section-with-following-content"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </refbody>
+    <xsl:call-template name="genrellinks"/>
+  </reference>
+</xsl:template>
+
+
+<!-- Task topic template -->
+
+<xsl:template name="gen-task">
+  <task xml:lang="{$default-lang}">
+    <xsl:call-template name="genidattribute"/>
+    <xsl:call-template name="gentitle"/>
+    <xsl:call-template name="gentitlealts"/>
+    <xsl:call-template name="genprolog"/>
+    <taskbody>
+      <!--Optional prereq section goes here-->
+
+      <!--context [any child elements with no preceding ol]-->
+      <xsl:if test="body/text()[not(preceding-sibling::ol)]|body/comment()[not(preceding-sibling::ol)]|body/*[not(preceding-sibling::ol)][not(self::ol)]">
+        <context>
+          <xsl:apply-templates select="body/text()[not(preceding-sibling::ol)]|body/comment()[not(preceding-sibling::ol)]|body/*[not(preceding-sibling::ol)][not(self::ol)]"/>
+        </context>
+      </xsl:if>
+
+      <!--steps [first ol within a body = steps!] -->
+      <xsl:if test="body/ol">
+        <steps>
+          <xsl:apply-templates select="body/ol[1]/li|body/ol[1]/comment()" mode="steps"/>
+        </steps>
+      </xsl:if>
+
+      <!--result [any children with a preceding ol]-->
+      <xsl:if test="body/text()[preceding-sibling::ol]|body/comment()[preceding-sibling::ol]|body/*[preceding-sibling::ol]">
+        <result>
+          <xsl:apply-templates select="body/text()[preceding-sibling::ol]|body/comment()[preceding-sibling::ol]|body/*[preceding-sibling::ol]"/>
+        </result>
+      </xsl:if>
+
+      <!--Optional example section-->
+      <!--Optional postreq section-->
+
+    </taskbody>
+    <xsl:call-template name="genrellinks"/>
+  </task>
+</xsl:template>
+
+<!-- this template handle ol/li processing within a task -->
+<!-- The default behavior is to put each <li> into a <step>. If this is being
+     used to create substeps, the $steptype parameter is passed in as "substep".
+     If the <li> does not contain blocklike info, put everything in <cmd>. Otherwise,
+     put everything up to the first block into <cmd>. Everything from the first block
+     on will be placed in substeps (if it is an OL) or in <info> (everything else).  -->
+<xsl:template match="li" mode="steps">
+  <xsl:param name="steptype">step</xsl:param>
+  <xsl:element name="{$steptype}">
+    <xsl:apply-templates select="@class"/>
+    <xsl:choose>
+      <xsl:when test="not(p|div|ol|ul|table|dl|pre)">
+        <cmd><xsl:apply-templates select="*|comment()|text()"/></cmd>
+      </xsl:when>
+      <xsl:otherwise>
+        <cmd><xsl:apply-templates select="(./*|./text())[1]" mode="step-cmd"/></cmd>
+        <xsl:apply-templates select="(p|div|ol|ul|table|dl|pre|comment())[1]" mode="step-child"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:element>
+</xsl:template>
+<xsl:template match="comment()" mode="steps">
+  <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- Add content to a <cmd>. If this is block like, stop iterating and return to the li.
+     Otherwise, output the current node using normal processing, and move to the next
+     text or element node. -->
+<xsl:template match="p|div|ol|ul|table|dl|pre" mode="step-cmd"/>
+<xsl:template match="text()|*" mode="step-cmd">
+  <xsl:apply-templates select="."/>
+  <xsl:apply-templates select="(following-sibling::*|following-sibling::text())[1]" mode="step-cmd"/>
+</xsl:template>
+
+<!-- If an ol is inside a step, convert it to substeps. If it is inside substeps, put it in info.
+     For any other elements, create an info, and output the current node. Also output the
+     following text or element node, which will work up to any <ol>. -->
+<xsl:template match="ol" mode="step-child">
+  <xsl:choose>
+    <!-- If already in substeps -->
+    <xsl:when test="parent::li/parent::ol/parent::li/parent::ol">
+      <info><xsl:apply-templates select="."/></info>
+    </xsl:when>
+    <xsl:otherwise>
+      <substeps>
+        <xsl:apply-templates select="li" mode="steps">
+          <xsl:with-param name="steptype">substep</xsl:with-param>
+        </xsl:apply-templates>
+      </substeps>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates select="(following-sibling::*|following-sibling::text())[1]" mode="step-child"/>
+</xsl:template>
+<xsl:template match="text()|*|comment()" mode="step-child">
+  <xsl:choose>
+    <xsl:when test="self::* or string-length(normalize-space(.))>0">
+      <info>
+        <xsl:apply-templates select="."/>
+        <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-to-info"/>
+      </info>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- Ignore empty text nodes and empty comments, move on to the next node -->
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="step-child"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:apply-templates select="following-sibling::ol[1]" mode="step-child"/>
+</xsl:template>
+
+<!-- When adding to <info>, if an ol is found, stop: it will become substeps, or its own info.
+     Anything else: output the element, and then output the following text or element node,
+     remaining inside <info>. -->
+<xsl:template match="ol" mode="add-to-info"/>
+<xsl:template match="*|text()|comment()" mode="add-to-info">
+    <xsl:apply-templates select="."/>
+    <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-to-info"/>
+</xsl:template>
+
+<!-- Support for generating contextually dependent ID for topics. -->
+<!-- This will need to be improved; no HTML will have an id, so only the
+     otherwise will trigger. Better test: use the filename or first a/@name
+ +-->
+<!-- NOTE: this is only to be used for the topic element -->
+<xsl:template name="genidattribute">
+ <xsl:attribute name="id">
+  <xsl:choose>
+    <xsl:when test="string-length($filename-id)>0"><xsl:value-of select="$filename-id"/></xsl:when>
+    <xsl:when test="/html/@id"><xsl:value-of select="/html/@id"/></xsl:when>
+    <xsl:otherwise><xsl:value-of select="generate-id(/html)"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:attribute>
+</xsl:template>
+
+
+
+<!-- named templates for out of line pulls -->
+
+<!-- 02/12/03 drd: mp says to leave this as linklist, not linkpool, for now -->
+<xsl:template name="genrellinks">
+  <xsl:if test="$generateRelatedLinks">
+<xsl:if test=".//a[@href][not(starts-with(@href,'#'))]">
+<related-links>
+<linklist><title>Collected links</title>
+  <xsl:for-each select=".//a[@href][not(starts-with(@href,'#'))]">
+    <link>
+      <xsl:call-template name="genlinkattrs"/>
+      <linktext><xsl:value-of select="."/></linktext>
+      <xsl:if test="@title">
+        <desc><xsl:value-of select="normalize-space(@title)"/></desc>
+      </xsl:if>
+    </link>
+  </xsl:for-each>
+</linklist>
+</related-links>
+</xsl:if>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="genlinkattrs">
+  <xsl:variable name="newfn">
+    <xsl:value-of select="substring-before(@href,'.htm')"/>
+  </xsl:variable>
+  <xsl:choose>
+    <!-- If the target is a web site, do not change extension to .dita -->
+    <xsl:when test="starts-with(@href,'http:') or starts-with(@href,'https:') or
+                    starts-with(@href,'ftp:')">
+      <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+      <xsl:attribute name="scope">external</xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:choose>
+          <xsl:when test="contains(@href,'.pdf') or contains(@href,'.PDF')">pdf</xsl:when>
+          <xsl:otherwise>html</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="string-length($newfn)>0">
+      <xsl:attribute name="href"><xsl:value-of select="$newfn"/><xsl:value-of select="$dita-extension"/></xsl:attribute>
+    </xsl:when>
+    <xsl:when test="starts-with(@href,'#')">
+      <xsl:variable name="infile-reference">
+        <xsl:text>#</xsl:text>
+        <!-- Need to udpate this if genidattribute changes -->
+        <xsl:choose>
+          <xsl:when test="string-length($filename-id)>0"><xsl:value-of select="$filename-id"/></xsl:when>
+          <xsl:when test="/html/@id"><xsl:value-of select="/html/@id"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="generate-id(/html)"/></xsl:otherwise>
+        </xsl:choose>
+        <xsl:text>/</xsl:text>
+        <xsl:value-of select="substring-after(@href,'#')"/>
+      </xsl:variable>
+      <!-- output-message? -->
+      <xsl:attribute name="href"><xsl:value-of select="$infile-reference"/></xsl:attribute>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+      <xsl:attribute name="format">
+        <xsl:choose>
+          <xsl:when test="contains(@href,'.pdf') or contains(@href,'.PDF')">pdf</xsl:when>
+          <xsl:otherwise>html</xsl:otherwise>  <!-- Default to html -->
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="@target='_blank'">
+    <xsl:attribute name="scope">external</xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- gentitle was here -->
+
+<xsl:template name="genprolog">
+  <xsl:if test="$preserveMetadata">
+    <xsl:if test=".//meta[@name][not(@name='generator' or @name='GENERATOR')]|head/comment()"><!-- produce only if qualifiend meta is extant -->
+      <prolog>
+        <!--xsl:comment>author, copyright, critdates, permissions, publisher, source</xsl:comment-->
+        <metadata>
+          <xsl:apply-templates select="head/comment()"/>
+          <xsl:apply-templates select=".//meta[not(@name='generator' or @name='GENERATOR')]" mode="outofline"/>
+        </metadata>
+      </prolog>
+    </xsl:if>
+  </xsl:if>
+</xsl:template>
+
+
+
+<!-- TBD: do anything rational with scripts or styles in the head? elsewhere? -->
+<!-- 05232002 drd: null out scripts, flat out (script in head was nulled out before, 
+                   but scripts in body were coming through)
+-->
+<xsl:template match="script"/>
+<xsl:template match="style"/>
+
+
+<!-- take out some other interactive, non-content gadgets that are not part of the DITA source model -->
+<!-- TBD: consider adding messages within these -->
+<xsl:template match="textarea"/>
+<xsl:template match="input"/>
+<xsl:template match="isindex"/>
+<xsl:template match="select"/>
+<xsl:template match="optgroup"/>
+<xsl:template match="option"/>
+<xsl:template match="label"/>
+<xsl:template match="fieldset"/>
+<xsl:template match="basefont"/>
+<xsl:template match="col"/>
+<xsl:template match="colgroup"/>
+
+
+
+<!-- ========== Start of heading-aware code =============== -->
+
+
+<!-- Generic treatment for all headings (1-9!).  The main title and section level code -->
+<!-- have higher priorities that override getting triggered by this generic rule. -->
+
+<xsl:template name="cleanup-heading">
+  <xsl:call-template name="output-message">
+      <xsl:with-param name="msg">A <xsl:value-of select="name()"/> heading could not be converted into DITA.
+The heading has been placed in a required-cleanup element.</xsl:with-param>
+  </xsl:call-template>
+  <xsl:variable name="content">
+    <p>
+      <xsl:if test="$generateRequiredCleanup">
+        <b>[deprecated heading <xsl:value-of select="name()"/> ]: </b>
+      </xsl:if>
+      <xsl:apply-templates select="*|comment()|text()"/>
+    </p>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$generateRequiredCleanup">      
+      <required-cleanup>
+        <xsl:copy-of select="$content"/>
+      </required-cleanup>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="h1" priority="5">
+  <xsl:choose>
+    <xsl:when test="not(preceding::h1)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h1'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h2" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h2' and not(preceding::h2)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h1' or $main-head-level='h2'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h3" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h3' and not(preceding::h3)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h2' or $main-head-level='h3'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h4" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h4' and not(preceding::h4)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h3' or $main-head-level='h4'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h5" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h5' and not(preceding::h5)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h4' or $main-head-level='h5'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h6" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h6' and not(preceding::h6)"/>
+    <xsl:when test="$infotype='task'"><xsl:call-template name="cleanup-heading"/></xsl:when>
+    <xsl:when test="$main-head-level='h5' or $main-head-level='h6'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h7" priority="5">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h6'"><xsl:call-template name="gensection"/></xsl:when>
+    <xsl:otherwise><xsl:call-template name="cleanup-heading"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template match="h8|h9">
+  <xsl:call-template name="cleanup-heading"/>
+</xsl:template>
+
+<!-- Templates used to pull content following headings into the generated section -->
+<xsl:template match="h1|h2|h3|h4|h5|h6|h7" mode="add-content-to-section"/>
+<xsl:template match="*|text()|comment()" mode="add-content-to-section">
+  <xsl:choose>
+  <!-- For reference, tables also create a section, so leave them out. Otherwise, they go inside sections. -->
+    <xsl:when test="self::table and $infotype='reference'"/>
+    <xsl:otherwise>
+      <xsl:apply-templates select="."/>
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-content-to-section"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="convert-heading-to-section">
+  <section>
+    <title><xsl:apply-templates select="@class"/><xsl:apply-templates select="*|comment()|text()"/></title>
+    <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-content-to-section"/>
+  </section>
+</xsl:template>
+<xsl:template match="h1|h2|h3|h4|h5|h6|h7" mode="create-section-with-following-content">
+  <xsl:choose>
+    <xsl:when test="$main-head-level='h1' and (self::h1 or self::h2)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h2' and (self::h2 or self::h3)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h3' and (self::h3 or self::h4)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h4' and (self::h4 or self::h5)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h5' and (self::h5 or self::h6)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:when test="$main-head-level='h6' and (self::h6 or self::h7)">
+      <xsl:call-template name="convert-heading-to-section"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="output-message">
+        <xsl:with-param name="msg">A <xsl:value-of select="name()"/> heading could not be converted into DITA.
+The heading has been placed in a required-cleanup element.</xsl:with-param>
+      </xsl:call-template>
+      <section>
+        <xsl:variable name="content">
+          <title><xsl:apply-templates select="@class"/><xsl:apply-templates select="*|text()|comment()"/></title>
+          <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-content-to-section"/>
+        </xsl:variable>
+        <xsl:choose>
+          <xsl:when test="$generateRequiredCleanup">      
+            <required-cleanup>
+              <xsl:copy-of select="$content"/>
+            </required-cleanup>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="$content"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </section>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<!-- The next template can only be called when processing items in the reference body -->
+<xsl:template match="table" mode="create-section-with-following-content">
+  <xsl:apply-templates select="."/>
+  <xsl:if test="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1][not(self::table or self::h2 or self::h3 or self::h4 or self::h5 or self::h6 or self::h7)]">
+    <section>
+      <xsl:apply-templates select="(following-sibling::*|following-sibling::text()|following-sibling::comment())[1]" mode="add-content-to-section"/>
+    </section>
+  </xsl:if>
+</xsl:template>
+
+<!-- Special treatment for headings that occur at a section level -->
+<xsl:template name="gensection">
+  <section>
+    <xsl:variable name="hcnt"><xsl:number/></xsl:variable>
+    <!--<xsl:value-of select="$hcnt"/>-->
+    <title><xsl:apply-templates select="@class"/><xsl:apply-templates select="*|text()|comment()"/></title>
+    <!-- call recursively for subsequent chunks -->
+    <xsl:call-template name="output-message">
+      <xsl:with-param name="msg">A <xsl:value-of select="name()"/> heading was mapped to an empty section.
+Move any content that belongs with that heading into the section.</xsl:with-param>
+    </xsl:call-template>
+  </section>
+</xsl:template>
+
+
+<!-- ========== Start of overrideable heading level code =============== -->
+
+<!-- Default: h1=topic title; h2=section title; all others=bold text -->
+<!-- For plain text pull (no problems with content in headings!), use xsl:value-of -->
+<!-- (ie, if you use xsl:apply-templates select, you might get unwanted elements in title) -->
+<!-- These templates will be overridden by heading-level aware front ends -->
+<!-- Note: The generic heading processor treats all headings as priority=1;
+           priority=2 in this master transform will override the generic heading processor
+           priority=3 in the overrides will override this h1/h2 default setup
+ +--> 
+
+
+<!-- === initially define the defaults for h1/h2 topic/section mappings === -->
+
+<xsl:template name="gentitle">
+  <title>
+    <xsl:choose>
+      <xsl:when test="$main-head-level='h1'"><xsl:value-of select=".//h1[1]"/></xsl:when>
+      <xsl:when test="$main-head-level='h2'"><xsl:value-of select=".//h2[1]"/></xsl:when>
+      <xsl:when test="$main-head-level='h3'"><xsl:value-of select=".//h3[1]"/></xsl:when>
+      <xsl:when test="$main-head-level='h4'"><xsl:value-of select=".//h4[1]"/></xsl:when>
+      <xsl:when test="$main-head-level='h5'"><xsl:value-of select=".//h5[1]"/></xsl:when>
+      <xsl:when test="$main-head-level='h6'"><xsl:value-of select=".//h6[1]"/></xsl:when>
+    </xsl:choose>
+  </title>
+</xsl:template>
+
+<xsl:template name="gentitlealts">
+  <xsl:variable name="create-searchtitle">
+    <xsl:choose>
+      <xsl:when test="not(/html/head/title)">NO</xsl:when>
+      <xsl:when test="$main-head-level='h1' and normalize-space(string(//h1[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:when test="$main-head-level='h2' and normalize-space(string(//h2[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:when test="$main-head-level='h3' and normalize-space(string(//h3[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:when test="$main-head-level='h4' and normalize-space(string(//h4[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:when test="$main-head-level='h5' and normalize-space(string(//h5[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:when test="$main-head-level='h6' and normalize-space(string(//h6[1]))=normalize-space(string(/html/head/title))">NO</xsl:when>
+      <xsl:otherwise>YES</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:if test="$create-searchtitle='YES'">
+    <titlealts>
+      <searchtitle>
+        <xsl:value-of select="/html/head/title"/>
+      </searchtitle>
+    </titlealts>
+  </xsl:if>
+</xsl:template>
+
+<!-- null out some things pulled later -->
+<!--<xsl:template match="h1" priority="2"/>
+
+<xsl:template match="h2" priority="2">
+  <xsl:call-template name="gensection"/>
+</xsl:template> -->
+
+<!-- ========== End of overrideable heading level code =============== -->
+
+
+
+<!-- null out some things pulled later -->
+<xsl:template match="head"/>
+<xsl:template match="title"/>
+
+<!-- Clear up faux "related-links" that are already pulled into collected links:
+      eg, template match="br-with-nothing but imgs, links, and brs after it"-->
+<!-- These rules attempt to leave behind any images or links that are part of a
+     discourse context, and use the rule "br followed by image or anchor" as what
+     to interpret as a hand-built "related links" construct. -->
+<!-- 03/28/2003: Moved <br> processing into a single "br" template -->     
+<!-- 03/28/2003: Removal of <a> does not work, because body overrides; move into
+                 "a" template for now, though it does not work well -->     
+
+<!--eliminate a br following an img or an a element -->
+<!-- <xsl:template match="*[self::br][following-sibling::*[1][self::img|self::a]]"/> -->
+<!--eliminate an a-link preceded by a br-->
+<!--  <xsl:template match="a[@href][preceding-sibling::br]"/> -->
+<!--eliminate an img preceded by a br-->
+<!--  <xsl:template match="img[preceding-sibling::br]"/> -->
+<!--eliminate a final br in a context (usually just for vertical space)-->
+<!-- <xsl:template match="br[name(following-sibling::*)='']"/> -->
+
+<!-- body: fall through, since its contexts (refbody, conbody, etc.) will be
+     generated by templates above -->
+
+<xsl:template match="body">
+  <xsl:apply-templates/>
+</xsl:template>
+
+
+<!-- divs: if we can base transform on a class, do so. -->
+<!-- generic divs will fall through with no associated transform -->
+
+<xsl:template match="div">
+  <xsl:apply-templates select="*|text()|comment()"/>
+</xsl:template>
+
+
+<!-- some characteristics of HTML coming from DocBook tools -->
+<xsl:template match="div[@class='footnote']">
+<lq>
+  <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:if>
+  <xsl:apply-templates select="*|text()|comment()"/>
+</lq>
+</xsl:template>
+
+<!-- this comes from IDWB XHTML output... content that replicates existing structure, therefore null out -->
+<xsl:template match="div[@class='toc']">
+</xsl:template>
+
+
+<!-- map these common elements straight through -->
+<xsl:template match="cite|p|dl|ol|ul|li|pre|sub|sup|b|u|i">
+<xsl:variable name="giname"><xsl:value-of select="name()"/></xsl:variable>
+<xsl:variable name="outgi"><xsl:value-of select="translate($giname,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/></xsl:variable>
+<xsl:element name="{$outgi}">
+  <xsl:if test="@compact and (self::ol|self::ul|self::dl)">
+      <xsl:attribute name="compact">yes</xsl:attribute>
+  </xsl:if>
+  <xsl:apply-templates select="@class"/>
+  <xsl:apply-templates select="*|text()|comment()"/>
+</xsl:element>
+</xsl:template>
+<!-- @outputclass is not allowed on these in DITA, so do not process @class-->
+<!-- @outputclass is now allowed, so move these back into the rule above -->
+<!--<xsl:template match="b|u|i">
+<xsl:variable name="giname"><xsl:value-of select="name()"/></xsl:variable>
+<xsl:variable name="outgi"><xsl:value-of select="translate($giname,'BITU','bitu')"/></xsl:variable>
+<xsl:element name="{$outgi}">
+  <xsl:apply-templates select="*|text()|comment()"/>
+</xsl:element>
+</xsl:template>-->
+
+<xsl:template match="@class">
+  <xsl:attribute name="outputclass"><xsl:value-of select="."/></xsl:attribute>
+</xsl:template>
+
+<!-- empty elements  -->
+
+<!-- This template will return true() if there is nothing left in this topic except
+     a series of related links. Those links will be gathered in the <related-links> section.
+     If this is in the related links, return true(). Otherwise, return false(). 
+     The tests are:
+     If not a child of body, return false (keep this in output)
+     If there are text nodes following, return false
+     If there are no nodes following, return true (part of the links, so drop it)
+     If there are following elements OTHER than br or a, return false
+     Otherwise, this is a br or a at the end -->
+<xsl:template name="only-related-links-remain">
+  <xsl:choose>
+    <xsl:when test="not(parent::body)">false</xsl:when>
+    <xsl:when test="following-sibling::text()">false</xsl:when>
+    <xsl:when test="not(following-sibling::*)">true</xsl:when>
+    <xsl:when test="following-sibling::*[not(self::br or self::a)]">false</xsl:when>
+    <xsl:otherwise>true</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="br">
+  <xsl:variable name="skip-related-links">
+    <xsl:call-template name="only-related-links-remain"/>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$skip-related-links='true'"/>
+    <xsl:when test="following-sibling::*[1][self::img]/following-sibling::*[1][self::br]"/>
+    <xsl:when test="preceding-sibling::*[1][self::img]/preceding-sibling::*[1][self::br]"/>
+    <xsl:when test="following-sibling::text()|following-sibling::*[not(self::a)]">
+      <xsl:call-template name="output-message">
+        <xsl:with-param name="msg">CLEANUP ACTION: Determine the original intent for a BR tag.</xsl:with-param>
+      </xsl:call-template>
+      <xsl:comment>A BR tag was used here in the original source.</xsl:comment>
+    </xsl:when>
+    <xsl:otherwise/> <!-- Skip br if it ends a section, or only has links following -->
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="meta[@name]" mode="outofline">
+  <othermeta name="{@name}" content="{@content}"/>
+</xsl:template>
+
+<xsl:template match="img[@usemap][@src]">
+  <xsl:variable name="mapid"><xsl:value-of select="substring-after(@usemap,'#')"/></xsl:variable>
+  <imagemap>
+    <xsl:apply-templates select="@class"/>
+    <image href="{@src}">
+      <xsl:apply-templates select="@alt"/>
+      </image>
+    <xsl:apply-templates select="//map[@id=$mapid or @name=$mapid]" mode="usemap"/>
+  </imagemap>
+</xsl:template>
+
+<xsl:template match="map"/>
+<xsl:template match="map" mode="usemap">
+  <xsl:apply-templates/>
+</xsl:template>
+<xsl:template match="area">
+  <area>
+      <shape><xsl:value-of select="@shape"/></shape>
+      <coords><xsl:value-of select="@coords"/></coords>
+      <xref>
+          <xsl:call-template name="genlinkattrs"/>
+          <xsl:value-of select="@alt"/>
+      </xref>
+  </area>
+</xsl:template>
+
+<xsl:template match="img">
+      <image href="{@src}">
+        <!-- 03/28/2003 RDA: inline is default, so only worry about break -->
+        <!-- <xsl:if test="name(parent::*)='p'"><xsl:attribute name="placement">inline</xsl:attribute></xsl:if>
+        <xsl:if test="name(parent::*)='li'"><xsl:attribute name="placement">inline</xsl:attribute></xsl:if> -->
+        <xsl:if test="preceding-sibling::*[1][self::br]|following-sibling::*[1][self::br]">
+          <xsl:attribute name="placement">break</xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="@class"/>
+        <xsl:apply-templates select="@alt"/>
+      </image>
+</xsl:template>
+
+<xsl:template match="img/@alt">
+  <alt><xsl:value-of select="."/></alt>
+</xsl:template>
+
+<xsl:template match="hr">
+<xsl:comment> ===================== horizontal rule ===================== </xsl:comment>
+</xsl:template>
+
+
+<!-- renames -->
+
+<xsl:template match="code">
+  <codeph><xsl:apply-templates select="@class|*|text()|comment()"/></codeph>
+</xsl:template>
+
+<xsl:template match="var">
+  <varname><xsl:apply-templates select="@class"/><xsl:value-of select="."/></varname>
+</xsl:template>
+
+<xsl:template match="samp">
+  <systemoutput><xsl:apply-templates select="@class|*|text()|comment()"/></systemoutput>
+</xsl:template>
+
+<xsl:template match="kbd">
+  <userinput><xsl:apply-templates select="@class|*|text()|comment()"/></userinput>
+</xsl:template>
+
+
+<xsl:template match="em">
+  <i><xsl:apply-templates select="@class|*|text()|comment()"/></i>
+</xsl:template>
+
+<xsl:template match="strong">
+  <b><xsl:apply-templates select="@class|*|text()|comment()"/></b>
+</xsl:template>
+
+<xsl:template match="blockquote">
+  <lq><xsl:apply-templates select="@class|*|text()|comment()"/></lq>
+</xsl:template>
+
+<!-- <lq> in <lq> is invalid in DITA, so make it valid (though it is a bit strange) -->
+<xsl:template match="blockquote/blockquote">
+  <p><lq><xsl:apply-templates select="@class|*|text()|comment()"/></lq></p>
+</xsl:template>
+
+<xsl:template match="pre" priority="3">
+  <codeblock><xsl:apply-templates select="@class|*|text()|comment()"/></codeblock>
+</xsl:template>
+
+<!-- assume that these elements are used in tech docs with a semantic intent... -->
+<xsl:template match="tt">
+  <codeph><xsl:apply-templates select="@class|*|text()|comment()"/></codeph>
+</xsl:template>
+
+<xsl:template match="i" priority="3">
+  <varname><xsl:apply-templates select="@class"/><xsl:value-of select="."/></varname>
+</xsl:template>
+
+
+<!-- Linking -->
+
+<!-- May try to eliminate groups of related links at the end; if there is a <br>
+     followed only by links, ignore them, and let the Collected Links get them.
+     Doesn't work now: if a title is entirely a link, it's the last link, so it's ignored... -->
+<xsl:template match="a">
+  <xsl:variable name="skip-related-links">
+    <xsl:call-template name="only-related-links-remain"/>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="@name and $skip-related-links!='true'">
+      <xsl:comment>Removed anchor point <xsl:value-of select="@name"/></xsl:comment>
+    </xsl:when>
+    <xsl:when test="@id and $skip-related-links!='true'">
+      <xsl:comment>Removed anchor point <xsl:value-of select="@id"/></xsl:comment>
+    </xsl:when>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="$skip-related-links='true'"/>
+    <!-- If a heading is a link, do not create an XREF or it will be out of context -->
+    <xsl:when test="parent::h1|parent::h2|parent::h3|parent::h4|parent::h5|parent::h6|parent::h7">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="@href and parent::body">
+          <p><xref>
+            <xsl:call-template name="genlinkattrs"/>
+            <xsl:apply-templates select="@class"/>
+            <xsl:apply-templates select="*|text()|comment()"/>
+          </xref></p>
+        </xsl:when>
+        <xsl:when test="@href">
+          <xref>
+            <xsl:call-template name="genlinkattrs"/>
+            <xsl:apply-templates select="@class"/>
+            <xsl:apply-templates select="*|text()|comment()"/>
+          </xref>
+        </xsl:when>
+        <xsl:when test="parent::body and text()">
+          <p><xsl:apply-templates select="@class"/><xsl:apply-templates select="*|text()|comment()"/></p>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="*|text()|comment()"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<!-- HTML table to CALS table -->
+
+<xsl:template match="td|th" mode="count-cols">
+  <xsl:param name="current-count">1</xsl:param>
+  <xsl:variable name="current-span">
+    <xsl:choose>
+      <xsl:when test="@colspan"><xsl:value-of select="@colspan"/></xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="following-sibling::th or following-sibling::td">
+      <xsl:apply-templates select="(following-sibling::th|following-sibling::td)[1]" mode="count-cols">
+        <xsl:with-param name="current-count"><xsl:value-of select="number($current-span) + number($current-count)"/></xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:when test="@colspan">
+      <xsl:value-of select="number($current-span) + number($current-count) - 1"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$current-count"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+      
+
+<xsl:template match="table">
+<xsl:variable name="cols-in-first-row">
+  <xsl:choose>
+    <xsl:when test="tbody/tr">
+      <xsl:apply-templates select="(tbody[1]/tr[1]/td[1]|tbody[1]/tr[1]/th[1])[1]" mode="count-cols"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="(tr[1]/td[1]|tr[1]/th[1])[1]" mode="count-cols"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+<xsl:variable name="width">
+    <xsl:if test="@width"><xsl:value-of select="substring-before(@width,'%')"/></xsl:if>
+</xsl:variable>
+<xsl:if test="@summary and not(@summary='')">
+    <xsl:comment><xsl:value-of select="@summary"/></xsl:comment>
+    <xsl:call-template name="output-message">
+        <xsl:with-param name="msg">The summary attribute on tables cannot be converted to DITA.
+The attribute's contents were placed in a comment before the table.</xsl:with-param>
+    </xsl:call-template>
+</xsl:if>
+<table>
+    <xsl:apply-templates select="@class"/>
+    <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if>
+    <xsl:choose>
+        <xsl:when test="number($width) &lt; 100"><xsl:attribute name="pgwide">0</xsl:attribute></xsl:when>
+        <xsl:when test="string-length($width)"><xsl:attribute name="pgwide">1</xsl:attribute></xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+        <xsl:when test="@rules='none' and @border='0'">
+            <xsl:attribute name="frame">none</xsl:attribute>
+            <xsl:attribute name="rowsep">0</xsl:attribute>
+            <xsl:attribute name="colsep">0</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="@border='0'">
+            <xsl:attribute name="rowsep">0</xsl:attribute>
+            <xsl:attribute name="colsep">0</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="@rules='cols'">
+            <xsl:attribute name="rowsep">0</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="@rules='rows'">
+            <xsl:attribute name="colsep">0</xsl:attribute>
+        </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="@frame='void'"><xsl:attribute name="frame">none</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='above'"><xsl:attribute name="frame">top</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='below'"><xsl:attribute name="frame">bottom</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='border'"><xsl:attribute name="frame">all</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='box'"><xsl:attribute name="frame">all</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='hsides'"><xsl:attribute name="frame">topbot</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='lhs'"><xsl:attribute name="frame">sides</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='rhs'"><xsl:attribute name="frame">sides</xsl:attribute></xsl:when>
+      <xsl:when test="@frame='vsides'"><xsl:attribute name="frame">sides</xsl:attribute></xsl:when>
+    </xsl:choose>
+
+  <xsl:apply-templates select="caption"/>
+<tgroup>
+<!-- add colspan data here -->
+<xsl:attribute name="cols"><xsl:value-of select="$cols-in-first-row"/></xsl:attribute>
+<xsl:call-template name="create-colspec">
+  <xsl:with-param name="total-cols"><xsl:value-of select="$cols-in-first-row"/></xsl:with-param>
+</xsl:call-template>
+<xsl:choose>
+  <xsl:when test="thead">
+    <thead><xsl:apply-templates select="thead/tr"/></thead>
+  </xsl:when>
+  <xsl:when test="tr[th and not(td)]">
+    <thead><xsl:apply-templates select="tr[th and not(td)]">
+    <!--ideally, do for-each only for rows that contain TH, and place within THEAD;
+        then open up the TBODY for the rest of the rows -->
+    <!-- unforch, all the data will go into one place for now -->
+    </xsl:apply-templates></thead>
+  </xsl:when>
+</xsl:choose>
+<tbody>
+  <xsl:apply-templates select="tbody/tr[*]|tr[td]"/>
+</tbody></tgroup></table>
+</xsl:template>
+
+<xsl:template name="create-colspec">
+  <xsl:param name="total-cols">0</xsl:param>
+  <xsl:param name="on-column">1</xsl:param>
+  <xsl:if test="$on-column &lt;= $total-cols">
+    <colspec>
+      <xsl:attribute name="colname">col<xsl:value-of select="$on-column"/></xsl:attribute>
+      <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if>
+    </colspec>
+    <xsl:call-template name="create-colspec">
+      <xsl:with-param name="total-cols"><xsl:value-of select="$total-cols"/></xsl:with-param>
+      <xsl:with-param name="on-column"><xsl:value-of select="$on-column + 1"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="table/caption">
+  <title><xsl:apply-templates select="@class|*|text()|comment()"/></title>
+</xsl:template>
+
+<xsl:template match="tr">
+<row>
+    <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute></xsl:if>
+    <xsl:apply-templates select="@class"/>
+    <xsl:apply-templates/>
+</row>
+</xsl:template>
+
+<xsl:template match="td|th">
+<entry>
+  <xsl:if test="@rowspan">
+    <xsl:attribute name="morerows"><xsl:value-of select="number(@rowspan)-1"/></xsl:attribute>
+  </xsl:if>
+  <xsl:if test="@colspan">  <!-- Allow entries to span columns -->
+    <xsl:variable name="current-cell"><xsl:call-template name="current-cell-position"/></xsl:variable>
+    <xsl:attribute name="namest">col<xsl:value-of select="$current-cell"/></xsl:attribute>
+    <xsl:attribute name="nameend">col<xsl:value-of select="$current-cell + number(@colspan) - 1"/></xsl:attribute>
+  </xsl:if>
+  <xsl:choose>
+      <xsl:when test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:when>
+      <xsl:when test="../@align"><xsl:attribute name="align"><xsl:value-of select="../@align"/></xsl:attribute></xsl:when>
+  </xsl:choose>
+  <xsl:apply-templates select="@class"/>
+  <xsl:choose>
+    <xsl:when test="table"><p><xsl:apply-templates select="*|text()|comment()"/></p></xsl:when>
+    <xsl:otherwise><xsl:apply-templates select="*|text()|comment()"/></xsl:otherwise>
+  </xsl:choose>
+</entry>
+</xsl:template>
+
+<!-- Determine which column the current entry sits in. Count the current entry,
+     plus every entry before it; take spanned rows and columns into account.
+     If any entries in this table span rows, we must examine the entire table to
+     be sure of the current column. Use mode="find-matrix-column".
+     Otherwise, we just need to examine the current row. Use mode="count-cells". -->
+<xsl:template name="current-cell-position">
+  <xsl:choose>
+    <xsl:when test="parent::tr/parent::thead">
+      <xsl:apply-templates select="(ancestor::table[1]/thead/tr/*[1])[1]"
+                           mode="find-matrix-column">
+        <xsl:with-param name="stop-id"><xsl:value-of select="generate-id(.)"/></xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:when test="ancestor::table[1]//*[@rowspan][1]">
+      <xsl:apply-templates select="(ancestor::table[1]/tbody/tr/*[1]|ancestor::table[1]/tr/*[1])[1]"
+                           mode="find-matrix-column">
+        <xsl:with-param name="stop-id"><xsl:value-of select="generate-id(.)"/></xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:when>
+    <xsl:when test="not(preceding-sibling::td|preceding-sibling::th)">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="(preceding-sibling::th|preceding-sibling::td)[last()]" mode="count-cells"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Count the number of cells in the current row. Move backwards from the test cell. Add one
+     for each entry, plus the number of spanned columns. -->
+<xsl:template match="*" mode="count-cells">
+  <xsl:param name="current-count">1</xsl:param>
+  <xsl:variable name="new-count">
+    <xsl:choose>
+      <xsl:when test="@colspan"><xsl:value-of select="$current-count + number(@colspan)"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="$current-count + 1"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="not(preceding-sibling::td|preceding-sibling::th)"><xsl:value-of select="$new-count"/></xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="(preceding-sibling::th|preceding-sibling::td)[last()]" mode="count-cells">
+        <xsl:with-param name="current-count"><xsl:value-of select="$new-count"/></xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Set up a pseudo-matrix to find the column of the current entry. Start with the first entry
+     in the first row. Progress to the end of the row, then start the next row; go until we find
+     the test cell (with id=$stop-id).
+     If an entry spans rows, add the cells that will be covered to $matrix.
+     If we get to an entry and its position is already filled in $matrix, then the entry is pushed
+     to the side. Add one to the column count and re-try the entry. -->
+<xsl:template match="*" mode="find-matrix-column">
+  <xsl:param name="stop-id"/>
+  <xsl:param name="matrix"/>
+  <xsl:param name="row-count">1</xsl:param>
+  <xsl:param name="col-count">1</xsl:param>
+  <!-- $current-position has the format [1:3] for row 1, col 3. Use to test if this cell is covered. -->
+  <xsl:variable name="current-position">[<xsl:value-of select="$row-count"/>:<xsl:value-of select="$col-count"/>]</xsl:variable>
+  
+  <xsl:choose>
+    <!-- If the current value is already covered, increment the column number and try again. -->
+    <xsl:when test="contains($matrix,$current-position)">
+      <xsl:apply-templates select="." mode="find-matrix-column">
+        <xsl:with-param name="stop-id"><xsl:value-of select="$stop-id"/></xsl:with-param>
+        <xsl:with-param name="matrix"><xsl:value-of select="$matrix"/></xsl:with-param>
+        <xsl:with-param name="row-count"><xsl:value-of select="$row-count"/></xsl:with-param>
+        <xsl:with-param name="col-count"><xsl:value-of select="$col-count + 1"/></xsl:with-param>
+      </xsl:apply-templates>
+    </xsl:when>
+    <!-- If this is the cell we are testing, return the current column number. -->
+    <xsl:when test="generate-id(.)=$stop-id">
+      <xsl:value-of select="$col-count"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- Figure out what the next column value will be. -->
+      <xsl:variable name="next-col-count">
+        <xsl:choose>
+          <xsl:when test="not(following-sibling::*)">1</xsl:when>
+          <xsl:when test="@colspan"><xsl:value-of select="$col-count + number(@colspan) - 1"/></xsl:when>
+          <xsl:otherwise><xsl:value-of select="$col-count + 1"/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <!-- Determine any values that need to be added to the matrix, if this entry spans rows. -->
+      <xsl:variable name="new-matrix-values">
+        <xsl:if test="@rowspan">
+          <xsl:call-template name="add-to-matrix">
+            <xsl:with-param name="start-row"><xsl:value-of select="number($row-count)"/></xsl:with-param>
+            <xsl:with-param name="end-row"><xsl:value-of select="number($row-count) + number(@rowspan) - 1"/></xsl:with-param>
+            <xsl:with-param name="start-col"><xsl:value-of select="number($col-count)"/></xsl:with-param>
+            <xsl:with-param name="end-col">
+              <xsl:choose>
+                <xsl:when test="@colspan"><xsl:value-of select="number($col-count) + number(@colspan) - 1"/></xsl:when>
+                <xsl:otherwise><xsl:value-of select="number($col-count)"/></xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:variable>
+      <xsl:choose>
+        <!-- If there are more entries in this row, move to the next one. -->
+        <xsl:when test="following-sibling::*">
+          <xsl:apply-templates select="following-sibling::*[1]" mode="find-matrix-column">
+            <xsl:with-param name="stop-id"><xsl:value-of select="$stop-id"/></xsl:with-param>
+            <xsl:with-param name="matrix"><xsl:value-of select="$matrix"/><xsl:value-of select="$new-matrix-values"/></xsl:with-param>
+            <xsl:with-param name="row-count"><xsl:value-of select="$row-count"/></xsl:with-param>
+            <xsl:with-param name="col-count"><xsl:value-of select="$next-col-count"/></xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:when>
+        <!-- Otherwise, move to the first entry in the next row. -->
+        <xsl:otherwise>
+          <xsl:apply-templates select="../following-sibling::tr[1]/*[1]" mode="find-matrix-column">
+            <xsl:with-param name="stop-id"><xsl:value-of select="$stop-id"/></xsl:with-param>
+            <xsl:with-param name="matrix"><xsl:value-of select="$matrix"/><xsl:value-of select="$new-matrix-values"/></xsl:with-param>
+            <xsl:with-param name="row-count"><xsl:value-of select="$row-count + 1"/></xsl:with-param>
+            <xsl:with-param name="col-count"><xsl:value-of select="1"/></xsl:with-param>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- This template returns values that must be added to the table matrix. Every cell in the box determined
+     by start-row, end-row, start-col, and end-col will be added. First add every value from the first
+     column. When past $end-row, move to the next column. When past $end-col, every value is added. -->
+<xsl:template name="add-to-matrix">
+  <xsl:param name="start-row"/>       
+  <xsl:param name="end-row"/>
+  <xsl:param name="current-row"><xsl:value-of select="$start-row"/></xsl:param>
+  <xsl:param name="start-col"/>
+  <xsl:param name="end-col"/>
+  <xsl:param name="current-col"><xsl:value-of select="$start-col"/></xsl:param>
+  <xsl:choose>
+    <xsl:when test="$current-col > $end-col"/>   <!-- Out of the box; every value has been added -->
+    <xsl:when test="$current-row > $end-row">    <!-- Finished with this column; move to next -->
+      <xsl:call-template name="add-to-matrix">
+        <xsl:with-param name="start-row"><xsl:value-of select="$start-row"/></xsl:with-param>
+        <xsl:with-param name="end-row"><xsl:value-of select="$end-row"/></xsl:with-param>
+        <xsl:with-param name="current-row"><xsl:value-of select="$start-row"/></xsl:with-param>
+        <xsl:with-param name="start-col"><xsl:value-of select="$start-col"/></xsl:with-param>
+        <xsl:with-param name="end-col"><xsl:value-of select="$end-col"/></xsl:with-param>
+        <xsl:with-param name="current-col"><xsl:value-of select="$current-col + 1"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- Output the value for the current entry -->
+      <xsl:text>[</xsl:text>
+      <xsl:value-of select="$current-row"/>:<xsl:value-of select="$current-col"/>
+      <xsl:text>]</xsl:text>
+      <!-- Move to the next row, in the same column. -->
+      <xsl:call-template name="add-to-matrix">
+        <xsl:with-param name="start-row"><xsl:value-of select="$start-row"/></xsl:with-param>
+        <xsl:with-param name="end-row"><xsl:value-of select="$end-row"/></xsl:with-param>
+        <xsl:with-param name="current-row"><xsl:value-of select="$current-row + 1"/></xsl:with-param>
+        <xsl:with-param name="start-col"><xsl:value-of select="$start-col"/></xsl:with-param>
+        <xsl:with-param name="end-col"><xsl:value-of select="$end-col"/></xsl:with-param>
+        <xsl:with-param name="current-col"><xsl:value-of select="$current-col"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tbody|tfoot|thead">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- If a table entry contains a paragraph, and nothing but a paragraph, do not
+     create the <p> tag in the <entry>. Let everything fall through into <entry>. -->
+<xsl:template match="td/p|th/p">
+  <xsl:choose>
+    <xsl:when test="following-sibling::*|preceding-sibling::*">
+      <p><xsl:apply-templates select="@class|*|text()|comment()"/></p>
+    </xsl:when>
+    <xsl:when test="normalize-space(following-sibling::text()|preceding-sibling::text())=''">
+      <xsl:apply-templates select="*|text()|comment()"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <p><xsl:apply-templates select="@class|*|text()|comment()"/></p>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="span[@class='bold']">
+  <b>
+    <xsl:apply-templates select="*|text()|comment()"/>
+  </b>
+</xsl:template>
+
+<xsl:template match="span[@class='italic']">
+  <i>
+    <xsl:apply-templates select="*|text()|comment()"/>
+  </i>
+</xsl:template>
+
+<xsl:template match="span[@class='bold-italic']">
+  <b><i>
+    <xsl:apply-templates select="*|text()|comment()"/>
+  </i></b>
+</xsl:template>
+
+
+<!-- case of span with no attributes at all -->
+
+<xsl:template match="span[not(string(@*))]">
+  <ph>
+    <xsl:apply-templates select="*|text()|comment()"/>
+  </ph>
+</xsl:template>
+
+<!-- Search for span styles that Tidy moved into /html/head/style
+     Each known value adds something to the return value, such as [b] for bold.
+     The returned value is parsed to determine which wrappers to create.
+     New values can be added here; processing for the new value will need
+     to be merged into the sequential b/i/u/tt processing below. -->
+<xsl:template name="get-span-style">
+  <xsl:variable name="classval"><xsl:value-of select="@class"/></xsl:variable>
+  <xsl:variable name="searchval">span.<xsl:value-of select="$classval"/></xsl:variable>
+  <xsl:variable name="span-style">
+    <xsl:value-of select="substring-before(substring-after(/html/head/style/text(),$searchval),'}')"/>}<xsl:text/>
+  </xsl:variable>
+  <xsl:if test="contains($span-style,'font-weight:bold') or contains($span-style,'font-weight :bold') or
+                contains($span-style,'font-weight: bold') or 
+                contains($span-style,'font-weight : bold')">[b]</xsl:if>
+  <xsl:if test="contains($span-style,'font-style:italic') or contains($span-style,'font-style :italic') or
+                contains($span-style,'font-style: italic') or 
+                contains($span-style,'font-style : italic')">[i]</xsl:if>
+  <xsl:if test="contains($span-style,'text-decoration: underline') or contains($span-style,'text-decoration :underline') or
+                contains($span-style,'text-decoration: underline') or 
+                contains($span-style,'text-decoration : underline')">[u]</xsl:if>
+  <xsl:if test="contains($span-style,'font-family:Courier') or contains($span-style,'font-family :Courier') or
+                contains($span-style,'font-family: Courier') or 
+                contains($span-style,'font-family : Courier')">[tt]</xsl:if>
+  <xsl:if test="contains($span-style,'font-weight:normal') or contains($span-style,'font-weight :normal') or
+                contains($span-style,'font-weight: normal') or 
+                contains($span-style,'font-weight : normal')">[normal]</xsl:if>
+</xsl:template>
+
+<!-- Process a span with a tidy-created class. It is known to have one or more
+     values from b, i, u, or tt. For each value, create the element if needed,
+     and move on to the next one, passing the style value from /html/head/style -->
+<xsl:template name="bold-span">
+  <xsl:param name="span-style"/>
+  <xsl:choose>
+    <xsl:when test="contains($span-style,'[b]')">
+      <b><xsl:call-template name="italic-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></b>
+    </xsl:when>
+    <xsl:otherwise><xsl:call-template name="italic-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template name="italic-span">
+  <xsl:param name="span-style"/>
+  <xsl:choose>
+    <xsl:when test="contains($span-style,'[i]')">
+      <i><xsl:call-template name="underline-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></i>
+    </xsl:when>
+    <xsl:otherwise><xsl:call-template name="underline-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template name="underline-span">
+  <xsl:param name="span-style"/>
+  <xsl:choose>
+    <xsl:when test="contains($span-style,'[u]')">
+      <u><xsl:call-template name="courier-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></u>
+    </xsl:when>
+    <xsl:otherwise><xsl:call-template name="courier-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template name="courier-span">
+  <xsl:param name="span-style"/>
+  <xsl:choose>
+    <xsl:when test="contains($span-style,'[tt]')">
+      <tt><xsl:call-template name="normal-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></tt>
+    </xsl:when>
+    <xsl:otherwise><xsl:call-template name="normal-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template name="normal-span">
+  <xsl:param name="span-style"/>
+  <xsl:choose>
+    <!-- If a span has "normal" style and nothing else, create <ph> -->
+    <xsl:when test="contains($span-style,'[normal]') and 
+                    substring-before($span-style,'[normal]')='' and
+                    substring-after($span-style,'[normal]')=''">
+      <ph><xsl:apply-templates select="*|text()|comment()"/></ph>
+    </xsl:when>
+    <xsl:otherwise><xsl:apply-templates select="*|text()|comment()"/></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="span">
+  <xsl:choose>
+    <xsl:when test="@class='bold-italic'">
+      <b><i><xsl:apply-templates select="*|text()|comment()"/></i></b>
+    </xsl:when>
+    <!-- If the span has a value created by tidy, parse /html/head/style -->
+    <xsl:when test="@class='c1' or @class='c2' or @class='c3' or
+                    @class='c4' or @class='c5' or @class='c6' or
+                    @class='c7' or @class='c8' or @class='c9'">
+      <xsl:variable name="span-style"><xsl:call-template name="get-span-style"/></xsl:variable>
+      <xsl:choose>
+        <xsl:when test="string-length($span-style)>0">
+          <xsl:call-template name="bold-span"><xsl:with-param name="span-style" select="$span-style"/></xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="searchval">span.<xsl:value-of select="@class"/></xsl:variable>
+          <xsl:variable name="orig-span-style">
+            <xsl:value-of select="substring-before(substring-after(/html/head/style/text(),$searchval),'}')"/>}<xsl:text/>
+          </xsl:variable>
+          <xsl:call-template name="output-message">
+            <xsl:with-param name="msg">CLEANUP ACTION: provide a better phrase markup for a SPAN tag.
+The element's contents have been placed in a phrase element.
+There is a comment next to the phrase with the span's class value.</xsl:with-param>
+          </xsl:call-template>
+          <xsl:if test="$verbose">
+            <xsl:comment>Original: &lt;span @class=<xsl:value-of select="@class"/>&gt;, <xsl:value-of select="@class"/>=<xsl:value-of select="$orig-span-style"/></xsl:comment>
+          </xsl:if>
+          <ph><xsl:apply-templates select="*|text()|comment()"/></ph>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="output-message">
+        <xsl:with-param name="msg">CLEANUP ACTION: provide a better phrase markup for a SPAN tag.
+The element's contents have been placed in a phrase element.
+There is a comment next to the phrase with the span's class value.</xsl:with-param>
+      </xsl:call-template>
+      <xsl:if test="$verbose">
+        <xsl:comment>Original: &lt;span @class=<xsl:value-of select="@class"/>&gt;</xsl:comment>
+      </xsl:if>
+      <ph><xsl:apply-templates select="@class"/><xsl:apply-templates select="*|text()|comment()"/></ph>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- generate dlentry wrapper for DL/DD/DT -->
+
+<xsl:template match="dt">
+<dlentry>
+ <dt><xsl:apply-templates select="@class|*|text()|comment()"/></dt>
+ <xsl:apply-templates select="following-sibling::*[1]" mode="indirect"/>
+</dlentry>
+</xsl:template>
+
+<xsl:template match="dd"/>
+
+<xsl:template match="dt" mode="indirect"/>
+<xsl:template match="dd" mode="indirect">
+  <dd>
+    <xsl:apply-templates select="@class|*|text()|comment()"/>
+  </dd>
+  <xsl:apply-templates select="following-sibling::*[1]" mode="indirect"/>
+</xsl:template>
+
+
+<!-- named templates -->
+
+<!--
+<xsl:template name="sect1topic">
+<topic xml:lang="{$default-lang}">
+  <xsl:if test="@id"><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute></xsl:if>
+  <xsl:apply-templates/>
+</topic>
+</xsl:template>
+-->
+
+
+<!-- things noted for disambiguation -->
+
+<!-- encapsulate text within body -->
+<xsl:template match="body/text()|body/div/text()">
+  <xsl:variable name="bodytxt"><xsl:value-of select="normalize-space(.)"/></xsl:variable>
+  <xsl:if test="string-length($bodytxt)>0">
+    <!-- issue a message here? Not EVERY time, puleeeze. test for first node if we must... -->
+    <p>
+      <xsl:value-of select="."/>
+    </p>
+  </xsl:if>
+  <!-- text nodes get wrapped; blanks fall through -->
+</xsl:template>
+
+<!-- encapsulate phrases within body -->
+<xsl:template match="body/i|body/div/i" priority="4">
+  <p><i><xsl:apply-templates select="@class|*|text()|comment()"/></i></p>
+</xsl:template>
+<xsl:template match="body/b|body/div/b" priority="4">
+  <p><b><xsl:apply-templates select="@class|*|text()|comment()"/></b></p>
+</xsl:template>
+<xsl:template match="body/u|body/div/u" priority="4">
+  <p><u><xsl:apply-templates select="@class|*|text()|comment()"/></u></p>
+</xsl:template>
+
+<!-- 03/28/2003 RDA: consolidate all <a> processing into single template -->
+<!-- <xsl:template match="body/a" priority="4">
+  <xsl:choose>
+    <xsl:when test="@name">
+      <xsl:comment>Removed anchor point <xsl:value-of select="@name"/></xsl:comment>
+    </xsl:when>
+    <xsl:when test="@id">
+      <xsl:comment>Removed anchor point <xsl:value-of select="@id"/></xsl:comment>
+    </xsl:when>
+  </xsl:choose>
+  <xsl:if test="@href">
+    <p>
+      <xref>
+        <xsl:call-template name="genlinkattrs"/>
+        <xsl:apply-templates/>
+      </xref>
+    </p>
+  </xsl:if>
+</xsl:template> -->
+
+
+<!-- case of deprecated elements with no clear migrational intent -->
+
+<xsl:template match="small|big">
+  <xsl:call-template name="output-message">
+      <xsl:with-param name="msg">CLEANUP ACTION: provide a better phrase markup for a BIG or SMALL tag.
+The element's contents have been placed in a required-cleanup element.</xsl:with-param>
+  </xsl:call-template>
+  <xsl:variable name="content">
+    <xsl:attribute name="remap"><xsl:value-of select="name()"/></xsl:attribute>
+    <ph>
+      <xsl:apply-templates select="@class|*|text()|comment()"/>
+    </ph>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$generateRequiredCleanup">      
+      <required-cleanup>
+        <xsl:copy-of select="$content"/>
+      </required-cleanup>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="s|strike">
+  <xsl:call-template name="output-message">
+      <xsl:with-param name="msg">CLEANUP ACTION: provide a better phrase markup for a strikethrough tag.
+The element's contents have been placed in a required-cleanup element.</xsl:with-param>
+  </xsl:call-template>
+  <xsl:variable name="content">
+    <xsl:attribute name="remap"><xsl:value-of select="name()"/></xsl:attribute>
+    <ph>
+      <xsl:apply-templates select="@class|*|text()|comment()"/>
+    </ph>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$generateRequiredCleanup">      
+      <required-cleanup>
+        <xsl:copy-of select="$content"/>
+      </required-cleanup>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- set of rules for faux-pre sections (paragraphs with br, using samp for font effect)-->
+
+<xsl:template match="p[samp][not(text())]">
+  <pre>
+   <xsl:apply-templates mode="re-pre"/>
+  </pre>
+</xsl:template>
+
+<xsl:template match="samp" mode="re-pre">
+  <xsl:apply-templates mode="re-pre"/>
+</xsl:template>
+
+<xsl:template match="samp/br" mode="re-pre"/><!-- won't need introduced space if original source has it -->
+
+<xsl:template match="comment()">
+  <xsl:comment><xsl:value-of select="."/></xsl:comment>
+</xsl:template>
+
+<!-- =========== CATCH UNDEFINED ELEMENTS (for stylesheet maintainers) =========== -->
+
+<!-- (this rule should NOT produce output in production setting) -->
+<xsl:template match="*">
+  <xsl:call-template name="output-message">
+    <xsl:with-param name="msg">CLEANUP ACTION: no DITA equivalent for HTML element '<xsl:value-of select="name()"/>'.
+The element has been placed in a required-cleanup element.</xsl:with-param>
+  </xsl:call-template>
+  <xsl:variable name="content">
+    <ph>
+    <xsl:attribute name="remap"><xsl:value-of select="name()"/></xsl:attribute>
+      <xsl:apply-templates select="*|text()|comment()"/>
+    </ph>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$generateRequiredCleanup">      
+      <required-cleanup>
+        <xsl:copy-of select="$content"/>
+      </required-cleanup>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$content"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================================== -->
+<!-- Special templates for pre-processing an XHTML file, in order to merge sequential lists -->
+
+<!-- If there are not any split lists surrounding this element, copy it as is. If this is between
+     two parts of a split list, it will be pulled in to the preceding list item, so ignore it now. -->
+<xsl:template match="*|@*|comment()|processing-instruction()|text()" mode="shift-lists">
+  <xsl:choose>
+    <xsl:when test="not(following-sibling::ol[1][@start]) or not(preceding-sibling::ol)">
+      <xsl:copy>
+        <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- There is a re-started list after this. Check to make sure the numbers are correct. -->
+      <xsl:variable name="supposed-next-start">
+        <xsl:choose>
+          <xsl:when test="preceding-sibling::ol[1]/@start">
+            <xsl:value-of select="number(preceding-sibling::ol[1]/@start) + count(preceding-sibling::ol[1]/li)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="count(preceding-sibling::ol[1]/li) + 1"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:choose>
+        <!-- If the next list continues the previous, this element was pulled in to the previous list. -->
+        <xsl:when test="$supposed-next-start=following-sibling::ol[1]/@start"/>
+        <xsl:otherwise>
+          <xsl:copy>
+            <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+          </xsl:copy>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- Process ordered lists individually. -->
+<xsl:template match="ol" mode="shift-lists">
+  <xsl:choose>
+    <!-- If this could be a continuation, check the @start value against the previous list -->
+    <xsl:when test="@start and preceding-sibling::ol">
+      <xsl:variable name="supposed-start">
+        <xsl:choose>
+          <xsl:when test="preceding-sibling::ol[1]/@start">
+            <xsl:value-of select="number(preceding-sibling::ol[1]/@start) + count(preceding-sibling::ol[1]/li)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="count(preceding-sibling::ol[1]/li) + 1"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:choose>
+        <!-- If this continues the previous list, it was pulled in when processing that list. -->
+        <xsl:when test="$supposed-start=@start"/>
+        <!-- Otherwise, there's a goof-up somewhere, just copy it to the output -->
+        <xsl:otherwise>
+          <xsl:copy>
+            <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+          </xsl:copy>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <!-- The list does not continue a previous list (though it may start a new one) -->
+    <xsl:otherwise>
+      <xsl:copy>
+        <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+      </xsl:copy>
+    </xsl:otherwise>
+  </xsl:choose> 
+</xsl:template>
+
+<!-- All list items but the last one are copied as-is. The last one is also copied, but we need to check
+     for continued lists. If this list is continued, everything between this item and the next list should
+     be copied in to the end of this list item. After the item is processed, add all of the list items from
+     the continue-ing list. -->
+<xsl:template match="ol/li[not(following-sibling::li)]" mode="shift-lists">
+  <xsl:variable name="supposed-next-start">
+    <xsl:choose>
+      <xsl:when test="../@start"><xsl:value-of select="number(../@start) + count(../li)"/></xsl:when>
+      <xsl:otherwise><xsl:value-of select="count(../li) + 1"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="shift-lists"/>
+    <xsl:if test="../following-sibling::ol[1]/@start and $supposed-next-start=../following-sibling::ol[1]/@start">
+      <xsl:variable name="next-id"><xsl:value-of select="generate-id(../following-sibling::ol[1])"/></xsl:variable>
+      <xsl:apply-templates 
+           select="../following-sibling::text()[generate-id(following-sibling::ol[1])=$next-id]|
+                   ../following-sibling::*[generate-id(following-sibling::ol[1])=$next-id]"
+           mode="add-to-list"/>
+    </xsl:if>
+  </xsl:copy>
+  <xsl:if test="../following-sibling::ol[1]/@start and $supposed-next-start=../following-sibling::ol[1]/@start">
+    <xsl:apply-templates select="../following-sibling::ol[1]/*" mode="shift-lists"/>
+  </xsl:if>
+</xsl:template>
+
+<!-- Matches anything between 2 lists that are being merged. -->
+<xsl:template match="*|@*|comment()|processing-instruction()|text()" mode="add-to-list">
+  <xsl:copy>
+    <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="add-to-list"/>
+  </xsl:copy>
+</xsl:template>
+
+<!-- Validate the input parameters -->
+<xsl:template name="validate-parameters">
+    <xsl:if test="not($infotype='topic' or $infotype='concept' or $infotype='reference' or $infotype='task')">
+        <xsl:call-template name="output-message">
+            <xsl:with-param name="msg">'<xsl:value-of select="$infotype"/>' is an invalid infotype, use 'topic' as the default infotype.</xsl:with-param>
+        </xsl:call-template>
+    </xsl:if>
+    <xsl:if test="not($dita-extension='.dita' or $dita-extension='.xml')">
+        <xsl:call-template name="output-message">
+            <xsl:with-param name="msg">'<xsl:value-of select="$dita-extension"/>' is an invalid dita extension, please use '.dita' or '.xml' as the dita extension.</xsl:with-param>
+        </xsl:call-template>
+    </xsl:if>
+    <xsl:if test="not(contains($FILENAME, '.htm'))">
+        <xsl:call-template name="output-message">
+            <xsl:with-param name="msg">The parameter FILENAME should ends with '.htm' or '.html'.</xsl:with-param>
+        </xsl:call-template>
+    </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/dtds/xhtml/html2dita/plugin.xml b/lib/dtds/xhtml/html2dita/plugin.xml
new file mode 100644
index 0000000..39b56b1
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!-- This file is part of the DITA Open Toolkit project hosted on 

+  Sourceforge.net. See the accompanying license.txt file for 

+  applicable licenses.-->

+<!--

+  | (C) Copyright IBM Corporation 2006. All Rights Reserved.

+  *-->

+  <plugin id="org.dita.specialization.h2d">

+    <feature extension="dita.specialization.catalog.relative"

+      file="catalog.xml"/> 

+  </plugin>

diff --git a/lib/dtds/xhtml/html2dita/preprocess.xsl b/lib/dtds/xhtml/html2dita/preprocess.xsl
new file mode 100644
index 0000000..c935542
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/preprocess.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>

+<!-- This file is part of the DITA Open Toolkit project hosted on 

+    Sourceforge.net. See the accompanying license.txt file for 

+    applicable licenses.-->

+<!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. -->

+

+<xsl:stylesheet version="1.0"

+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

+

+<xsl:output method="xml" />

+

+<xsl:template match="*" priority="10">

+    <xsl:element name="{local-name()}">

+        <xsl:for-each select="@*">

+            <xsl:attribute name="{local-name()}">

+                <xsl:value-of select="." />

+            </xsl:attribute>

+        </xsl:for-each>

+        <xsl:apply-templates />

+    </xsl:element>

+</xsl:template>

+

+<xsl:template match="comment()">

+    <xsl:comment><xsl:value-of select="."/></xsl:comment>

+</xsl:template>

+

+<xsl:template match="*|processing-instruction()|text()">

+    <xsl:copy>

+        <xsl:apply-templates select="*|processing-instruction()|text()"/>

+    </xsl:copy>

+</xsl:template>

+

+</xsl:stylesheet>

diff --git a/lib/dtds/xhtml/html2dita/samples/concept.html b/lib/dtds/xhtml/html2dita/samples/concept.html
new file mode 100644
index 0000000..a388248
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/samples/concept.html
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!--  Migrating HTML to DITA: sample input file

+ |

+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005. All Rights Reserved.

+ | This file is related to the DITA package on IBM's developerWorks site.

+ | See license.txt for disclaimers.

+ + -->

+<html>

+<head>

+<title>A concept topic</title>

+</head>

+<body>

+<h1>A concept topic</h1>

+<p>Introductory block text.</p>

+<!-- any number of introductory blocks -->

+<h2>The first section</h2>

+<p>Section block text.</p>

+<h2>The second section</h2>

+<p>Section block text.</p>

+<!-- any number of sections -->

+<a href="relatedlink1.html"></a>

+<a href="relatedlink2.html"></a>

+<!-- any number of related links at body level -->

+</body>

+</html>

diff --git a/lib/dtds/xhtml/html2dita/samples/content.html b/lib/dtds/xhtml/html2dita/samples/content.html
new file mode 100644
index 0000000..446ba28
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/samples/content.html
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!--  Migrating HTML to DITA: sample input file

+ |

+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005. All Rights Reserved.

+ | This file is related to the DITA package on IBM's developerWorks site.

+ | See license.txt for disclaimers.

+ + -->

+<html>

+<head>

+<title>A topic with content examples</title>

+<meta name="name1" contet="content1"/>

+<meta name="name2" contet="content2"/>

+<!-- any number of metadata pairs -->

+</head>

+<body>

+<h1>A topic with content examples</h1>

+<!-- the following content can be used within most topic -->

+<p>Paragraph block.</p>

+<dl>

+<dt>Definition phrase 1</dt>

+<dd>Definition block 1</dd>

+<dt>Definition phrase 2</dt>

+<dd>Definition block 2</dd>

+<!-- any number of definitions -->

+</dl>

+<ol>

+<li>Ordered list item block 1</li>

+<li>Ordered list item block 2</li>

+<!-- any number of list items -->

+</ol>

+<ul>

+<li>Unrdered list item block 1</li>

+<li>Unrdered list item block 2</li>

+<!-- any number of list items -->

+</ul>

+<pre>Preformatted

+block

+</pre>

+<blockquote>Quoted block.</blockquote>

+<table>

+<caption>Caption phrase</caption>

+<thead>

+<tr>

+<th>Header block 1.1</th>

+<th>Header block 1.2</th>

+<!-- any number of columns -->

+</tr>

+</thead>

+<tbody>

+<tr>

+<td>Cell block 1.1</td>

+<td>Cell block 1.2</td>

+<!-- any number of columns -->

+</tr>

+<tr>

+<td>Cell block 2.1</td>

+<td>Cell block 2.2</td>

+</tr>

+<!-- any number of rows -->

+</tbody>

+</table>

+<div class="fignone">

+<span class="figcap">Figure title</span>

+<p>Any blocks.</p>

+</div>

+<img src="imagesrc.jpg" alt="alternative text"/>

+<ul>

+<li><u>underline</u> phrase</li>

+<li><strong>bold</strong> phrase</li>

+<li><em>italic</em> phrase</li>

+<li><cite>citation</cite> phrase</li>

+<li><sub>subscript</sub> phrase</li>

+<li><sup>superscript</sup> phrase</li>

+<li><code>code</code> phrase</li>

+<li><var>variable name</var> phrase</li>

+<li><samp>system output</samp> phrase</li>

+<li><kbd>user input</kbd> phrase</li>

+</ul>

+<p class="outputclass1">Most blocks and phrases can take an output class.</p>

+</body>

+</html>

diff --git a/lib/dtds/xhtml/html2dita/samples/reference.html b/lib/dtds/xhtml/html2dita/samples/reference.html
new file mode 100644
index 0000000..9127477
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/samples/reference.html
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!--  Migrating HTML to DITA: sample input file

+ |

+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005. All Rights Reserved.

+ | This file is related to the DITA package on IBM's developerWorks site.

+ | See license.txt for disclaimers.

+ + -->

+<html>

+<head>

+<title>A reference topic</title>

+</head>

+<body>

+<h1>A reference topic</h1>

+<h2>The first section</h2>

+<p>Section block text.</p>

+<h2>The second section</h2>

+<p>Section block text.</p>

+<!-- any number of sections -->

+<a href="relatedlink1.html"></a>

+<a href="relatedlink2.html"></a>

+<!-- any number of related links at body level -->

+</body>

+</html>

diff --git a/lib/dtds/xhtml/html2dita/samples/task.html b/lib/dtds/xhtml/html2dita/samples/task.html
new file mode 100644
index 0000000..a677da4
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/samples/task.html
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!--  Migrating HTML to DITA: sample input file

+ |

+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005. All Rights Reserved.

+ | This file is related to the DITA package on IBM's developerWorks site.

+ | See license.txt for disclaimers.

+ + -->

+<html>

+<head>

+<title>A task topic</title>

+</head>

+<body>

+<h1>A task topic</h1>

+<div>

+<p>Context text.</p>

+<!-- any number of context blocks -->

+</div>

+<ol>

+<li>The command for the first step.</li>

+<li>The command for the second step.

+<ol>

+<li>The command for the first substep of the second step.</li>

+<li>The command for the second substep of the second step.</li>

+<!-- any number of substeps -->

+</ol></li>

+<li>The command for the third step.

+<div>

+<p>Informative text for the third step.</p>

+<!-- any number of informative blocks -->

+</div>

+</li>

+<!-- any number of steps -->

+</ol>

+<p>Result text.</p>

+<!-- any number of result blocks -->

+<a href="relatedlink1.html"></a>

+<a href="relatedlink2.html"></a>

+</body>

+</html>

diff --git a/lib/dtds/xhtml/html2dita/samples/topic.html b/lib/dtds/xhtml/html2dita/samples/topic.html
new file mode 100644
index 0000000..bd5b456
--- /dev/null
+++ b/lib/dtds/xhtml/html2dita/samples/topic.html
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!--  Migrating HTML to DITA: sample input file

+ |

+ | (C) Copyright IBM Corporation 2001, 2002, 2003, 2004, 2005. All Rights Reserved.

+ | This file is related to the DITA package on IBM's developerWorks site.

+ | See license.txt for disclaimers.

+ + -->

+<html>

+<head>

+<title>A generic topic</title>

+</head>

+<body>

+<h1>A generic topic</h1>

+<p>Block text.</p>

+<!-- any number of blocks -->

+<h2>A section</h2>

+<p>Section block text.</p>

+<!-- any combination of blocks and sections -->

+<a href="relatedlink1.html"></a>

+<a href="relatedlink2.html"></a>

+<!-- any number of related links at body level -->

+</body>

+</html>