Ticket #7445: 7445-functional-test-validation-lxml-r7421.patch
| File 7445-functional-test-validation-lxml-r7421.patch, 61.8 KB (added by Remy Blank <remy.blank@…>, 4 years ago) |
|---|
-
trac/templates/diff_div.html
diff --git a/trac/templates/diff_div.html b/trac/templates/diff_div.html
a b 35 35 xmlns:xi="http://www.w3.org/2001/XInclude" 36 36 class="diff"> 37 37 38 <ul class="entries">38 <ul py:if="any(item.diffs or item.props for item in changes)" class="entries"> 39 39 <py:for each="idx, item in enumerate(changes)"> 40 40 <li py:if="item.diffs or item.props" class="entry" py:with="comments = item.get('comments')"> 41 41 <h2 id="${not no_id and 'file%s' % idx or None}" py:choose=""> -
trac/tests/functional/__init__.py
diff --git a/trac/tests/functional/__init__.py b/trac/tests/functional/__init__.py
a b 40 40 Requirements: 41 41 - Twill (http://twill.idyll.org/) 42 42 - subprocess (py2.4) 43 - lxml for XHTML validation (optional) 43 44 """ 44 45 45 46 import os -
trac/tests/functional/better_twill.py
diff --git a/trac/tests/functional/better_twill.py b/trac/tests/functional/better_twill.py
a b 5 5 """ 6 6 7 7 import os 8 from os.path import abspath, dirname, join 8 9 import sys 9 10 try: 10 11 from cStringIO import StringIO … … 38 39 tc = twill.commands 39 40 b = twill.get_browser() 40 41 42 # Setup XHTML validation for all retrieved pages 43 try: 44 from lxml import etree 45 except ImportError: 46 print "SKIP: validation of XHTML output in functional tests " \ 47 "(no lxml installed)" 48 else: 49 class _Resolver(etree.Resolver): 50 base_dir = dirname(abspath(__file__)) 51 52 def resolve(self, system_url, public_id, context): 53 return self.resolve_filename(join(self.base_dir, 54 system_url.split("/")[-1]), 55 context) 56 57 _parser = etree.XMLParser(dtd_validation=True) 58 _parser.resolvers.add(_Resolver()) 59 etree.set_default_parser(_parser) 60 61 def _format_error_log(data, log): 62 msg = [] 63 for each in log: 64 context = data.splitlines()[max(0, each.line - 5): 65 each.line + 6] 66 msg.append("%s\n\nURL: %s\nLine %d, column %d\n\n%s" % ( 67 each.message, each.filename, each.line, each.column, 68 "\n".join(context))) 69 return "\n".join(msg) 70 71 def _validate_xhtml(func_name, *args, **kwargs): 72 page = b.get_html() 73 if "xhtml1-strict.dtd" not in page: 74 return 75 etree.clear_error_log() 76 try: 77 doc = etree.parse(StringIO(page), base_url=b.get_url()) 78 except etree.XMLSyntaxError, e: 79 raise twill.errors.TwillAssertionError( 80 _format_error_log(page, e.error_log)) 81 82 b._post_load_hooks.append(_validate_xhtml) 83 41 84 # When we can't find something we expected, or find something we didn't 42 85 # expect, it helps the debugging effort to have a copy of the html to 43 86 # analyze. -
new file trac/tests/functional/xhtml-lat1.ent
diff --git a/trac/tests/functional/xhtml-lat1.ent b/trac/tests/functional/xhtml-lat1.ent new file mode 100644
- + 1 <!-- Portions (C) International Organization for Standardization 1986 2 Permission to copy in any form is granted for use with 3 conforming SGML systems and applications as defined in 4 ISO 8879, provided this notice is included in all copies. 5 --> 6 <!-- Character entity set. Typical invocation: 7 <!ENTITY % HTMLlat1 PUBLIC 8 "-//W3C//ENTITIES Latin 1 for XHTML//EN" 9 "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> 10 %HTMLlat1; 11 --> 12 13 <!ENTITY nbsp " "> <!-- no-break space = non-breaking space, 14 U+00A0 ISOnum --> 15 <!ENTITY iexcl "¡"> <!-- inverted exclamation mark, U+00A1 ISOnum --> 16 <!ENTITY cent "¢"> <!-- cent sign, U+00A2 ISOnum --> 17 <!ENTITY pound "£"> <!-- pound sign, U+00A3 ISOnum --> 18 <!ENTITY curren "¤"> <!-- currency sign, U+00A4 ISOnum --> 19 <!ENTITY yen "¥"> <!-- yen sign = yuan sign, U+00A5 ISOnum --> 20 <!ENTITY brvbar "¦"> <!-- broken bar = broken vertical bar, 21 U+00A6 ISOnum --> 22 <!ENTITY sect "§"> <!-- section sign, U+00A7 ISOnum --> 23 <!ENTITY uml "¨"> <!-- diaeresis = spacing diaeresis, 24 U+00A8 ISOdia --> 25 <!ENTITY copy "©"> <!-- copyright sign, U+00A9 ISOnum --> 26 <!ENTITY ordf "ª"> <!-- feminine ordinal indicator, U+00AA ISOnum --> 27 <!ENTITY laquo "«"> <!-- left-pointing double angle quotation mark 28 = left pointing guillemet, U+00AB ISOnum --> 29 <!ENTITY not "¬"> <!-- not sign = angled dash, 30 U+00AC ISOnum --> 31 <!ENTITY shy "­"> <!-- soft hyphen = discretionary hyphen, 32 U+00AD ISOnum --> 33 <!ENTITY reg "®"> <!-- registered sign = registered trade mark sign, 34 U+00AE ISOnum --> 35 <!ENTITY macr "¯"> <!-- macron = spacing macron = overline 36 = APL overbar, U+00AF ISOdia --> 37 <!ENTITY deg "°"> <!-- degree sign, U+00B0 ISOnum --> 38 <!ENTITY plusmn "±"> <!-- plus-minus sign = plus-or-minus sign, 39 U+00B1 ISOnum --> 40 <!ENTITY sup2 "²"> <!-- superscript two = superscript digit two 41 = squared, U+00B2 ISOnum --> 42 <!ENTITY sup3 "³"> <!-- superscript three = superscript digit three 43 = cubed, U+00B3 ISOnum --> 44 <!ENTITY acute "´"> <!-- acute accent = spacing acute, 45 U+00B4 ISOdia --> 46 <!ENTITY micro "µ"> <!-- micro sign, U+00B5 ISOnum --> 47 <!ENTITY para "¶"> <!-- pilcrow sign = paragraph sign, 48 U+00B6 ISOnum --> 49 <!ENTITY middot "·"> <!-- middle dot = Georgian comma 50 = Greek middle dot, U+00B7 ISOnum --> 51 <!ENTITY cedil "¸"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia --> 52 <!ENTITY sup1 "¹"> <!-- superscript one = superscript digit one, 53 U+00B9 ISOnum --> 54 <!ENTITY ordm "º"> <!-- masculine ordinal indicator, 55 U+00BA ISOnum --> 56 <!ENTITY raquo "»"> <!-- right-pointing double angle quotation mark 57 = right pointing guillemet, U+00BB ISOnum --> 58 <!ENTITY frac14 "¼"> <!-- vulgar fraction one quarter 59 = fraction one quarter, U+00BC ISOnum --> 60 <!ENTITY frac12 "½"> <!-- vulgar fraction one half 61 = fraction one half, U+00BD ISOnum --> 62 <!ENTITY frac34 "¾"> <!-- vulgar fraction three quarters 63 = fraction three quarters, U+00BE ISOnum --> 64 <!ENTITY iquest "¿"> <!-- inverted question mark 65 = turned question mark, U+00BF ISOnum --> 66 <!ENTITY Agrave "À"> <!-- latin capital letter A with grave 67 = latin capital letter A grave, 68 U+00C0 ISOlat1 --> 69 <!ENTITY Aacute "Á"> <!-- latin capital letter A with acute, 70 U+00C1 ISOlat1 --> 71 <!ENTITY Acirc "Â"> <!-- latin capital letter A with circumflex, 72 U+00C2 ISOlat1 --> 73 <!ENTITY Atilde "Ã"> <!-- latin capital letter A with tilde, 74 U+00C3 ISOlat1 --> 75 <!ENTITY Auml "Ä"> <!-- latin capital letter A with diaeresis, 76 U+00C4 ISOlat1 --> 77 <!ENTITY Aring "Å"> <!-- latin capital letter A with ring above 78 = latin capital letter A ring, 79 U+00C5 ISOlat1 --> 80 <!ENTITY AElig "Æ"> <!-- latin capital letter AE 81 = latin capital ligature AE, 82 U+00C6 ISOlat1 --> 83 <!ENTITY Ccedil "Ç"> <!-- latin capital letter C with cedilla, 84 U+00C7 ISOlat1 --> 85 <!ENTITY Egrave "È"> <!-- latin capital letter E with grave, 86 U+00C8 ISOlat1 --> 87 <!ENTITY Eacute "É"> <!-- latin capital letter E with acute, 88 U+00C9 ISOlat1 --> 89 <!ENTITY Ecirc "Ê"> <!-- latin capital letter E with circumflex, 90 U+00CA ISOlat1 --> 91 <!ENTITY Euml "Ë"> <!-- latin capital letter E with diaeresis, 92 U+00CB ISOlat1 --> 93 <!ENTITY Igrave "Ì"> <!-- latin capital letter I with grave, 94 U+00CC ISOlat1 --> 95 <!ENTITY Iacute "Í"> <!-- latin capital letter I with acute, 96 U+00CD ISOlat1 --> 97 <!ENTITY Icirc "Î"> <!-- latin capital letter I with circumflex, 98 U+00CE ISOlat1 --> 99 <!ENTITY Iuml "Ï"> <!-- latin capital letter I with diaeresis, 100 U+00CF ISOlat1 --> 101 <!ENTITY ETH "Ð"> <!-- latin capital letter ETH, U+00D0 ISOlat1 --> 102 <!ENTITY Ntilde "Ñ"> <!-- latin capital letter N with tilde, 103 U+00D1 ISOlat1 --> 104 <!ENTITY Ograve "Ò"> <!-- latin capital letter O with grave, 105 U+00D2 ISOlat1 --> 106 <!ENTITY Oacute "Ó"> <!-- latin capital letter O with acute, 107 U+00D3 ISOlat1 --> 108 <!ENTITY Ocirc "Ô"> <!-- latin capital letter O with circumflex, 109 U+00D4 ISOlat1 --> 110 <!ENTITY Otilde "Õ"> <!-- latin capital letter O with tilde, 111 U+00D5 ISOlat1 --> 112 <!ENTITY Ouml "Ö"> <!-- latin capital letter O with diaeresis, 113 U+00D6 ISOlat1 --> 114 <!ENTITY times "×"> <!-- multiplication sign, U+00D7 ISOnum --> 115 <!ENTITY Oslash "Ø"> <!-- latin capital letter O with stroke 116 = latin capital letter O slash, 117 U+00D8 ISOlat1 --> 118 <!ENTITY Ugrave "Ù"> <!-- latin capital letter U with grave, 119 U+00D9 ISOlat1 --> 120 <!ENTITY Uacute "Ú"> <!-- latin capital letter U with acute, 121 U+00DA ISOlat1 --> 122 <!ENTITY Ucirc "Û"> <!-- latin capital letter U with circumflex, 123 U+00DB ISOlat1 --> 124 <!ENTITY Uuml "Ü"> <!-- latin capital letter U with diaeresis, 125 U+00DC ISOlat1 --> 126 <!ENTITY Yacute "Ý"> <!-- latin capital letter Y with acute, 127 U+00DD ISOlat1 --> 128 <!ENTITY THORN "Þ"> <!-- latin capital letter THORN, 129 U+00DE ISOlat1 --> 130 <!ENTITY szlig "ß"> <!-- latin small letter sharp s = ess-zed, 131 U+00DF ISOlat1 --> 132 <!ENTITY agrave "à"> <!-- latin small letter a with grave 133 = latin small letter a grave, 134 U+00E0 ISOlat1 --> 135 <!ENTITY aacute "á"> <!-- latin small letter a with acute, 136 U+00E1 ISOlat1 --> 137 <!ENTITY acirc "â"> <!-- latin small letter a with circumflex, 138 U+00E2 ISOlat1 --> 139 <!ENTITY atilde "ã"> <!-- latin small letter a with tilde, 140 U+00E3 ISOlat1 --> 141 <!ENTITY auml "ä"> <!-- latin small letter a with diaeresis, 142 U+00E4 ISOlat1 --> 143 <!ENTITY aring "å"> <!-- latin small letter a with ring above 144 = latin small letter a ring, 145 U+00E5 ISOlat1 --> 146 <!ENTITY aelig "æ"> <!-- latin small letter ae 147 = latin small ligature ae, U+00E6 ISOlat1 --> 148 <!ENTITY ccedil "ç"> <!-- latin small letter c with cedilla, 149 U+00E7 ISOlat1 --> 150 <!ENTITY egrave "è"> <!-- latin small letter e with grave, 151 U+00E8 ISOlat1 --> 152 <!ENTITY eacute "é"> <!-- latin small letter e with acute, 153 U+00E9 ISOlat1 --> 154 <!ENTITY ecirc "ê"> <!-- latin small letter e with circumflex, 155 U+00EA ISOlat1 --> 156 <!ENTITY euml "ë"> <!-- latin small letter e with diaeresis, 157 U+00EB ISOlat1 --> 158 <!ENTITY igrave "ì"> <!-- latin small letter i with grave, 159 U+00EC ISOlat1 --> 160 <!ENTITY iacute "í"> <!-- latin small letter i with acute, 161 U+00ED ISOlat1 --> 162 <!ENTITY icirc "î"> <!-- latin small letter i with circumflex, 163 U+00EE ISOlat1 --> 164 <!ENTITY iuml "ï"> <!-- latin small letter i with diaeresis, 165 U+00EF ISOlat1 --> 166 <!ENTITY eth "ð"> <!-- latin small letter eth, U+00F0 ISOlat1 --> 167 <!ENTITY ntilde "ñ"> <!-- latin small letter n with tilde, 168 U+00F1 ISOlat1 --> 169 <!ENTITY ograve "ò"> <!-- latin small letter o with grave, 170 U+00F2 ISOlat1 --> 171 <!ENTITY oacute "ó"> <!-- latin small letter o with acute, 172 U+00F3 ISOlat1 --> 173 <!ENTITY ocirc "ô"> <!-- latin small letter o with circumflex, 174 U+00F4 ISOlat1 --> 175 <!ENTITY otilde "õ"> <!-- latin small letter o with tilde, 176 U+00F5 ISOlat1 --> 177 <!ENTITY ouml "ö"> <!-- latin small letter o with diaeresis, 178 U+00F6 ISOlat1 --> 179 <!ENTITY divide "÷"> <!-- division sign, U+00F7 ISOnum --> 180 <!ENTITY oslash "ø"> <!-- latin small letter o with stroke, 181 = latin small letter o slash, 182 U+00F8 ISOlat1 --> 183 <!ENTITY ugrave "ù"> <!-- latin small letter u with grave, 184 U+00F9 ISOlat1 --> 185 <!ENTITY uacute "ú"> <!-- latin small letter u with acute, 186 U+00FA ISOlat1 --> 187 <!ENTITY ucirc "û"> <!-- latin small letter u with circumflex, 188 U+00FB ISOlat1 --> 189 <!ENTITY uuml "ü"> <!-- latin small letter u with diaeresis, 190 U+00FC ISOlat1 --> 191 <!ENTITY yacute "ý"> <!-- latin small letter y with acute, 192 U+00FD ISOlat1 --> 193 <!ENTITY thorn "þ"> <!-- latin small letter thorn, 194 U+00FE ISOlat1 --> 195 <!ENTITY yuml "ÿ"> <!-- latin small letter y with diaeresis, 196 U+00FF ISOlat1 --> -
new file trac/tests/functional/xhtml-special.ent
diff --git a/trac/tests/functional/xhtml-special.ent b/trac/tests/functional/xhtml-special.ent new file mode 100644
- + 1 <!-- Special characters for XHTML --> 2 3 <!-- Character entity set. Typical invocation: 4 <!ENTITY % HTMLspecial PUBLIC 5 "-//W3C//ENTITIES Special for XHTML//EN" 6 "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> 7 %HTMLspecial; 8 --> 9 10 <!-- Portions (C) International Organization for Standardization 1986: 11 Permission to copy in any form is granted for use with 12 conforming SGML systems and applications as defined in 13 ISO 8879, provided this notice is included in all copies. 14 --> 15 16 <!-- Relevant ISO entity set is given unless names are newly introduced. 17 New names (i.e., not in ISO 8879 list) do not clash with any 18 existing ISO 8879 entity names. ISO 10646 character numbers 19 are given for each character, in hex. values are decimal 20 conversions of the ISO 10646 values and refer to the document 21 character set. Names are Unicode names. 22 --> 23 24 <!-- C0 Controls and Basic Latin --> 25 <!ENTITY quot """> <!-- quotation mark, U+0022 ISOnum --> 26 <!ENTITY amp "&#38;"> <!-- ampersand, U+0026 ISOnum --> 27 <!ENTITY lt "&#60;"> <!-- less-than sign, U+003C ISOnum --> 28 <!ENTITY gt ">"> <!-- greater-than sign, U+003E ISOnum --> 29 <!ENTITY apos "'"> <!-- apostrophe = APL quote, U+0027 ISOnum --> 30 31 <!-- Latin Extended-A --> 32 <!ENTITY OElig "Œ"> <!-- latin capital ligature OE, 33 U+0152 ISOlat2 --> 34 <!ENTITY oelig "œ"> <!-- latin small ligature oe, U+0153 ISOlat2 --> 35 <!-- ligature is a misnomer, this is a separate character in some languages --> 36 <!ENTITY Scaron "Š"> <!-- latin capital letter S with caron, 37 U+0160 ISOlat2 --> 38 <!ENTITY scaron "š"> <!-- latin small letter s with caron, 39 U+0161 ISOlat2 --> 40 <!ENTITY Yuml "Ÿ"> <!-- latin capital letter Y with diaeresis, 41 U+0178 ISOlat2 --> 42 43 <!-- Spacing Modifier Letters --> 44 <!ENTITY circ "ˆ"> <!-- modifier letter circumflex accent, 45 U+02C6 ISOpub --> 46 <!ENTITY tilde "˜"> <!-- small tilde, U+02DC ISOdia --> 47 48 <!-- General Punctuation --> 49 <!ENTITY ensp " "> <!-- en space, U+2002 ISOpub --> 50 <!ENTITY emsp " "> <!-- em space, U+2003 ISOpub --> 51 <!ENTITY thinsp " "> <!-- thin space, U+2009 ISOpub --> 52 <!ENTITY zwnj "‌"> <!-- zero width non-joiner, 53 U+200C NEW RFC 2070 --> 54 <!ENTITY zwj "‍"> <!-- zero width joiner, U+200D NEW RFC 2070 --> 55 <!ENTITY lrm "‎"> <!-- left-to-right mark, U+200E NEW RFC 2070 --> 56 <!ENTITY rlm "‏"> <!-- right-to-left mark, U+200F NEW RFC 2070 --> 57 <!ENTITY ndash "–"> <!-- en dash, U+2013 ISOpub --> 58 <!ENTITY mdash "—"> <!-- em dash, U+2014 ISOpub --> 59 <!ENTITY lsquo "‘"> <!-- left single quotation mark, 60 U+2018 ISOnum --> 61 <!ENTITY rsquo "’"> <!-- right single quotation mark, 62 U+2019 ISOnum --> 63 <!ENTITY sbquo "‚"> <!-- single low-9 quotation mark, U+201A NEW --> 64 <!ENTITY ldquo "“"> <!-- left double quotation mark, 65 U+201C ISOnum --> 66 <!ENTITY rdquo "”"> <!-- right double quotation mark, 67 U+201D ISOnum --> 68 <!ENTITY bdquo "„"> <!-- double low-9 quotation mark, U+201E NEW --> 69 <!ENTITY dagger "†"> <!-- dagger, U+2020 ISOpub --> 70 <!ENTITY Dagger "‡"> <!-- double dagger, U+2021 ISOpub --> 71 <!ENTITY permil "‰"> <!-- per mille sign, U+2030 ISOtech --> 72 <!ENTITY lsaquo "‹"> <!-- single left-pointing angle quotation mark, 73 U+2039 ISO proposed --> 74 <!-- lsaquo is proposed but not yet ISO standardized --> 75 <!ENTITY rsaquo "›"> <!-- single right-pointing angle quotation mark, 76 U+203A ISO proposed --> 77 <!-- rsaquo is proposed but not yet ISO standardized --> 78 79 <!-- Currency Symbols --> 80 <!ENTITY euro "€"> <!-- euro sign, U+20AC NEW --> -
new file trac/tests/functional/xhtml-symbol.ent
diff --git a/trac/tests/functional/xhtml-symbol.ent b/trac/tests/functional/xhtml-symbol.ent new file mode 100644
- + 1 <!-- Mathematical, Greek and Symbolic characters for XHTML --> 2 3 <!-- Character entity set. Typical invocation: 4 <!ENTITY % HTMLsymbol PUBLIC 5 "-//W3C//ENTITIES Symbols for XHTML//EN" 6 "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> 7 %HTMLsymbol; 8 --> 9 10 <!-- Portions (C) International Organization for Standardization 1986: 11 Permission to copy in any form is granted for use with 12 conforming SGML systems and applications as defined in 13 ISO 8879, provided this notice is included in all copies. 14 --> 15 16 <!-- Relevant ISO entity set is given unless names are newly introduced. 17 New names (i.e., not in ISO 8879 list) do not clash with any 18 existing ISO 8879 entity names. ISO 10646 character numbers 19 are given for each character, in hex. values are decimal 20 conversions of the ISO 10646 values and refer to the document 21 character set. Names are Unicode names. 22 --> 23 24 <!-- Latin Extended-B --> 25 <!ENTITY fnof "ƒ"> <!-- latin small letter f with hook = function 26 = florin, U+0192 ISOtech --> 27 28 <!-- Greek --> 29 <!ENTITY Alpha "Α"> <!-- greek capital letter alpha, U+0391 --> 30 <!ENTITY Beta "Β"> <!-- greek capital letter beta, U+0392 --> 31 <!ENTITY Gamma "Γ"> <!-- greek capital letter gamma, 32 U+0393 ISOgrk3 --> 33 <!ENTITY Delta "Δ"> <!-- greek capital letter delta, 34 U+0394 ISOgrk3 --> 35 <!ENTITY Epsilon "Ε"> <!-- greek capital letter epsilon, U+0395 --> 36 <!ENTITY Zeta "Ζ"> <!-- greek capital letter zeta, U+0396 --> 37 <!ENTITY Eta "Η"> <!-- greek capital letter eta, U+0397 --> 38 <!ENTITY Theta "Θ"> <!-- greek capital letter theta, 39 U+0398 ISOgrk3 --> 40 <!ENTITY Iota "Ι"> <!-- greek capital letter iota, U+0399 --> 41 <!ENTITY Kappa "Κ"> <!-- greek capital letter kappa, U+039A --> 42 <!ENTITY Lambda "Λ"> <!-- greek capital letter lamda, 43 U+039B ISOgrk3 --> 44 <!ENTITY Mu "Μ"> <!-- greek capital letter mu, U+039C --> 45 <!ENTITY Nu "Ν"> <!-- greek capital letter nu, U+039D --> 46 <!ENTITY Xi "Ξ"> <!-- greek capital letter xi, U+039E ISOgrk3 --> 47 <!ENTITY Omicron "Ο"> <!-- greek capital letter omicron, U+039F --> 48 <!ENTITY Pi "Π"> <!-- greek capital letter pi, U+03A0 ISOgrk3 --> 49 <!ENTITY Rho "Ρ"> <!-- greek capital letter rho, U+03A1 --> 50 <!-- there is no Sigmaf, and no U+03A2 character either --> 51 <!ENTITY Sigma "Σ"> <!-- greek capital letter sigma, 52 U+03A3 ISOgrk3 --> 53 <!ENTITY Tau "Τ"> <!-- greek capital letter tau, U+03A4 --> 54 <!ENTITY Upsilon "Υ"> <!-- greek capital letter upsilon, 55 U+03A5 ISOgrk3 --> 56 <!ENTITY Phi "Φ"> <!-- greek capital letter phi, 57 U+03A6 ISOgrk3 --> 58 <!ENTITY Chi "Χ"> <!-- greek capital letter chi, U+03A7 --> 59 <!ENTITY Psi "Ψ"> <!-- greek capital letter psi, 60 U+03A8 ISOgrk3 --> 61 <!ENTITY Omega "Ω"> <!-- greek capital letter omega, 62 U+03A9 ISOgrk3 --> 63 64 <!ENTITY alpha "α"> <!-- greek small letter alpha, 65 U+03B1 ISOgrk3 --> 66 <!ENTITY beta "β"> <!-- greek small letter beta, U+03B2 ISOgrk3 --> 67 <!ENTITY gamma "γ"> <!-- greek small letter gamma, 68 U+03B3 ISOgrk3 --> 69 <!ENTITY delta "δ"> <!-- greek small letter delta, 70 U+03B4 ISOgrk3 --> 71 <!ENTITY epsilon "ε"> <!-- greek small letter epsilon, 72 U+03B5 ISOgrk3 --> 73 <!ENTITY zeta "ζ"> <!-- greek small letter zeta, U+03B6 ISOgrk3 --> 74 <!ENTITY eta "η"> <!-- greek small letter eta, U+03B7 ISOgrk3 --> 75 <!ENTITY theta "θ"> <!-- greek small letter theta, 76 U+03B8 ISOgrk3 --> 77 <!ENTITY iota "ι"> <!-- greek small letter iota, U+03B9 ISOgrk3 --> 78 <!ENTITY kappa "κ"> <!-- greek small letter kappa, 79 U+03BA ISOgrk3 --> 80 <!ENTITY lambda "λ"> <!-- greek small letter lamda, 81 U+03BB ISOgrk3 --> 82 <!ENTITY mu "μ"> <!-- greek small letter mu, U+03BC ISOgrk3 --> 83 <!ENTITY nu "ν"> <!-- greek small letter nu, U+03BD ISOgrk3 --> 84 <!ENTITY xi "ξ"> <!-- greek small letter xi, U+03BE ISOgrk3 --> 85 <!ENTITY omicron "ο"> <!-- greek small letter omicron, U+03BF NEW --> 86 <!ENTITY pi "π"> <!-- greek small letter pi, U+03C0 ISOgrk3 --> 87 <!ENTITY rho "ρ"> <!-- greek small letter rho, U+03C1 ISOgrk3 --> 88 <!ENTITY sigmaf "ς"> <!-- greek small letter final sigma, 89 U+03C2 ISOgrk3 --> 90 <!ENTITY sigma "σ"> <!-- greek small letter sigma, 91 U+03C3 ISOgrk3 --> 92 <!ENTITY tau "τ"> <!-- greek small letter tau, U+03C4 ISOgrk3 --> 93 <!ENTITY upsilon "υ"> <!-- greek small letter upsilon, 94 U+03C5 ISOgrk3 --> 95 <!ENTITY phi "φ"> <!-- greek small letter phi, U+03C6 ISOgrk3 --> 96 <!ENTITY chi "χ"> <!-- greek small letter chi, U+03C7 ISOgrk3 --> 97 <!ENTITY psi "ψ"> <!-- greek small letter psi, U+03C8 ISOgrk3 --> 98 <!ENTITY omega "ω"> <!-- greek small letter omega, 99 U+03C9 ISOgrk3 --> 100 <!ENTITY thetasym "ϑ"> <!-- greek theta symbol, 101 U+03D1 NEW --> 102 <!ENTITY upsih "ϒ"> <!-- greek upsilon with hook symbol, 103 U+03D2 NEW --> 104 <!ENTITY piv "ϖ"> <!-- greek pi symbol, U+03D6 ISOgrk3 --> 105 106 <!-- General Punctuation --> 107 <!ENTITY bull "•"> <!-- bullet = black small circle, 108 U+2022 ISOpub --> 109 <!-- bullet is NOT the same as bullet operator, U+2219 --> 110 <!ENTITY hellip "…"> <!-- horizontal ellipsis = three dot leader, 111 U+2026 ISOpub --> 112 <!ENTITY prime "′"> <!-- prime = minutes = feet, U+2032 ISOtech --> 113 <!ENTITY Prime "″"> <!-- double prime = seconds = inches, 114 U+2033 ISOtech --> 115 <!ENTITY oline "‾"> <!-- overline = spacing overscore, 116 U+203E NEW --> 117 <!ENTITY frasl "⁄"> <!-- fraction slash, U+2044 NEW --> 118 119 <!-- Letterlike Symbols --> 120 <!ENTITY weierp "℘"> <!-- script capital P = power set 121 = Weierstrass p, U+2118 ISOamso --> 122 <!ENTITY image "ℑ"> <!-- black-letter capital I = imaginary part, 123 U+2111 ISOamso --> 124 <!ENTITY real "ℜ"> <!-- black-letter capital R = real part symbol, 125 U+211C ISOamso --> 126 <!ENTITY trade "™"> <!-- trade mark sign, U+2122 ISOnum --> 127 <!ENTITY alefsym "ℵ"> <!-- alef symbol = first transfinite cardinal, 128 U+2135 NEW --> 129 <!-- alef symbol is NOT the same as hebrew letter alef, 130 U+05D0 although the same glyph could be used to depict both characters --> 131 132 <!-- Arrows --> 133 <!ENTITY larr "←"> <!-- leftwards arrow, U+2190 ISOnum --> 134 <!ENTITY uarr "↑"> <!-- upwards arrow, U+2191 ISOnum--> 135 <!ENTITY rarr "→"> <!-- rightwards arrow, U+2192 ISOnum --> 136 <!ENTITY darr "↓"> <!-- downwards arrow, U+2193 ISOnum --> 137 <!ENTITY harr "↔"> <!-- left right arrow, U+2194 ISOamsa --> 138 <!ENTITY crarr "↵"> <!-- downwards arrow with corner leftwards 139 = carriage return, U+21B5 NEW --> 140 <!ENTITY lArr "⇐"> <!-- leftwards double arrow, U+21D0 ISOtech --> 141 <!-- Unicode does not say that lArr is the same as the 'is implied by' arrow 142 but also does not have any other character for that function. So lArr can 143 be used for 'is implied by' as ISOtech suggests --> 144 <!ENTITY uArr "⇑"> <!-- upwards double arrow, U+21D1 ISOamsa --> 145 <!ENTITY rArr "⇒"> <!-- rightwards double arrow, 146 U+21D2 ISOtech --> 147 <!-- Unicode does not say this is the 'implies' character but does not have 148 another character with this function so rArr can be used for 'implies' 149 as ISOtech suggests --> 150 <!ENTITY dArr "⇓"> <!-- downwards double arrow, U+21D3 ISOamsa --> 151 <!ENTITY hArr "⇔"> <!-- left right double arrow, 152 U+21D4 ISOamsa --> 153 154 <!-- Mathematical Operators --> 155 <!ENTITY forall "∀"> <!-- for all, U+2200 ISOtech --> 156 <!ENTITY part "∂"> <!-- partial differential, U+2202 ISOtech --> 157 <!ENTITY exist "∃"> <!-- there exists, U+2203 ISOtech --> 158 <!ENTITY empty "∅"> <!-- empty set = null set, U+2205 ISOamso --> 159 <!ENTITY nabla "∇"> <!-- nabla = backward difference, 160 U+2207 ISOtech --> 161 <!ENTITY isin "∈"> <!-- element of, U+2208 ISOtech --> 162 <!ENTITY notin "∉"> <!-- not an element of, U+2209 ISOtech --> 163 <!ENTITY ni "∋"> <!-- contains as member, U+220B ISOtech --> 164 <!ENTITY prod "∏"> <!-- n-ary product = product sign, 165 U+220F ISOamsb --> 166 <!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though 167 the same glyph might be used for both --> 168 <!ENTITY sum "∑"> <!-- n-ary summation, U+2211 ISOamsb --> 169 <!-- sum is NOT the same character as U+03A3 'greek capital letter sigma' 170 though the same glyph might be used for both --> 171 <!ENTITY minus "−"> <!-- minus sign, U+2212 ISOtech --> 172 <!ENTITY lowast "∗"> <!-- asterisk operator, U+2217 ISOtech --> 173 <!ENTITY radic "√"> <!-- square root = radical sign, 174 U+221A ISOtech --> 175 <!ENTITY prop "∝"> <!-- proportional to, U+221D ISOtech --> 176 <!ENTITY infin "∞"> <!-- infinity, U+221E ISOtech --> 177 <!ENTITY ang "∠"> <!-- angle, U+2220 ISOamso --> 178 <!ENTITY and "∧"> <!-- logical and = wedge, U+2227 ISOtech --> 179 <!ENTITY or "∨"> <!-- logical or = vee, U+2228 ISOtech --> 180 <!ENTITY cap "∩"> <!-- intersection = cap, U+2229 ISOtech --> 181 <!ENTITY cup "∪"> <!-- union = cup, U+222A ISOtech --> 182 <!ENTITY int "∫"> <!-- integral, U+222B ISOtech --> 183 <!ENTITY there4 "∴"> <!-- therefore, U+2234 ISOtech --> 184 <!ENTITY sim "∼"> <!-- tilde operator = varies with = similar to, 185 U+223C ISOtech --> 186 <!-- tilde operator is NOT the same character as the tilde, U+007E, 187 although the same glyph might be used to represent both --> 188 <!ENTITY cong "≅"> <!-- approximately equal to, U+2245 ISOtech --> 189 <!ENTITY asymp "≈"> <!-- almost equal to = asymptotic to, 190 U+2248 ISOamsr --> 191 <!ENTITY ne "≠"> <!-- not equal to, U+2260 ISOtech --> 192 <!ENTITY equiv "≡"> <!-- identical to, U+2261 ISOtech --> 193 <!ENTITY le "≤"> <!-- less-than or equal to, U+2264 ISOtech --> 194 <!ENTITY ge "≥"> <!-- greater-than or equal to, 195 U+2265 ISOtech --> 196 <!ENTITY sub "⊂"> <!-- subset of, U+2282 ISOtech --> 197 <!ENTITY sup "⊃"> <!-- superset of, U+2283 ISOtech --> 198 <!ENTITY nsub "⊄"> <!-- not a subset of, U+2284 ISOamsn --> 199 <!ENTITY sube "⊆"> <!-- subset of or equal to, U+2286 ISOtech --> 200 <!ENTITY supe "⊇"> <!-- superset of or equal to, 201 U+2287 ISOtech --> 202 <!ENTITY oplus "⊕"> <!-- circled plus = direct sum, 203 U+2295 ISOamsb --> 204 <!ENTITY otimes "⊗"> <!-- circled times = vector product, 205 U+2297 ISOamsb --> 206 <!ENTITY perp "⊥"> <!-- up tack = orthogonal to = perpendicular, 207 U+22A5 ISOtech --> 208 <!ENTITY sdot "⋅"> <!-- dot operator, U+22C5 ISOamsb --> 209 <!-- dot operator is NOT the same character as U+00B7 middle dot --> 210 211 <!-- Miscellaneous Technical --> 212 <!ENTITY lceil "⌈"> <!-- left ceiling = APL upstile, 213 U+2308 ISOamsc --> 214 <!ENTITY rceil "⌉"> <!-- right ceiling, U+2309 ISOamsc --> 215 <!ENTITY lfloor "⌊"> <!-- left floor = APL downstile, 216 U+230A ISOamsc --> 217 <!ENTITY rfloor "⌋"> <!-- right floor, U+230B ISOamsc --> 218 <!ENTITY lang "〈"> <!-- left-pointing angle bracket = bra, 219 U+2329 ISOtech --> 220 <!-- lang is NOT the same character as U+003C 'less than sign' 221 or U+2039 'single left-pointing angle quotation mark' --> 222 <!ENTITY rang "〉"> <!-- right-pointing angle bracket = ket, 223 U+232A ISOtech --> 224 <!-- rang is NOT the same character as U+003E 'greater than sign' 225 or U+203A 'single right-pointing angle quotation mark' --> 226 227 <!-- Geometric Shapes --> 228 <!ENTITY loz "◊"> <!-- lozenge, U+25CA ISOpub --> 229 230 <!-- Miscellaneous Symbols --> 231 <!ENTITY spades "♠"> <!-- black spade suit, U+2660 ISOpub --> 232 <!-- black here seems to mean filled as opposed to hollow --> 233 <!ENTITY clubs "♣"> <!-- black club suit = shamrock, 234 U+2663 ISOpub --> 235 <!ENTITY hearts "♥"> <!-- black heart suit = valentine, 236 U+2665 ISOpub --> 237 <!ENTITY diams "♦"> <!-- black diamond suit, U+2666 ISOpub --> -
new file trac/tests/functional/xhtml1-strict.dtd
diff --git a/trac/tests/functional/xhtml1-strict.dtd b/trac/tests/functional/xhtml1-strict.dtd new file mode 100644
- + 1 <!-- 2 Extensible HTML version 1.0 Strict DTD 3 4 This is the same as HTML 4 Strict except for 5 changes due to the differences between XML and SGML. 6 7 Namespace = http://www.w3.org/1999/xhtml 8 9 For further information, see: http://www.w3.org/TR/xhtml1 10 11 Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio), 12 All Rights Reserved. 13 14 This DTD module is identified by the PUBLIC and SYSTEM identifiers: 15 16 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 17 SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 18 19 $Revision: 1.1 $ 20 $Date: 2002/08/01 13:56:03 $ 21 22 --> 23 24 <!--================ Character mnemonic entities =========================--> 25 26 <!ENTITY % HTMLlat1 PUBLIC 27 "-//W3C//ENTITIES Latin 1 for XHTML//EN" 28 "xhtml-lat1.ent"> 29 %HTMLlat1; 30 31 <!ENTITY % HTMLsymbol PUBLIC 32 "-//W3C//ENTITIES Symbols for XHTML//EN" 33 "xhtml-symbol.ent"> 34 %HTMLsymbol; 35 36 <!ENTITY % HTMLspecial PUBLIC 37 "-//W3C//ENTITIES Special for XHTML//EN" 38 "xhtml-special.ent"> 39 %HTMLspecial; 40 41 <!--================== Imported Names ====================================--> 42 43 <!ENTITY % ContentType "CDATA"> 44 <!-- media type, as per [RFC2045] --> 45 46 <!ENTITY % ContentTypes "CDATA"> 47 <!-- comma-separated list of media types, as per [RFC2045] --> 48 49 <!ENTITY % Charset "CDATA"> 50 <!-- a character encoding, as per [RFC2045] --> 51 52 <!ENTITY % Charsets "CDATA"> 53 <!-- a space separated list of character encodings, as per [RFC2045] --> 54 55 <!ENTITY % LanguageCode "NMTOKEN"> 56 <!-- a language code, as per [RFC3066] --> 57 58 <!ENTITY % Character "CDATA"> 59 <!-- a single character, as per section 2.2 of [XML] --> 60 61 <!ENTITY % Number "CDATA"> 62 <!-- one or more digits --> 63 64 <!ENTITY % LinkTypes "CDATA"> 65 <!-- space-separated list of link types --> 66 67 <!ENTITY % MediaDesc "CDATA"> 68 <!-- single or comma-separated list of media descriptors --> 69 70 <!ENTITY % URI "CDATA"> 71 <!-- a Uniform Resource Identifier, see [RFC2396] --> 72 73 <!ENTITY % UriList "CDATA"> 74 <!-- a space separated list of Uniform Resource Identifiers --> 75 76 <!ENTITY % Datetime "CDATA"> 77 <!-- date and time information. ISO date format --> 78 79 <!ENTITY % Script "CDATA"> 80 <!-- script expression --> 81 82 <!ENTITY % StyleSheet "CDATA"> 83 <!-- style sheet data --> 84 85 <!ENTITY % Text "CDATA"> 86 <!-- used for titles etc. --> 87 88 <!ENTITY % Length "CDATA"> 89 <!-- nn for pixels or nn% for percentage length --> 90 91 <!ENTITY % MultiLength "CDATA"> 92 <!-- pixel, percentage, or relative --> 93 94 <!ENTITY % Pixels "CDATA"> 95 <!-- integer representing length in pixels --> 96 97 <!-- these are used for image maps --> 98 99 <!ENTITY % Shape "(rect|circle|poly|default)"> 100 101 <!ENTITY % Coords "CDATA"> 102 <!-- comma separated list of lengths --> 103 104 <!--=================== Generic Attributes ===============================--> 105 106 <!-- core attributes common to most elements 107 id document-wide unique id 108 class space separated list of classes 109 style associated style info 110 title advisory title/amplification 111 --> 112 <!ENTITY % coreattrs 113 "id ID #IMPLIED 114 class CDATA #IMPLIED 115 style %StyleSheet; #IMPLIED 116 title %Text; #IMPLIED" 117 > 118 119 <!-- internationalization attributes 120 lang language code (backwards compatible) 121 xml:lang language code (as per XML 1.0 spec) 122 dir direction for weak/neutral text 123 --> 124 <!ENTITY % i18n 125 "lang %LanguageCode; #IMPLIED 126 xml:lang %LanguageCode; #IMPLIED 127 dir (ltr|rtl) #IMPLIED" 128 > 129 130 <!-- attributes for common UI events 131 onclick a pointer button was clicked 132 ondblclick a pointer button was double clicked 133 onmousedown a pointer button was pressed down 134 onmouseup a pointer button was released 135 onmousemove a pointer was moved onto the element 136 onmouseout a pointer was moved away from the element 137 onkeypress a key was pressed and released 138 onkeydown a key was pressed down 139 onkeyup a key was released 140 --> 141 <!ENTITY % events 142 "onclick %Script; #IMPLIED 143 ondblclick %Script; #IMPLIED 144 onmousedown %Script; #IMPLIED 145 onmouseup %Script; #IMPLIED 146 onmouseover %Script; #IMPLIED 147 onmousemove %Script; #IMPLIED 148 onmouseout %Script; #IMPLIED 149 onkeypress %Script; #IMPLIED 150 onkeydown %Script; #IMPLIED 151 onkeyup %Script; #IMPLIED" 152 > 153 154 <!-- attributes for elements that can get the focus 155 accesskey accessibility key character 156 tabindex position in tabbing order 157 onfocus the element got the focus 158 onblur the element lost the focus 159 --> 160 <!ENTITY % focus 161 "accesskey %Character; #IMPLIED 162 tabindex %Number; #IMPLIED 163 onfocus %Script; #IMPLIED 164 onblur %Script; #IMPLIED" 165 > 166 167 <!ENTITY % attrs "%coreattrs; %i18n; %events;"> 168 169 <!--=================== Text Elements ====================================--> 170 171 <!ENTITY % special.pre 172 "br | span | bdo | map"> 173 174 175 <!ENTITY % special 176 "%special.pre; | object | img "> 177 178 <!ENTITY % fontstyle "tt | i | b | big | small "> 179 180 <!ENTITY % phrase "em | strong | dfn | code | q | 181 samp | kbd | var | cite | abbr | acronym | sub | sup "> 182 183 <!ENTITY % inline.forms "input | select | textarea | label | button"> 184 185 <!-- these can occur at block or inline level --> 186 <!ENTITY % misc.inline "ins | del | script"> 187 188 <!-- these can only occur at block level --> 189 <!ENTITY % misc "noscript | %misc.inline;"> 190 191 <!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;"> 192 193 <!-- %Inline; covers inline or "text-level" elements --> 194 <!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*"> 195 196 <!--================== Block level elements ==============================--> 197 198 <!ENTITY % heading "h1|h2|h3|h4|h5|h6"> 199 <!ENTITY % lists "ul | ol | dl"> 200 <!ENTITY % blocktext "pre | hr | blockquote | address"> 201 202 <!ENTITY % block 203 "p | %heading; | div | %lists; | %blocktext; | fieldset | table"> 204 205 <!ENTITY % Block "(%block; | form | %misc;)*"> 206 207 <!-- %Flow; mixes block and inline and is used for list items etc. --> 208 <!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*"> 209 210 <!--================== Content models for exclusions =====================--> 211 212 <!-- a elements use %Inline; excluding a --> 213 214 <!ENTITY % a.content 215 "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*"> 216 217 <!-- pre uses %Inline excluding big, small, sup or sup --> 218 219 <!ENTITY % pre.content 220 "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline; 221 | %inline.forms;)*"> 222 223 <!-- form uses %Block; excluding form --> 224 225 <!ENTITY % form.content "(%block; | %misc;)*"> 226 227 <!-- button uses %Flow; but excludes a, form and form controls --> 228 229 <!ENTITY % button.content 230 "(#PCDATA | p | %heading; | div | %lists; | %blocktext; | 231 table | %special; | %fontstyle; | %phrase; | %misc;)*"> 232 233 <!--================ Document Structure ==================================--> 234 235 <!-- the namespace URI designates the document profile --> 236 237 <!ELEMENT html (head, body)> 238 <!ATTLIST html 239 %i18n; 240 id ID #IMPLIED 241 xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml' 242 > 243 244 <!--================ Document Head =======================================--> 245 246 <!ENTITY % head.misc "(script|style|meta|link|object)*"> 247 248 <!-- content model is %head.misc; combined with a single 249 title and an optional base element in any order --> 250 251 <!ELEMENT head (%head.misc;, 252 ((title, %head.misc;, (base, %head.misc;)?) | 253 (base, %head.misc;, (title, %head.misc;))))> 254 255 <!ATTLIST head 256 %i18n; 257 id ID #IMPLIED 258 profile %URI; #IMPLIED 259 > 260 261 <!-- The title element is not considered part of the flow of text. 262 It should be displayed, for example as the page header or 263 window title. Exactly one title is required per document. 264 --> 265 <!ELEMENT title (#PCDATA)> 266 <!ATTLIST title 267 %i18n; 268 id ID #IMPLIED 269 > 270 271 <!-- document base URI --> 272 273 <!ELEMENT base EMPTY> 274 <!ATTLIST base 275 href %URI; #REQUIRED 276 id ID #IMPLIED 277 > 278 279 <!-- generic metainformation --> 280 <!ELEMENT meta EMPTY> 281 <!ATTLIST meta 282 %i18n; 283 id ID #IMPLIED 284 http-equiv CDATA #IMPLIED 285 name CDATA #IMPLIED 286 content CDATA #REQUIRED 287 scheme CDATA #IMPLIED 288 > 289 290 <!-- 291 Relationship values can be used in principle: 292 293 a) for document specific toolbars/menus when used 294 with the link element in document head e.g. 295 start, contents, previous, next, index, end, help 296 b) to link to a separate style sheet (rel="stylesheet") 297 c) to make a link to a script (rel="script") 298 d) by stylesheets to control how collections of 299 html nodes are rendered into printed documents 300 e) to make a link to a printable version of this document 301 e.g. a PostScript or PDF version (rel="alternate" media="print") 302 --> 303 304 <!ELEMENT link EMPTY> 305 <!ATTLIST link 306 %attrs; 307 charset %Charset; #IMPLIED 308 href %URI; #IMPLIED 309 hreflang %LanguageCode; #IMPLIED 310 type %ContentType; #IMPLIED 311 rel %LinkTypes; #IMPLIED 312 rev %LinkTypes; #IMPLIED 313 media %MediaDesc; #IMPLIED 314 > 315 316 <!-- style info, which may include CDATA sections --> 317 <!ELEMENT style (#PCDATA)> 318 <!ATTLIST style 319 %i18n; 320 id ID #IMPLIED 321 type %ContentType; #REQUIRED 322 media %MediaDesc; #IMPLIED 323 title %Text; #IMPLIED 324 xml:space (preserve) #FIXED 'preserve' 325 > 326 327 <!-- script statements, which may include CDATA sections --> 328 <!ELEMENT script (#PCDATA)> 329 <!ATTLIST script 330 id ID #IMPLIED 331 charset %Charset; #IMPLIED 332 type %ContentType; #REQUIRED 333 src %URI; #IMPLIED 334 defer (defer) #IMPLIED 335 xml:space (preserve) #FIXED 'preserve' 336 > 337 338 <!-- alternate content container for non script-based rendering --> 339 340 <!ELEMENT noscript %Block;> 341 <!ATTLIST noscript 342 %attrs; 343 > 344 345 <!--=================== Document Body ====================================--> 346 347 <!ELEMENT body %Block;> 348 <!ATTLIST body 349 %attrs; 350 onload %Script; #IMPLIED 351 onunload %Script; #IMPLIED 352 > 353 354 <!ELEMENT div %Flow;> <!-- generic language/style container --> 355 <!ATTLIST div 356 %attrs; 357 > 358 359 <!--=================== Paragraphs =======================================--> 360 361 <!ELEMENT p %Inline;> 362 <!ATTLIST p 363 %attrs; 364 > 365 366 <!--=================== Headings =========================================--> 367 368 <!-- 369 There are six levels of headings from h1 (the most important) 370 to h6 (the least important). 371 --> 372 373 <!ELEMENT h1 %Inline;> 374 <!ATTLIST h1 375 %attrs; 376 > 377 378 <!ELEMENT h2 %Inline;> 379 <!ATTLIST h2 380 %attrs; 381 > 382 383 <!ELEMENT h3 %Inline;> 384 <!ATTLIST h3 385 %attrs; 386 > 387 388 <!ELEMENT h4 %Inline;> 389 <!ATTLIST h4 390 %attrs; 391 > 392 393 <!ELEMENT h5 %Inline;> 394 <!ATTLIST h5 395 %attrs; 396 > 397 398 <!ELEMENT h6 %Inline;> 399 <!ATTLIST h6 400 %attrs; 401 > 402 403 <!--=================== Lists ============================================--> 404 405 <!-- Unordered list --> 406 407 <!ELEMENT ul (li)+> 408 <!ATTLIST ul 409 %attrs; 410 > 411 412 <!-- Ordered (numbered) list --> 413 414 <!ELEMENT ol (li)+> 415 <!ATTLIST ol 416 %attrs; 417 > 418 419 <!-- list item --> 420 421 <!ELEMENT li %Flow;> 422 <!ATTLIST li 423 %attrs; 424 > 425 426 <!-- definition lists - dt for term, dd for its definition --> 427 428 <!ELEMENT dl (dt|dd)+> 429 <!ATTLIST dl 430 %attrs; 431 > 432 433 <!ELEMENT dt %Inline;> 434 <!ATTLIST dt 435 %attrs; 436 > 437 438 <!ELEMENT dd %Flow;> 439 <!ATTLIST dd 440 %attrs; 441 > 442 443 <!--=================== Address ==========================================--> 444 445 <!-- information on author --> 446 447 <!ELEMENT address %Inline;> 448 <!ATTLIST address 449 %attrs; 450 > 451 452 <!--=================== Horizontal Rule ==================================--> 453 454 <!ELEMENT hr EMPTY> 455 <!ATTLIST hr 456 %attrs; 457 > 458 459 <!--=================== Preformatted Text ================================--> 460 461 <!-- content is %Inline; excluding "img|object|big|small|sub|sup" --> 462 463 <!ELEMENT pre %pre.content;> 464 <!ATTLIST pre 465 %attrs; 466 xml:space (preserve) #FIXED 'preserve' 467 > 468 469 <!--=================== Block-like Quotes ================================--> 470 471 <!ELEMENT blockquote %Block;> 472 <!ATTLIST blockquote 473 %attrs; 474 cite %URI; #IMPLIED 475 > 476 477 <!--=================== Inserted/Deleted Text ============================--> 478 479 <!-- 480 ins/del are allowed in block and inline content, but its 481 inappropriate to include block content within an ins element 482 occurring in inline content. 483 --> 484 <!ELEMENT ins %Flow;> 485 <!ATTLIST ins 486 %attrs; 487 cite %URI; #IMPLIED 488 datetime %Datetime; #IMPLIED 489 > 490 491 <!ELEMENT del %Flow;> 492 <!ATTLIST del 493 %attrs; 494 cite %URI; #IMPLIED 495 datetime %Datetime; #IMPLIED 496 > 497 498 <!--================== The Anchor Element ================================--> 499 500 <!-- content is %Inline; except that anchors shouldn't be nested --> 501 502 <!ELEMENT a %a.content;> 503 <!ATTLIST a 504 %attrs; 505 %focus; 506 charset %Charset; #IMPLIED 507 type %ContentType; #IMPLIED 508 name NMTOKEN #IMPLIED 509 href %URI; #IMPLIED 510 hreflang %LanguageCode; #IMPLIED 511 rel %LinkTypes; #IMPLIED 512 rev %LinkTypes; #IMPLIED 513 shape %Shape; "rect" 514 coords %Coords; #IMPLIED 515 > 516 517 <!--===================== Inline Elements ================================--> 518 519 <!ELEMENT span %Inline;> <!-- generic language/style container --> 520 <!ATTLIST span 521 %attrs; 522 > 523 524 <!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride --> 525 <!ATTLIST bdo 526 %coreattrs; 527 %events; 528 lang %LanguageCode; #IMPLIED 529 xml:lang %LanguageCode; #IMPLIED 530 dir (ltr|rtl) #REQUIRED 531 > 532 533 <!ELEMENT br EMPTY> <!-- forced line break --> 534 <!ATTLIST br 535 %coreattrs; 536 > 537 538 <!ELEMENT em %Inline;> <!-- emphasis --> 539 <!ATTLIST em %attrs;> 540 541 <!ELEMENT strong %Inline;> <!-- strong emphasis --> 542 <!ATTLIST strong %attrs;> 543 544 <!ELEMENT dfn %Inline;> <!-- definitional --> 545 <!ATTLIST dfn %attrs;> 546 547 <!ELEMENT code %Inline;> <!-- program code --> 548 <!ATTLIST code %attrs;> 549 550 <!ELEMENT samp %Inline;> <!-- sample --> 551 <!ATTLIST samp %attrs;> 552 553 <!ELEMENT kbd %Inline;> <!-- something user would type --> 554 <!ATTLIST kbd %attrs;> 555 556 <!ELEMENT var %Inline;> <!-- variable --> 557 <!ATTLIST var %attrs;> 558 559 <!ELEMENT cite %Inline;> <!-- citation --> 560 <!ATTLIST cite %attrs;> 561 562 <!ELEMENT abbr %Inline;> <!-- abbreviation --> 563 <!ATTLIST abbr %attrs;> 564 565 <!ELEMENT acronym %Inline;> <!-- acronym --> 566 <!ATTLIST acronym %attrs;> 567 568 <!ELEMENT q %Inline;> <!-- inlined quote --> 569 <!ATTLIST q 570 %attrs; 571 cite %URI; #IMPLIED 572 > 573 574 <!ELEMENT sub %Inline;> <!-- subscript --> 575 <!ATTLIST sub %attrs;> 576 577 <!ELEMENT sup %Inline;> <!-- superscript --> 578 <!ATTLIST sup %attrs;> 579 580 <!ELEMENT tt %Inline;> <!-- fixed pitch font --> 581 <!ATTLIST tt %attrs;> 582 583 <!ELEMENT i %Inline;> <!-- italic font --> 584 <!ATTLIST i %attrs;> 585 586 <!ELEMENT b %Inline;> <!-- bold font --> 587 <!ATTLIST b %attrs;> 588 589 <!ELEMENT big %Inline;> <!-- bigger font --> 590 <!ATTLIST big %attrs;> 591 592 <!ELEMENT small %Inline;> <!-- smaller font --> 593 <!ATTLIST small %attrs;> 594 595 <!--==================== Object ======================================--> 596 <!-- 597 object is used to embed objects as part of HTML pages. 598 param elements should precede other content. Parameters 599 can also be expressed as attribute/value pairs on the 600 object element itself when brevity is desired. 601 --> 602 603 <!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*> 604 <!ATTLIST object 605 %attrs; 606 declare (declare) #IMPLIED 607 classid %URI; #IMPLIED 608 codebase %URI; #IMPLIED 609 data %URI; #IMPLIED 610 type %ContentType; #IMPLIED 611 codetype %ContentType; #IMPLIED 612 archive %UriList; #IMPLIED 613 standby %Text; #IMPLIED 614 height %Length; #IMPLIED 615 width %Length; #IMPLIED 616 usemap %URI; #IMPLIED 617 name NMTOKEN #IMPLIED 618 tabindex %Number; #IMPLIED 619 > 620 621 <!-- 622 param is used to supply a named property value. 623 In XML it would seem natural to follow RDF and support an 624 abbreviated syntax where the param elements are replaced 625 by attribute value pairs on the object start tag. 626 --> 627 <!ELEMENT param EMPTY> 628 <!ATTLIST param 629 id ID #IMPLIED 630 name CDATA #IMPLIED 631 value CDATA #IMPLIED 632 valuetype (data|ref|object) "data" 633 type %ContentType; #IMPLIED 634 > 635 636 <!--=================== Images ===========================================--> 637 638 <!-- 639 To avoid accessibility problems for people who aren't 640 able to see the image, you should provide a text 641 description using the alt and longdesc attributes. 642 In addition, avoid the use of server-side image maps. 643 Note that in this DTD there is no name attribute. That 644 is only available in the transitional and frameset DTD. 645 --> 646 647 <!ELEMENT img EMPTY> 648 <!ATTLIST img 649 %attrs; 650 src %URI; #REQUIRED 651 alt %Text; #REQUIRED 652 longdesc %URI; #IMPLIED 653 height %Length; #IMPLIED 654 width %Length; #IMPLIED 655 usemap %URI; #IMPLIED 656 ismap (ismap) #IMPLIED 657 > 658 659 <!-- usemap points to a map element which may be in this document 660 or an external document, although the latter is not widely supported --> 661 662 <!--================== Client-side image maps ============================--> 663 664 <!-- These can be placed in the same document or grouped in a 665 separate document although this isn't yet widely supported --> 666 667 <!ELEMENT map ((%block; | form | %misc;)+ | area+)> 668 <!ATTLIST map 669 %i18n; 670 %events; 671 id ID #REQUIRED 672 class CDATA #IMPLIED 673 style %StyleSheet; #IMPLIED 674 title %Text; #IMPLIED 675 name NMTOKEN #IMPLIED 676 > 677 678 <!ELEMENT area EMPTY> 679 <!ATTLIST area 680 %attrs; 681 %focus; 682 shape %Shape; "rect" 683 coords %Coords; #IMPLIED 684 href %URI; #IMPLIED 685 nohref (nohref) #IMPLIED 686 alt %Text; #REQUIRED 687 > 688 689 <!--================ Forms ===============================================--> 690 <!ELEMENT form %form.content;> <!-- forms shouldn't be nested --> 691 692 <!ATTLIST form 693 %attrs; 694 action %URI; #REQUIRED 695 method (get|post) "get" 696 enctype %ContentType; "application/x-www-form-urlencoded" 697 onsubmit %Script; #IMPLIED 698 onreset %Script; #IMPLIED 699 accept %ContentTypes; #IMPLIED 700 accept-charset %Charsets; #IMPLIED 701 > 702 703 <!-- 704 Each label must not contain more than ONE field 705 Label elements shouldn't be nested. 706 --> 707 <!ELEMENT label %Inline;> 708 <!ATTLIST label 709 %attrs; 710 for IDREF #IMPLIED 711 accesskey %Character; #IMPLIED 712 onfocus %Script; #IMPLIED 713 onblur %Script; #IMPLIED 714 > 715 716 <!ENTITY % InputType 717 "(text | password | checkbox | 718 radio | submit | reset | 719 file | hidden | image | button)" 720 > 721 722 <!-- the name attribute is required for all but submit & reset --> 723 724 <!ELEMENT input EMPTY> <!-- form control --> 725 <!ATTLIST input 726 %attrs; 727 %focus; 728 type %InputType; "text" 729 name CDATA #IMPLIED 730 value CDATA #IMPLIED 731 checked (checked) #IMPLIED 732 disabled (disabled) #IMPLIED 733 readonly (readonly) #IMPLIED 734 size CDATA #IMPLIED 735 maxlength %Number; #IMPLIED 736 src %URI; #IMPLIED 737 alt CDATA #IMPLIED 738 usemap %URI; #IMPLIED 739 onselect %Script; #IMPLIED 740 onchange %Script; #IMPLIED 741 accept %ContentTypes; #IMPLIED 742 > 743 744 <!ELEMENT select (optgroup|option)+> <!-- option selector --> 745 <!ATTLIST select 746 %attrs; 747 name CDATA #IMPLIED 748 size %Number; #IMPLIED 749 multiple (multiple) #IMPLIED 750 disabled (disabled) #IMPLIED 751 tabindex %Number; #IMPLIED 752 onfocus %Script; #IMPLIED 753 onblur %Script; #IMPLIED 754 onchange %Script; #IMPLIED 755 > 756 757 <!ELEMENT optgroup (option)+> <!-- option group --> 758 <!ATTLIST optgroup 759 %attrs; 760 disabled (disabled) #IMPLIED 761 label %Text; #REQUIRED 762 > 763 764 <!ELEMENT option (#PCDATA)> <!-- selectable choice --> 765 <!ATTLIST option 766 %attrs; 767 selected (selected) #IMPLIED 768 disabled (disabled) #IMPLIED 769 label %Text; #IMPLIED 770 value CDATA #IMPLIED 771 > 772 773 <!ELEMENT textarea (#PCDATA)> <!-- multi-line text field --> 774 <!ATTLIST textarea 775 %attrs; 776 %focus; 777 name CDATA #IMPLIED 778 rows %Number; #REQUIRED 779 cols %Number; #REQUIRED 780 disabled (disabled) #IMPLIED 781 readonly (readonly) #IMPLIED 782 onselect %Script; #IMPLIED 783 onchange %Script; #IMPLIED 784 > 785 786 <!-- 787 The fieldset element is used to group form fields. 788 Only one legend element should occur in the content 789 and if present should only be preceded by whitespace. 790 --> 791 <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*> 792 <!ATTLIST fieldset 793 %attrs; 794 > 795 796 <!ELEMENT legend %Inline;> <!-- fieldset label --> 797 <!ATTLIST legend 798 %attrs; 799 accesskey %Character; #IMPLIED 800 > 801 802 <!-- 803 Content is %Flow; excluding a, form and form controls 804 --> 805 <!ELEMENT button %button.content;> <!-- push button --> 806 <!ATTLIST button 807 %attrs; 808 %focus; 809 name CDATA #IMPLIED 810 value CDATA #IMPLIED 811 type (button|submit|reset) "submit" 812 disabled (disabled) #IMPLIED 813 > 814 815 <!--======================= Tables =======================================--> 816 817 <!-- Derived from IETF HTML table standard, see [RFC1942] --> 818 819 <!-- 820 The border attribute sets the thickness of the frame around the 821 table. The default units are screen pixels. 822 823 The frame attribute specifies which parts of the frame around 824 the table should be rendered. The values are not the same as 825 CALS to avoid a name clash with the valign attribute. 826 --> 827 <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> 828 829 <!-- 830 The rules attribute defines which rules to draw between cells: 831 832 If rules is absent then assume: 833 "none" if border is absent or border="0" otherwise "all" 834 --> 835 836 <!ENTITY % TRules "(none | groups | rows | cols | all)"> 837 838 <!-- horizontal alignment attributes for cell contents 839 840 char alignment char, e.g. char=':' 841 charoff offset for alignment char 842 --> 843 <!ENTITY % cellhalign 844 "align (left|center|right|justify|char) #IMPLIED 845 char %Character; #IMPLIED 846 charoff %Length; #IMPLIED" 847 > 848 849 <!-- vertical alignment attributes for cell contents --> 850 <!ENTITY % cellvalign 851 "valign (top|middle|bottom|baseline) #IMPLIED" 852 > 853 854 <!ELEMENT table 855 (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))> 856 <!ELEMENT caption %Inline;> 857 <!ELEMENT thead (tr)+> 858 <!ELEMENT tfoot (tr)+> 859 <!ELEMENT tbody (tr)+> 860 <!ELEMENT colgroup (col)*> 861 <!ELEMENT col EMPTY> 862 <!ELEMENT tr (th|td)+> 863 <!ELEMENT th %Flow;> 864 <!ELEMENT td %Flow;> 865 866 <!ATTLIST table 867 %attrs; 868 summary %Text; #IMPLIED 869 width %Length; #IMPLIED 870 border %Pixels; #IMPLIED 871 frame %TFrame; #IMPLIED 872 rules %TRules; #IMPLIED 873 cellspacing %Length; #IMPLIED 874 cellpadding %Length; #IMPLIED 875 > 876 877 <!ATTLIST caption 878 %attrs; 879 > 880 881 <!-- 882 colgroup groups a set of col elements. It allows you to group 883 several semantically related columns together. 884 --> 885 <!ATTLIST colgroup 886 %attrs; 887 span %Number; "1" 888 width %MultiLength; #IMPLIED 889 %cellhalign; 890 %cellvalign; 891 > 892 893 <!-- 894 col elements define the alignment properties for cells in 895 one or more columns. 896 897 The width attribute specifies the width of the columns, e.g. 898 899 width=64 width in screen pixels 900 width=0.5* relative width of 0.5 901 902 The span attribute causes the attributes of one 903 col element to apply to more than one column. 904 --> 905 <!ATTLIST col 906 %attrs; 907 span %Number; "1" 908 width %MultiLength; #IMPLIED 909 %cellhalign; 910 %cellvalign; 911 > 912 913 <!-- 914 Use thead to duplicate headers when breaking table 915 across page boundaries, or for static headers when 916 tbody sections are rendered in scrolling panel. 917 918 Use tfoot to duplicate footers when breaking table 919 across page boundaries, or for static footers when 920 tbody sections are rendered in scrolling panel. 921 922 Use multiple tbody sections when rules are needed 923 between groups of table rows. 924 --> 925 <!ATTLIST thead 926 %attrs; 927 %cellhalign; 928 %cellvalign; 929 > 930 931 <!ATTLIST tfoot 932 %attrs; 933 %cellhalign; 934 %cellvalign; 935 > 936 937 <!ATTLIST tbody 938 %attrs; 939 %cellhalign; 940 %cellvalign; 941 > 942 943 <!ATTLIST tr 944 %attrs; 945 %cellhalign; 946 %cellvalign; 947 > 948 949 950 <!-- Scope is simpler than headers attribute for common tables --> 951 <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> 952 953 <!-- th is for headers, td for data and for cells acting as both --> 954 955 <!ATTLIST th 956 %attrs; 957 abbr %Text; #IMPLIED 958 axis CDATA #IMPLIED 959 headers IDREFS #IMPLIED 960 scope %Scope; #IMPLIED 961 rowspan %Number; "1" 962 colspan %Number; "1" 963 %cellhalign; 964 %cellvalign; 965 > 966 967 <!ATTLIST td 968 %attrs; 969 abbr %Text; #IMPLIED 970 axis CDATA #IMPLIED 971 headers IDREFS #IMPLIED 972 scope %Scope; #IMPLIED 973 rowspan %Number; "1" 974 colspan %Number; "1" 975 %cellhalign; 976 %cellvalign; 977 > 978 -
trac/ticket/templates/query_results.html
diff --git a/trac/ticket/templates/query_results.html b/trac/ticket/templates/query_results.html
a b 44 44 </thead> 45 45 46 46 <tbody> 47 <tr py:if="not results" class="even"> 48 <td colspan="${len(headers)}"> 49 No tickets found 50 </td> 51 </tr> 47 52 <py:for each="idx, result in enumerate(results)"> 48 53 <py:with vars="ticket_context = context('ticket', result.id)"> 49 54 <py:if test="'TICKET_VIEW' in perm(ticket_context.resource)"> -
trac/ticket/templates/ticket.html
diff --git a/trac/ticket/templates/ticket.html b/trac/ticket/templates/ticket.html
a b 315 315 selected="${ticket[field.name] == option or None}" 316 316 py:content="option"></option> 317 317 <optgroup py:for="optgroup in field.optgroups" 318 py:if="optgroup.options" 318 319 label="${optgroup.label}"> 319 320 <option py:for="option in optgroup.options" 320 321 selected="${ticket[field.name] == option or None}" -
trac/versioncontrol/templates/browser.html
diff --git a/trac/versioncontrol/templates/browser.html b/trac/versioncontrol/templates/browser.html
a b 93 93 </tr> 94 94 </py:if> 95 95 <xi:include href="dir_entries.html" /> 96 <tr py:if="'up' not in chrome.links and not dir.entries" class="even"> 97 <td class="name" colspan="5"> 98 No files found 99 </td> 100 </tr> 96 101 </tbody> 97 102 </table> 98 103 </py:if> -
trac/versioncontrol/templates/revisionlog.html
diff --git a/trac/versioncontrol/templates/revisionlog.html b/trac/versioncontrol/templates/revisionlog.html
a b 97 97 </tr> 98 98 </thead> 99 99 <tbody> 100 <tr py:if="not items" class="even"> 101 <td /> 102 <td /> 103 <td class="copyfrom_path" colspan="6"> 104 No revisions found 105 </td> 106 </tr> 107 100 108 <py:for each="idx, item in enumerate(items)"> 101 109 <py:with vars="change = changes[item.rev]; 102 110 chgset_context = context('changeset', change.rev);
