Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[act] (0) Allow a DOCTYPE for XSLT compatibility (only).
git-svn-id: http://svn.whatwg.org/webapps@2140 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 2, 2008
1 parent 2e43585 commit 8aa1973
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 35 deletions.
103 changes: 76 additions & 27 deletions index
Expand Up @@ -45398,6 +45398,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<li>A U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L
character.

<li>Optionally, a <a href="#doctype6">DOCTYPE legacy string</a> (defined
below).

<li>Zero or more <a href="#space" title="space character">space
characters</a>.

Expand All @@ -45407,6 +45410,51 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p class=note>In other words, <code>&lt;!DOCTYPE HTML></code>,
case-insensitively.

<p>For the purposes of XSLT generators, which cannot output HTML markup
without a DOCTYPE, a <dfn id=doctype6>DOCTYPE legacy string</dfn> may be
inserted into the DOCTYPE (in the position defined above). This string
must consist of:

<ol class=brief>
<li>One or more <a href="#space" title="space character">space
characters</a>.

<li>A U+0050 LATIN CAPITAL LETTER P or U+0070 LATIN SMALL LETTER P
character.

<li>A U+0055 LATIN CAPITAL LETTER U or U+0075 LATIN SMALL LETTER U
character.

<li>A U+0042 LATIN CAPITAL LETTER B or U+0062 LATIN SMALL LETTER B
character.

<li>A U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L
character.

<li>A U+0049 LATIN CAPITAL LETTER I or U+0069 LATIN SMALL LETTER I
character.

<li>A U+0043 LATIN CAPITAL LETTER C or U+0063 LATIN SMALL LETTER C
character.

<li>One or more <a href="#space" title="space character">space
characters</a>.

<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character.

<li>The literal string "<code titel="">XSLT-generated</code>".

<li>The same character as in item 8 (a matching U+0022 QUOTATION MARK or
U+0027 APOSTROPHE character).
</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>The <a href="#doctype6">DOCTYPE legacy string</a> should not be used
unless the document is generated from XSLT.

<h4 id=elements1><span class=secno>8.1.2 </span>Elements</h4>

<p>There are five different kinds of <dfn id=elements3
Expand Down Expand Up @@ -48200,7 +48248,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>Otherwise, if the next seven characters are an <a href="#ascii">ASCII
case-insensitive</a> match for the word "DOCTYPE", then consume those
characters and switch to the <a href="#doctype6">DOCTYPE state</a>.
characters and switch to the <a href="#doctype7">DOCTYPE state</a>.

<p>Otherwise, if the <span>insertion mode</span> is "<a href="#in-foreign"
title="insertion mode: in foreign content">in foreign content</a>" and the
Expand Down Expand Up @@ -48356,7 +48404,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
the <a href="#comment">comment state</a>.
</dl>

<h5 id=doctype><span class=secno>8.2.4.23. </span><dfn id=doctype6>DOCTYPE
<h5 id=doctype><span class=secno>8.2.4.23. </span><dfn id=doctype7>DOCTYPE
state</dfn></h5>

<p>Consume the <a href="#next-input">next input character</a>:
Expand Down Expand Up @@ -48411,10 +48459,10 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Create a new DOCTYPE token. Set the token's name to the current input
character. Switch to the <a href="#doctype7">DOCTYPE name state</a>.
character. Switch to the <a href="#doctype8">DOCTYPE name state</a>.
</dl>

<h5 id=doctype0><span class=secno>8.2.4.25. </span><dfn id=doctype7>DOCTYPE
<h5 id=doctype0><span class=secno>8.2.4.25. </span><dfn id=doctype8>DOCTYPE
name state</dfn></h5>

<p>First, consume the <a href="#next-input">next input character</a>:
Expand Down Expand Up @@ -48445,7 +48493,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Append the current input character to the current DOCTYPE token's
name. Stay in the <a href="#doctype7">DOCTYPE name state</a>.
name. Stay in the <a href="#doctype8">DOCTYPE name state</a>.
</dl>

<h5 id=after1><span class=secno>8.2.4.26. </span><dfn id=after6>After
Expand Down Expand Up @@ -48515,13 +48563,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>U+0022 QUOTATION MARK (&quot;)

<dd>Set the DOCTYPE token's public identifier to the empty string (not
missing), then switch to the <a href="#doctype8">DOCTYPE public
missing), then switch to the <a href="#doctype9">DOCTYPE public
identifier (double-quoted) state</a>.

<dt>U+0027 APOSTROPHE (')

<dd>Set the DOCTYPE token's public identifier to the empty string (not
missing), then switch to the <a href="#doctype9">DOCTYPE public
missing), then switch to the <a href="#doctype10">DOCTYPE public
identifier (single-quoted) state</a>.

<dt>U+003E GREATER-THAN SIGN (&gt;)
Expand All @@ -48543,7 +48591,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
href="#bogus2">bogus DOCTYPE state</a>.
</dl>

<h5 id=doctype1><span class=secno>8.2.4.28. </span><dfn id=doctype8>DOCTYPE
<h5 id=doctype1><span class=secno>8.2.4.28. </span><dfn id=doctype9>DOCTYPE
public identifier (double-quoted) state</dfn></h5>

<p>Consume the <a href="#next-input">next input character</a>:
Expand All @@ -48569,12 +48617,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Append the current input character to the current DOCTYPE token's
public identifier. Stay in the <a href="#doctype8">DOCTYPE public
public identifier. Stay in the <a href="#doctype9">DOCTYPE public
identifier (double-quoted) state</a>.
</dl>

<h5 id=doctype2><span class=secno>8.2.4.29. </span><dfn id=doctype9>DOCTYPE
public identifier (single-quoted) state</dfn></h5>
<h5 id=doctype2><span class=secno>8.2.4.29. </span><dfn
id=doctype10>DOCTYPE public identifier (single-quoted) state</dfn></h5>

<p>Consume the <a href="#next-input">next input character</a>:

Expand All @@ -48599,7 +48647,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Append the current input character to the current DOCTYPE token's
public identifier. Stay in the <a href="#doctype9">DOCTYPE public
public identifier. Stay in the <a href="#doctype10">DOCTYPE public
identifier (single-quoted) state</a>.
</dl>

Expand All @@ -48624,13 +48672,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>U+0022 QUOTATION MARK (&quot;)

<dd>Set the DOCTYPE token's system identifier to the empty string (not
missing), then switch to the <a href="#doctype10">DOCTYPE system
missing), then switch to the <a href="#doctype11">DOCTYPE system
identifier (double-quoted) state</a>.

<dt>U+0027 APOSTROPHE (')

<dd>Set the DOCTYPE token's system identifier to the empty string (not
missing), then switch to the <a href="#doctype11">DOCTYPE system
missing), then switch to the <a href="#doctype12">DOCTYPE system
identifier (single-quoted) state</a>.

<dt>U+003E GREATER-THAN SIGN (&gt;)
Expand Down Expand Up @@ -48672,13 +48720,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>U+0022 QUOTATION MARK (&quot;)

<dd>Set the DOCTYPE token's system identifier to the empty string (not
missing), then switch to the <a href="#doctype10">DOCTYPE system
missing), then switch to the <a href="#doctype11">DOCTYPE system
identifier (double-quoted) state</a>.

<dt>U+0027 APOSTROPHE (')

<dd>Set the DOCTYPE token's system identifier to the empty string (not
missing), then switch to the <a href="#doctype11">DOCTYPE system
missing), then switch to the <a href="#doctype12">DOCTYPE system
identifier (single-quoted) state</a>.

<dt>U+003E GREATER-THAN SIGN (&gt;)
Expand All @@ -48701,7 +48749,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
</dl>

<h5 id=doctype3><span class=secno>8.2.4.32. </span><dfn
id=doctype10>DOCTYPE system identifier (double-quoted) state</dfn></h5>
id=doctype11>DOCTYPE system identifier (double-quoted) state</dfn></h5>

<p>Consume the <a href="#next-input">next input character</a>:

Expand All @@ -48726,12 +48774,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Append the current input character to the current DOCTYPE token's
system identifier. Stay in the <a href="#doctype10">DOCTYPE system
system identifier. Stay in the <a href="#doctype11">DOCTYPE system
identifier (double-quoted) state</a>.
</dl>

<h5 id=doctype4><span class=secno>8.2.4.33. </span><dfn
id=doctype11>DOCTYPE system identifier (single-quoted) state</dfn></h5>
id=doctype12>DOCTYPE system identifier (single-quoted) state</dfn></h5>

<p>Consume the <a href="#next-input">next input character</a>:

Expand All @@ -48756,7 +48804,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>Anything else

<dd>Append the current input character to the current DOCTYPE token's
system identifier. Stay in the <a href="#doctype11">DOCTYPE system
system identifier. Stay in the <a href="#doctype12">DOCTYPE system
identifier (single-quoted) state</a>.
</dl>

Expand Down Expand Up @@ -49643,13 +49691,14 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dd>
<p>If the DOCTYPE token's <code title="">name</code> is not an <a
href="#ascii">ASCII case-insensitive</a> 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 <a href="#parse2">parse error</a>. 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 <a
href="#parse2">parse error</a>. 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> attribute set to the name
Expand Down
46 changes: 38 additions & 8 deletions source
Expand Up @@ -42806,13 +42806,42 @@ interface <dfn>MessageChannel</dfn> {
<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>

<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>

Expand Down Expand Up @@ -46589,14 +46618,15 @@ interface <dfn>MessageChannel</dfn> {

<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>
Expand Down

0 comments on commit 8aa1973

Please sign in to comment.