W3C home > Mailing lists > Public > public-html-commits@w3.org > February 2010

html5/markup/tools generate-spec-source.xsl,1.230,1.231 specgen.xsl,1.49,1.50

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 05 Feb 2010 06:19:04 +0000
To: public-html-commits@w3.org
Message-Id: <E1NdHWy-0002gd-Ne@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv9777/tools

Modified Files:
	generate-spec-source.xsl specgen.xsl 
Log Message:
checkpointing

Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- specgen.xsl	4 Feb 2010 15:09:23 -0000	1.49
+++ specgen.xsl	5 Feb 2010 06:19:02 -0000	1.50
@@ -655,6 +655,8 @@
     <xsl:if test="ancestor::*[@class='content-models']
     and not(ancestor::*[@id='common-models'])
     and not(@href='#normal-character-data')
+    and not(@href='#non-replaceable-character-data')
+    and not(@href='#replaceable-character-data')
     and not(@href='#phrasing-content')
     and not(@href='#flow-content')
     and not(starts-with(@href,'#common.'))
@@ -799,6 +801,8 @@
     <xsl:if test="ancestor::*[@class='content-models']
     and not(ancestor::*[@id='common-models'])
     and not(@href='#normal-character-data')
+    and not(@href='#non-replaceable-character-data')
+    and not(@href='#replaceable-character-data')
     and not(@href='#phrasing-content')
     and not(@href='#flow-content')
     and not(starts-with(@href,'#common.'))

Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- generate-spec-source.xsl	4 Feb 2010 18:10:52 -0000	1.230
+++ generate-spec-source.xsl	5 Feb 2010 06:19:02 -0000	1.231
@@ -1279,47 +1279,6 @@
   <xsl:template name="make.content.models.section">
     <xsl:param name="name"/>
     <xsl:param name="name-dot" select="concat($name, '.')"/>
-    <xsl:if
-      test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model']
-      and $show-content-models = 0">
-      <div class="no-number no-toc" id="{$name}-contents">
-        <h2 class="element-subhead">Permitted content</h2>
-        <div class="prose-model">
-          <xsl:choose>
-            <xsl:when
-              test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Phrasing content'">
-              <p>
-                <a href="#normal-character-data">normal character data</a>
-                and
-                <a href="#common.elem.phrasing">phrasing elements</a>
-              </p>
-            </xsl:when>
-            <xsl:when
-              test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Flow content'">
-              <p>
-                <a href="#normal-character-data">normal character data</a>
-                and
-                <a href="#common.elem.phrasing">flow elements</a>
-              </p>
-            </xsl:when>
-            <xsl:when
-              test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Transparent'">
-              <div id="prose-model">
-                <p><a href="#transparent">transparent</a></p>
-              </div>
-            </xsl:when>
-            <xsl:when
-              test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Empty'">
-              <p>Empty</p>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:copy-of select="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model']/node()"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </div>
-      </div>
-    </xsl:if>
-    <xsl:if test="not($show-content-models = 0)">
     <div class="no-number no-toc" id="{$name}-content-model">
       <xsl:text>&#10;        </xsl:text>
       <h2 class="element-subhead">Permitted content</h2>
@@ -1375,19 +1334,33 @@
             <!-- * </xsl:for-each> -->
           <!-- * </xsl:when> -->
           <xsl:when test="$name='li'">
-            <xsl:for-each
-              select="document($rnc-html)//*[
-              @id='li'
-              ]/*[@class = 'model']">
+            <xsl:for-each select="document($rnc-html)//*[@id='li']/*[@class = 'model']">
+              <xsl:variable name="pname" select="../@id"/>
+              <xsl:call-template name="make.content.model">
+                <xsl:with-param name="count" select="$count"/>
+                <xsl:with-param name="name" select="$name"/>
+                <xsl:with-param name="pname" select="$pname"/>
+              </xsl:call-template>
+            </xsl:for-each>
+          </xsl:when>
+          <xsl:when test="$name='style'">
+            <xsl:for-each select="document($rnc-html)//*[@id='style']/*[@class = 'model']">
+              <xsl:variable name="pname" select="../@id"/>
+              <xsl:call-template name="make.content.model">
+                <xsl:with-param name="count" select="$count"/>
+                <xsl:with-param name="name" select="$name"/>
+                <xsl:with-param name="pname" select="$pname"/>
+              </xsl:call-template>
+            </xsl:for-each>
+          </xsl:when>
+          <xsl:when test="$name='script'">
+            <xsl:for-each select="document($rnc-html)//*[@id='script.elem.embedded']/*[@class = 'model']">
               <xsl:variable name="pname" select="../@id"/>
               <xsl:call-template name="make.content.model">
                 <xsl:with-param name="count" select="$count"/>
                 <xsl:with-param name="name" select="$name"/>
                 <xsl:with-param name="pname" select="$pname"/>
               </xsl:call-template>
-              <xsl:if test="not(position() = last())">
-                <div class="postfix or">or</div>
-              </xsl:if>
             </xsl:for-each>
           </xsl:when>
           <xsl:otherwise>
@@ -1411,10 +1384,59 @@
       <xsl:text>&#10;      </xsl:text>
       </div>
     </div>
+    <xsl:if
+      test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model']
+      and not($show-content-models = 0)">
+      <xsl:call-template name="show.static.content.model">
+        <xsl:with-param name="name" select="$name"/>
+      </xsl:call-template>
     </xsl:if>
   </xsl:template>
 
   <!-- * ***************************************************************** -->
+  <!-- * * MAKE THE "CONTENT NOTES" SECTION -->
+  <!-- * ***************************************************************** -->
+  <xsl:template name="show.static.content.model">
+    <xsl:param name="name"/>
+    <div class="no-number no-toc" id="{$name}-contents">
+      <h2 class="element-subhead">Content notes</h2>
+      <div class="prose-model">
+        <xsl:choose>
+          <xsl:when
+            test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Phrasing content'">
+            <p>
+              <a href="#normal-character-data">normal character data</a>
+              and
+              <a href="#common.elem.phrasing">phrasing elements</a>
+            </p>
+          </xsl:when>
+          <xsl:when
+            test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Flow content'">
+            <p>
+              <a href="#normal-character-data">normal character data</a>
+              and
+              <a href="#common.elem.phrasing">flow elements</a>
+            </p>
+          </xsl:when>
+          <xsl:when
+            test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Transparent'">
+            <div id="prose-model">
+              <p><a href="#transparent">transparent</a></p>
+            </div>
+          </xsl:when>
+          <xsl:when
+            test="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model'] = 'Empty'">
+            <p>Empty</p>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model']/node()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </div>
+    </div>
+</xsl:template>
+
+  <!-- * ***************************************************************** -->
   <!-- * * MAKE THE "TAG OMISSION" SECTION -->
   <!-- * ***************************************************************** -->
   <xsl:template name="make.tag.omission.section">
@@ -1432,10 +1454,10 @@
           or $name='col' 
           or $name='command' 
           or $name='embed' 
-          or $name='eventsource' 
           or $name='hr' 
           or $name='img' 
           or $name='input' 
+          or $name='keygen' 
           or $name='link' 
           or $name='meta' 
           or $name='param' 
@@ -1550,9 +1572,10 @@
                 <xsl:otherwise>
                   <xsl:for-each
                     select="document($rnc-html)//h:span[@class
-                    = 'pattern'][child::h:a[@href = concat('#',$full-name)
+                    = 'pattern'][descendant::h:a[@href = concat('#',$full-name)
                     or starts-with(@href,concat('#',$full-name,'.elem.'))
-                    ]]">
+                    ]][not(@id='script')]">
+                    <xsl:message>    name: <xsl:value-of select="$name"/></xsl:message>
                     <xsl:if test="not($full-name = @id)">
                       <xsl:call-template name="make.context"/>
                     </xsl:if>
@@ -1681,7 +1704,6 @@
   <!-- * * MAKE AN INDIVIDUAL CONTEXT SECTION -->
   <!-- * ***************************************************************** -->
   <xsl:template name="make.context">
-    <xsl:text>&#10;        </xsl:text>
     <xsl:variable name="parent">
       <xsl:value-of select="substring-before(@id,'.inner')"/>
     </xsl:variable>
@@ -1701,21 +1723,21 @@
           <!-- * </xsl:for-each> -->
         </xsl:when>
         <xsl:when test="@id='common.elem.phrasing'">
-          <span>Any element that can contain
+          <span>any element that can contain
             <a href="#{@id}">
               <xsl:text>phrasing elements</xsl:text>
             </a>
           </span>
         </xsl:when>
         <xsl:when test="@id='common.elem.flow'">
-          <span>Any element that can contain
+          <span>any element that can contain
             <a href="#{@id}">
               <xsl:text>flow elements</xsl:text>
             </a>
           </span>
         </xsl:when>
         <xsl:when test="@id='common.elem.metadata'">
-          <span>Any element that can contain
+          <span>any element that can contain
             <a href="#{@id}">
               <xsl:text>metadata elements</xsl:text>
             </a>
@@ -1885,6 +1907,27 @@
                     <!-- * <xsl:text> = </xsl:text> -->
                         <xsl:variable name="ref" select="@id"/>
                         <xsl:choose>
+                          <xsl:when test="starts-with($ref,'meta.')">
+                            <xsl:for-each select="node()">
+                              <xsl:choose>
+                                <xsl:when test="@href='#common.attrs.core'">
+                                  <a href="#common.attrs.core">core attributes</a>
+                                  <span class="postfix optional">?</span>
+                                </xsl:when>
+                                <xsl:when test="@href='#common.attrs.event-handler'">
+                                  <a href="#common.attrs.core">event-handler attributes</a>
+                                  <span class="postfix optional">?</span>
+                                </xsl:when>
+                                <xsl:when test="@href='#common.attrs.xml'">
+                                  <a href="#common.attrs.core">xml attributes</a>
+                                  <span class="postfix optional">?</span>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                  <xsl:copy-of select="."/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+                            </xsl:for-each>
+                          </xsl:when>
                           <xsl:when test="document($rnc-html)//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
                             <span class="pattern" id="{@id}">
                               <xsl:for-each select="document($rnc-html)//h:*[@id = $ref]/node()">
@@ -2481,7 +2524,8 @@
     <xsl:variable name="parent" select="../@id"/>
     <xsl:choose>
       <xsl:when test="$ref = 'normal-character-data'">
-        <xsl:copy-of select="."/>
+        <a href="#normal-character-data">normal character data</a>
+        <script class="postfix optional">?</script>
       </xsl:when>
       <xsl:when test="$ref = 'colgroup.inner'">
         <!-- * special-case constraint of col element vs. span -->
@@ -2533,11 +2577,19 @@
     <xsl:choose>
       <xsl:when test="@class='agroupof'">
       <span class='agroupof'>
-      <xsl:for-each select="node()">
-        <xsl:call-template name="garnish.as.needed"/>
-      </xsl:for-each>
+        <xsl:for-each select="node()">
+          <xsl:call-template name="garnish.as.needed"/>
+        </xsl:for-each>
       </span>
       </xsl:when>
+      <xsl:when test="@href = '#non-replaceable-character-data'">
+        <a href="#non-replaceable-character-data">non-replaceable character data</a>
+        <script class="postfix optional">?</script>
+      </xsl:when>
+      <xsl:when test="@href = '#replaceable-character-data'">
+        <a href="#replaceable-character-data">replaceable character data</a>
+        <script class="postfix optional">?</script>
+      </xsl:when>
       <xsl:when test="@href = '#mli'">
         <a href="#li">li</a>
       </xsl:when>
Received on Friday, 5 February 2010 06:19:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 5 February 2010 06:19:11 GMT