html5/spec Overview.html,1.919,1.920

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv10547

Modified Files:
	Overview.html 
Log Message:
add support for the new html elements. fix the handling of optional tags we added recently. also: clarify some notes, remove redundant requirements, clean up some punctuation. (whatwg r1731)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.919
retrieving revision 1.920
diff -u -d -r1.919 -r1.920
--- Overview.html	6 Jun 2008 19:04:14 -0000	1.919
+++ Overview.html	7 Jun 2008 00:28:28 -0000	1.920
@@ -59,7 +59,7 @@
     for HTML and XHTML</h2>
 
    <h2 class="no-num no-toc" id=w3c-working>W3C Working Draft
-    <!--ZZZ  6 June 2008-->9 June 2008</h2>
+    <!--ZZZ  7 June 2008-->9 June 2008</h2>
 
    <dl><!-- ZZZ: replace '20080609' with '[CDATA]' -->
 
@@ -199,7 +199,7 @@
   <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is
    the W3C working group responsible for this specification's progress along
    the W3C Recommendation track. <!--ZZZ:--> This specification is the
-   <!-- ZZZ  6 June 2008 --> 9 June 2008 Working Draft. <!--:ZZZ--></p>
+   <!-- ZZZ  7 June 2008 --> 9 June 2008 Working Draft. <!--:ZZZ--></p>
   <!-- relationship to other work (required) -->
 
   <p>This specification is also being produced by the <a
@@ -5188,7 +5188,7 @@
  Test: http://www.hixie.ch/tests/adhoc/html/flow/image-maps/004-demo.html
  IE6 on Wine treats the following characters like this also: U+1-U+1f,
  U+21-U+2b, U+2d-U+2f, U+3a, U+3c-U+40, U+5b-U+60, U+7b-U+82,
- U+84-U+89, U+8b, U+8d, U+8f-U`+99, U+9b, U+9d, U+a0-U+bf, U+d7, U+f7,
+ U+84-U+89, U+8b, U+8d, U+8f-U+99, U+9b, U+9d, U+a0-U+bf, U+d7, U+f7,
  U+1f6-U+1f9, U+218-U+24f, U+2a9-U+385, U+387, U+38b, U+38d, U+3a2,
  U+3cf, U+3d7-U+3d9, U+3db, U+3dd, U+3df, U+3e1, U+3f4-U+400, U+40d,
  U+450, U+45d, U+482-U+48f, U+4c5-U+4c6, U+4c9-U+4ca, U+4cd-U+4cf,
@@ -8938,20 +8938,6 @@
    element (if any), and that element's child nodes. Otherwise, the specified
    styles must, if applied, be applied to the entire document.
 
-  <p>If the <code title=attr-style-scoped><a href="#scoped">scoped</a></code>
-   attribute is not specified, the <code><a href="#style1">style</a></code>
-   element must be the child of a <code><a href="#head">head</a></code>
-   element or of a <code><a href="#noscript">noscript</a></code> element that
-   is a child of a <code><a href="#head">head</a></code> element.
-
-  <p>If the <code title=attr-style-scoped><a href="#scoped">scoped</a></code>
-   attribute <em>is</em> specified, then the <code><a
-   href="#style1">style</a></code> element must be the child of a <a
-   href="#flow-content0">flow content</a> element, before any text nodes
-   other than <a href="#inter-element">inter-element whitespace</a>, and
-   before any elements other than other <code><a
-   href="#style1">style</a></code> elements.
-
   <p id=title-on-style>The <dfn id=title3
    title=attr-style-title><code>title</code></dfn> attribute on <code><a
    href="#style1">style</a></code> elements defines <a
@@ -41888,13 +41874,11 @@
    title=syntax-comments>comment</a>, except if the first thing inside the
    <code><a href="#body0">body</a></code> element is a <code><a
    href="#script1">script</a></code> or <code><a
-   href="#style1">style</a></code>
-   element<!-- and the node immediately preceding
-  the <code>body</code> element is a <code>head</code> element whose
-  end tag has been omitted (XXX this last bit is commented out for now
-  because we have the dubious rule in the parser that makes <style>
-  and <script> elements between </head> and <body> end up in the
-  <head> instead of the <body>)-->.</p>
+   href="#style1">style</a></code> element.
+   <!-- Note that even if the </head> end
+  tag is present, the parser makes <style> and <script> elements
+  between </head> and <body> end up in the <head> instead of implying
+  the <body> --></p>
   <!-- </body> -->
 
   <p>A <code><a href="#body0">body</a></code> element's <span
@@ -43234,9 +43218,9 @@
      href="#h3">h3</a></code>, <code><a href="#h4">h4</a></code>, <code><a
      href="#h5">h5</a></code>, <code><a href="#h6">h6</a></code>, <code><a
      href="#head">head</a></code>, <code><a href="#hr">hr</a></code>,
-     <code><a href="#iframe">iframe</a></code>,
-     <code>image</code><!-- XXX ? this isn't an element that can end up
-   on the stack-->,
+     <code><a href="#iframe">iframe</a></code>, <!--
+   <code>image</code>, (commented out because this isn't an element
+   that can end up on the stack, so it doesn't matter) -->
      <code><a href="#img">img</a></code>, <code>input</code>,
      <code>isindex</code>, <code><a href="#li">li</a></code>, <code><a
      href="#link">link</a></code>, <code>listing</code>, <code><a
@@ -45669,7 +45653,8 @@
    end tags</dfn>, then, while the <a href="#current5">current node</a> is a
    <code><a href="#dd">dd</a></code> element, a <code><a
    href="#dt">dt</a></code> element, an <code><a href="#li">li</a></code>
-   element, a <code><a href="#p">p</a></code> element, an <code><a
+   element, an <code>option</code> element, an <code>optgroup</code> element,
+   a <code><a href="#p">p</a></code> element, an <code><a
    href="#rp">rp</a></code> element, or an <code><a href="#rt">rt</a></code>
    element, the UA must pop the <a href="#current5">current node</a> off the
    <a href="#stack">stack of open elements</a>.
@@ -46209,7 +46194,8 @@
      href="#in-body" title="insertion mode: in body">in body</a>"
      <span>insertion mode</span>.</p>
 
-   <dt>A start tag whose tag name is one of: "base", "link"
+   <dt>A start tag whose tag name is one of: "base", "command",
+    "event-source", "link"
 
    <dd>
     <p><a href="#insert0">Insert an HTML element</a> for the token.
@@ -46255,7 +46241,7 @@
     <p>Follow the <a href="#generic0">generic RCDATA parsing algorithm</a>.</p>
 
    <dt>A start tag whose tag name is "noscript", if the <a
-    href="#scripting2">scripting flag</a> is enabled:
+    href="#scripting2">scripting flag</a> is enabled
 
    <dt>A start tag whose tag name is one of: "noframes", "style"
 
@@ -46263,7 +46249,7 @@
     <p>Follow the <a href="#generic">generic CDATA parsing algorithm</a>.</p>
 
    <dt>A start tag whose tag name is "noscript", if the <a
-    href="#scripting2">scripting flag</a> is disabled:
+    href="#scripting2">scripting flag</a> is disabled
 
    <dd>
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
@@ -46612,8 +46598,8 @@
      the <a href="#stack">stack of open elements</a>. If it is not, add the
      attribute and its corresponding value to that element.</p>
 
-   <dt>A start tag token whose tag name is one of: "base", "link", "meta",
-    "noframes", "script", "style", "title"
+   <dt>A start tag token whose tag name is one of: "base", "command",
+    "event-source", "link", "meta", "noframes", "script", "style", "title"
 
    <dd>
     <p>Process the token <a href="#using8">using the rules for</a> the "<a
@@ -46691,10 +46677,14 @@
 
     <p class=note>The fake end tag token here can only be ignored in the <a
      href="#fragment">fragment case</a>.</p>
+   </dd>
+   <!-- start tags for non-phrasing flow content elements -->
+   <!-- the normal ones -->
 
-   <dt>A start tag whose tag name is one of: "address", "blockquote",
-    "center", "dir", "div", "dl", "fieldset", "h1", "h2", "h3", "h4", "h5",
-    "h6", "menu", "ol", "p", "ul"
+   <dt>A start tag whose tag name is one of: "address", "article", "aside",
+    "blockquote", "center", "datagrid", "dialog", "dir", "div", "dl",
+    "fieldset", "footer", "h1", "h2", "h3", "h4", "h5", "h6", "header",
+    "menu", "nav", "ol", "p", "section", "ul"
 
    <dd> <!-- As of May 2008 this doesn't match any browser exactly, but is
     as close to what IE does as I can get without doing the non-tree
@@ -46719,6 +46709,8 @@
     -->
     
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
+   </dd>
+   <!-- as normal, but drops leading newline -->
 
    <dt>A start tag whose tag name is one of: "pre", "listing"
 
@@ -46734,6 +46726,8 @@
      ignore that token and move on to the next one. (Newlines at the start of
      <code><a href="#pre">pre</a></code> blocks are ignored as an authoring
      convenience.)</p>
+   </dd>
+   <!-- as normal, but interacts with the form element pointer -->
 
    <dt>A start tag whose tag name is "form"
 
@@ -46752,15 +46746,12 @@
     <p><a href="#insert0">Insert an HTML element</a> for the token, and set
      the <code title=form>form</code> element pointer to point to the element
      created.</p>
+   </dd>
+   <!-- as normal, but imply </li> when there's another <li> open in weird cases -->
 
    <dt>A start tag whose tag name is "li"
 
    <dd>
-    <p>If the <a href="#stack">stack of open elements</a> <a href="#have-an"
-     title="has an element in scope">has a <code>p</code> element in
-     scope</a>, then act as if an end tag with the tag name <code><a
-     href="#p">p</a></code> had been seen.</p>
-
     <p>Run the following algorithm:</p>
 
     <ol>
@@ -46770,42 +46761,44 @@
 
      <li>
       <p>If <var title="">node</var> is an <code><a href="#li">li</a></code>
-       element, then pop all the nodes from the <a href="#current5">current
-       node</a> up to <var title="">node</var>, including <var
-       title="">node</var>, then stop this algorithm. If more than one node
-       is popped, then this is a <a href="#parse1">parse error</a>.
+       element, then act as if an end tag with the tag name <code><a
+       href="#li">li</a></code> had been seen, then jump to the last step.
 
      <li>
       <p>If <var title="">node</var> is not in the <a
        href="#formatting">formatting</a> category, and is not in the <a
        href="#phrasing1">phrasing</a> category, and is not an <code><a
        href="#address">address</a></code> or <code><a
-       href="#div">div</a></code> element, then stop this algorithm.
+       href="#div">div</a></code> element, then jump to the last step.
      </li>
-     <!-- an element <foo> is in this
-     list if the following markup:
+     <!-- an element <foo> is in this list if
+     the following markup:
 
          <!DOCTYPE html><body><ol><li><foo><li>
 
-     ...results in the second <li> not being (in any way) a
-     descendant of the first <li>, or if <foo> is a formatting
-     element that gets reopened later. -->
+     ...results in the second <li> not being (in any way) a descendant
+     of the first <li>, or if <foo> is a formatting element that gets
+     reopened later. -->
 
      <li>
       <p>Otherwise, set <var title="">node</var> to the previous entry in the
        <a href="#stack">stack of open elements</a> and return to step 2.
-    </ol>
 
-    <p>Finally, <a href="#insert0">insert an HTML element</a> for the token.</p>
+     <li>
+      <p>If the <a href="#stack">stack of open elements</a> <a
+       href="#have-an" title="has an element in scope">has a <code>p</code>
+       element in scope</a>, then act as if an end tag with the tag name
+       <code><a href="#p">p</a></code> had been seen.</p>
+
+      <p>Finally, <a href="#insert0">insert an HTML element</a> for the
+       token.</p>
+    </ol>
+   </dd>
+   <!-- as normal, but imply </dt> or </dd> when there's another <dt> or <dd> open in weird cases  -->
 
    <dt>A start tag whose tag name is one of: "dd", "dt"
 
    <dd>
-    <p>If the <a href="#stack">stack of open elements</a> <a href="#have-an"
-     title="has an element in scope">has a <code>p</code> element in
-     scope</a>, then act as if an end tag with the tag name <code><a
-     href="#p">p</a></code> had been seen.</p>
-
     <p>Run the following algorithm:</p>
 
     <ol>
@@ -46815,34 +46808,41 @@
 
      <li>
       <p>If <var title="">node</var> is a <code><a href="#dd">dd</a></code>
-       or <code><a href="#dt">dt</a></code> element, then pop all the nodes
-       from the <a href="#current5">current node</a> up to <var
-       title="">node</var>, including <var title="">node</var>, then stop
-       this algorithm. If more than one node is popped, then this is a <a
-       href="#parse1">parse error</a>.
+       or <code><a href="#dt">dt</a></code> element, then act as if an end
+       tag with the same tag name as <var title="">node</var> had been seen,
+       then jump to the last step.
 
      <li>
       <p>If <var title="">node</var> is not in the <a
        href="#formatting">formatting</a> category, and is not in the <a
        href="#phrasing1">phrasing</a> category, and is not an <code><a
        href="#address">address</a></code> or <code><a
-       href="#div">div</a></code> element, then stop this algorithm.
+       href="#div">div</a></code> element, then jump to the last step.
      </li>
-     <!-- an element <foo> is in this
-     list if the following markup:
+     <!-- an element <foo> is in this list if
+     the following markup:
 
-         <!DOCTYPE html><body><ol><dt><foo><dt>
+         <!DOCTYPE html><body><dl><dt><foo><dt>
 
-     ...results in the second <li> not being (in any way) a
-     descendant of the first <li>, or if <foo> is a formatting
-     element that gets reopened later. -->
+     ...results in the second <dt> not being (in any way) a descendant
+     of the first <dt>, or if <foo> is a formatting element that gets
+     reopened later. -->
 
      <li>
       <p>Otherwise, set <var title="">node</var> to the previous entry in the
        <a href="#stack">stack of open elements</a> and return to step 2.
-    </ol>
 
-    <p>Finally, <a href="#insert0">insert an HTML element</a> for the token.</p>
+     <li>
+      <p>If the <a href="#stack">stack of open elements</a> <a
+       href="#have-an" title="has an element in scope">has a <code>p</code>
+       element in scope</a>, then act as if an end tag with the tag name
+       <code><a href="#p">p</a></code> had been seen.</p>
+
+      <p>Finally, <a href="#insert0">insert an HTML element</a> for the
+       token.</p>
+    </ol>
+   </dd>
+   <!-- same as normal, but effectively ends parsing -->
 
    <dt>A start tag whose tag name is "plaintext"
 
@@ -46861,10 +46861,14 @@
      seen, that will be the last token ever seen other than character tokens
      (and the end-of-file token), because there is no way to switch the <a
      href="#content2">content model flag</a> out of the PLAINTEXT state.</p>
+   </dd>
+   <!-- end tags for non-phrasing flow content elements -->
+   <!-- the normal ones -->
 
-   <dt>An end tag whose tag name is one of: "address", "blockquote",
-    "center", "dir", "div", "dl", "fieldset", "listing", "menu", "ol", "pre",
-    "ul"
+   <dt>An end tag whose tag name is one of: "address", "article", "aside",
+    "blockquote", "center", "datagrid", "dialog", "dir", "div", "dl",
+    "fieldset", "footer", "header", "listing", "menu", "nav", "ol", "pre",
+    "section", "ul"
 
    <dd>
     <p>If the <a href="#stack">stack of open elements</a> does not <a
@@ -46888,6 +46892,8 @@
        until an element with the same tag name as the token has been popped
        from the stack.
     </ol>
+   </dd>
+   <!-- as normal, but interacts with the form element pointer -->
 
    <dt>An end tag whose tag name is "form"
 
@@ -46916,22 +46922,38 @@
        until an element with the same tag name as the token has been popped
        from the stack.
     </ol>
+   </dd>
+   <!-- as normal, except </p> implies <p> if there's no <p> in scope, and needs care as the elements have optional tags -->
 
    <dt>An end tag whose tag name is "p"
 
    <dd>
-    <p>If the <a href="#current5">current node</a> is not a <code><a
-     href="#p">p</a></code> element, then this is a <a href="#parse1">parse
-     error</a>.</p>
+    <p>If the <a href="#stack">stack of open elements</a> does not <a
+     href="#have-an" title="has an element in scope">have an element in
+     scope</a> with the same tag name as that of the token, then this is a <a
+     href="#parse1">parse error</a>; act as if a start tag with the tag name
+     <code><a href="#p">p</a></code> had been seen, then reprocess the
+     current token.</p>
 
-    <p>If the <a href="#stack">stack of open elements</a> <a href="#have-an"
-     title="has an element in scope">has a <code>p</code> element in
-     scope</a>, then pop elements from this stack until the stack no longer
-     <a href="#have-an" title="has an element in scope">has a <code>p</code>
-     element in scope</a>.</p>
+    <p>Otherwise, run these steps:</p>
 
-    <p>Otherwise, act as if a start tag with the tag name <code><a
-     href="#p">p</a></code> had been seen, then reprocess the current token.</p>
+    <ol>
+     <li>
+      <p><a href="#generate">Generate implied end tags</a>, except for
+       elements with the same tag name as the token.
+
+     <li>
+      <p>If the <a href="#current5">current node</a> is not an element with
+       the same tag name as that of the token, then this is a <a
+       href="#parse1">parse error</a>.
+
+     <li>
+      <p>Pop elements from the <a href="#stack">stack of open elements</a>
+       until an element with the same tag name as the token has been popped
+       from the stack.
+    </ol>
+   </dd>
+   <!-- as normal, but needs care as the elements have optional tags -->
 
    <dt>An end tag whose tag name is one of: "dd", "dt", "li"
 
@@ -46958,6 +46980,8 @@
        until an element with the same tag name as the token has been popped
        from the stack.
     </ol>
+   </dd>
+   <!-- as normal, except acts as a closer for any of the h1-h6 elements -->
 
    <dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5",
     "h6"
@@ -46987,6 +47011,12 @@
        until an element whose tag name is one of "h1", "h2", "h3", "h4",
        "h5", or "h6" has been popped from the stack.
     </ol>
+
+   <dt>An end tag whose tag name is "sarcasm"
+
+   <dd>
+    <p>Take a deep breath, then act as described in the "any other end tag"
+     entry below.</p>
    </dd>
    <!-- ADOPTION AGENCY ELEMENTS
         Mozilla-only: bdo blink del ins sub sup q
@@ -47303,7 +47333,7 @@
      title="insertion mode: in table">in table</a>".</p>
 
    <dt>A start tag whose tag name is one of: "area", "basefont", "bgsound",
-    "br", "embed", "img", "param", "spacer", "wbr"
+    "br", "embed", "img", "spacer", "wbr"
 
    <dd>
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
@@ -47317,6 +47347,17 @@
      flag">Acknowledge the token's <i>self-closing flag</i></a>, if it is
      set.</p>
 
+   <dt>A start tag whose tag name is one of: "param", "source"
+
+   <dd>
+    <p><a href="#insert0">Insert an HTML element</a> for the token.
+     Immediately pop the <a href="#current5">current node</a> off the <a
+     href="#stack">stack of open elements</a>.</p>
+
+    <p><a href="#acknowledged" title="acknowledge self-closing
+     flag">Acknowledge the token's <i>self-closing flag</i></a>, if it is
+     set.</p>
+
    <dt>A start tag whose tag name is "hr"
 
    <dd>
@@ -47471,7 +47512,7 @@
    <dt>A start tag whose tag name is one of: "iframe", "noembed"
 
    <dt>A start tag whose tag name is "noscript", if the <a
-    href="#scripting2">scripting flag</a> is enabled:
+    href="#scripting2">scripting flag</a> is enabled
 
    <dd>
     <p>Follow the <a href="#generic">generic CDATA parsing algorithm</a>.</p>
@@ -47592,30 +47633,29 @@
    </dd>
 -->
 
-   <dt>A start or end tag whose tag name is one of: "caption", "col",
-    "colgroup", "frame", "frameset", "head", "option", "optgroup", "tbody",
-    "td", "tfoot", "th", "thead", "tr"
-
-   <dt>An end tag whose tag name is one of: "area", "basefont", "bgsound",
-    "embed", "hr", "iframe", "image", "img", "input", "isindex", "noembed",
-    "noframes", "param", "select", "spacer", "table", "textarea", "wbr"</dt>
-   <!-- add keygen if we add the start
-   tag -->
-
-   <dt>An end tag whose tag name is "noscript", if the <a
-    href="#scripting2">scripting flag</a> is enabled:
+   <dt>A start <!--or end--> tag whose tag name is one of: "caption", "col",
+    "colgroup", "frame", "frameset", "head", "tbody", "td", "tfoot", "th",
+    "thead", "tr"</dt>
+   <!--<dt>An end tag whose tag name is one of: "area", "base",
+   "basefont", "bgsound", "command", "embed", "event-source", "hr",
+   "iframe", "image", "img", "input", "isindex", "link", "meta",
+   "noembed", "noframes", "param", "script", "select", "source",
+   "spacer", "style", "table", "textarea", "title", "wbr"</dt>-->
+   <!--
+   add keygen if we add the start tag -->
+   <!--<dt>An end tag whose tag name is "noscript", if the
+   <span>scripting flag</span> is enabled</dt>-->
 
    <dd>
     <p><a href="#parse1">Parse error</a>. Ignore the token.</p>
+    <!-- end tags are commented out because since they can never end
+    up on the stack anyway, the default end tag clause will
+    automatically handle them. we don't want to have text in the spec
+    that is just an optimisation, as that detracts from the spec
+    itself -->
+    
 
-   <dt>A start or end tag whose tag name is one of: "event-source",
-    "section", "nav", "article", "aside", "header", "footer", "datagrid",
-    "command"
-
-   <dd> <!-- XXXX -->
-    <p class=big-issue>Work in progress!</p>
-
-   <dt>A start tag token not covered by the previous entries
+   <dt>Any other start tag
 
    <dd>
     <p><a href="#reconstruct">Reconstruct the active formatting elements</a>,
@@ -47626,7 +47666,7 @@
     <p class=note>This element will be a <a href="#phrasing1">phrasing</a>
      element.</p>
 
-   <dt>An end tag token not covered by the previous entries
+   <dt>Any other end tag
 
    <dd>
     <p>Run the following algorithm:</p>

Received on Saturday, 7 June 2008 00:29:09 UTC