Skip to content
Permalink
Browse files

[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 8aa19732e984498282e20543eb8b5d1f92015785
Showing with 114 additions and 35 deletions.
  1. +76 −27 index
  2. +38 −8 source
103 index
<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>.

<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

<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
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>:
<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>:
<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
<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;)
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>:
<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>:

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

<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;)
<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;)
</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>:

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

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

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


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

0 comments on commit 8aa1973

Please sign in to comment.
You can’t perform that action at this time.