NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 313 - Allow a DOCTYPE for XSLT compatibility (only).
Allow a DOCTYPE for XSLT compatibility (only).
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-25 11:53 CEST by Henri Sivonen
Modified: 2009-11-23 17:17 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2008-09-25 11:53:06 CEST
Index: source
===================================================================
--- source	(revision 2139)
+++ source	(revision 2140)
@@ -42806,6 +42806,7 @@
    <li>A U+0054 LATIN CAPITAL LETTER T or U+0074 LATIN SMALL LETTER T character.</li>
    <li>A U+004D LATIN CAPITAL LETTER M or U+006D LATIN SMALL LETTER M character.</li>
    <li>A U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L character.</li>
+   <li>Optionally, a <span>DOCTYPE legacy string</span> (defined below).</li>
    <li>Zero or more <span title="space character">space characters</span>.</li>
    <li>A U+003E GREATER-THAN SIGN (<code>&gt;</code>) character.</li>
   </ol>
@@ -42813,6 +42814,34 @@
   <p class="note">In other words, <code>&lt;!DOCTYPE HTML></code>,
   case-insensitively.</p>
 
+  <p>For the purposes of XSLT generators, which cannot output HTML
+  markup without a DOCTYPE, a <dfn>DOCTYPE legacy string</dfn> may be
+  inserted into the DOCTYPE (in the position defined above). This
+  string must consist of:</p>
+
+  <ol class="brief">
+   <li>One or more <span title="space character">space characters</span>.</li>
+   <li>A U+0050 LATIN CAPITAL LETTER P or U+0070 LATIN SMALL LETTER P character.</li>
+   <li>A U+0055 LATIN CAPITAL LETTER U or U+0075 LATIN SMALL LETTER U character.</li>
+   <li>A U+0042 LATIN CAPITAL LETTER B or U+0062 LATIN SMALL LETTER B character.</li>
+   <li>A U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L character.</li>
+   <li>A U+0049 LATIN CAPITAL LETTER I or U+0069 LATIN SMALL LETTER I character.</li>
+   <li>A U+0043 LATIN CAPITAL LETTER C or U+0063 LATIN SMALL LETTER C character.</li>
+   <li>One or more <span title="space character">space characters</span>.</li>
+   <li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character.</li>
+   <li>The literal string "<code titel="">XSLT-generated</code>".</li>
+   <li>The same character as in item 8 (a matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character).</li>
+  </ol>
+
+  <p class="note">In other words, <code>&lt;!DOCTYPE HTML PUBLIC
+  "XSLT-generated"></code> or <code>&lt;!DOCTYPE HTML PUBLIC
+  'XSLT-generated'></code>, case-insensitively except for the bit in
+  quotes.</p>
+
+  <p>The <span>DOCTYPE legacy string</span> should not be used unless
+  the document is generated from XSLT.</p>
+
+
 
   <h4>Elements</h4>
 
@@ -46589,14 +46618,15 @@
 
     <p>If the DOCTYPE token's <code title="">name</code> is not an
     <span>ASCII case-insensitive</span> match for the string "<code
-    title="">HTML</code>", or if the token's public identifier is not
-    missing, or if the token's system identifier is not missing, then
-    there is a <span>parse error</span>. Conformance checkers may,
-    instead of reporting this error, switch to a conformance checking
-    mode for another language (e.g. based on the DOCTYPE token a
-    conformance checker could recognize that the document is an
-    HTML4-era document, and defer to an HTML4 conformance
-    checker.)</p>
+    title="">HTML</code>", or if the token's public identifier is
+    neither missing nor equal to the string
+    "<code>XSLT-generated</code>", or if the token's system identifier
+    is not missing, then there is a <span>parse
+    error</span>. Conformance checkers may, instead of reporting this
+    error, switch to a conformance checking mode for another language
+    (e.g. based on the DOCTYPE token a conformance checker could
+    recognize that the document is an HTML4-era document, and defer to
+    an HTML4 conformance checker.)</p>
 
     <p>Append a <code>DocumentType</code> node to the
     <code>Document</code> node, with the <code title="">name</code>