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

html5/markup/tools generate-spec-source.xsl,1.214,1.215

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 29 Jan 2010 02:30:57 +0000
To: public-html-commits@w3.org
Message-Id: <E1NagdN-0003hM-7u@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv13937/tools

Modified Files:
	generate-spec-source.xsl 
Log Message:
prose model

Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- generate-spec-source.xsl	29 Jan 2010 00:40:41 -0000	1.214
+++ generate-spec-source.xsl	29 Jan 2010 02:30:55 -0000	1.215
@@ -1088,10 +1088,6 @@
           <xsl:with-param name="full-name" select="$name"/>
         </xsl:call-template>
         <xsl:text>&#10;      </xsl:text>
-        <xsl:call-template name="make.constraints.section">
-          <xsl:with-param name="name" select="$name"/>
-        </xsl:call-template>
-        <xsl:text>&#10;      </xsl:text>
         <xsl:call-template name="make.context.section">
           <xsl:with-param name="name">
             <xsl:choose>
@@ -1250,7 +1246,37 @@
       <div class="no-number no-toc" id="{$name}-contents">
         <h2 class="element-subhead">Permitted contents</h2>
         <div class="prose-model">
-          <xsl:copy-of select="document(concat('../elements/',$name,'.html'))//h:div[@id='prose-model']/node()"/>
+          <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>
@@ -1343,22 +1369,6 @@
   </xsl:template>
 
   <!-- * ***************************************************************** -->
-  <!-- * * MAKE THE "ADDITIONAL CONSTRAINTS" SECTION -->
-  <!-- * ***************************************************************** -->
-  <xsl:template name="make.constraints.section">
-    <xsl:param name="name"/>
-    <xsl:if
-      test="document(concat('../elements/',$name,'.html'))//h:div[@id='constraints']">
-      <xsl:text>&#10;        </xsl:text>
-      <div class="no-number no-toc" id="{$name}-constraints">
-        <xsl:text>&#10;        </xsl:text>
-        <h2 class="element-subhead">Additional constraints</h2>
-        <xsl:copy-of select="document(concat('../elements/',$name,'.html'))//h:div[@id='constraints']/node()"/>
-      </div>
-    </xsl:if>
-  </xsl:template>
-
-  <!-- * ***************************************************************** -->
   <!-- * * MAKE THE "TAG OMISSION" SECTION -->
   <!-- * ***************************************************************** -->
   <xsl:template name="make.tag.omission.section">
@@ -2331,14 +2341,17 @@
         test="exsl:node-set($assertions)/s:rule[child::s:context = $short-name]
         ">
         <xsl:text>&#10;      </xsl:text>
-        <div class="no-number no-toc" id="{$name}-assertions">
+        <div class="no-number no-toc" id="{$name}-constraints">
           <xsl:text>&#10;        </xsl:text>
           <h2 class="element-subhead">Additional constraints and admonitions</h2>
           <xsl:text>&#10;        </xsl:text>
-
           <ul class="assertions">
             <!-- * FIXME: the below doesn't handle expressions that -->
             <!-- * contain more than one element name -->
+            <xsl:if
+              test="document(concat('../elements/',$name,'.html'))//h:*[@id='constraints']">
+              <xsl:copy-of select="document(concat('../elements/',$name,'.html'))//h:div[@id='constraints']/node()"/>
+            </xsl:if>
             <xsl:for-each
               select="exsl:node-set($assertions)/s:rule[child::s:context = $short-name]">
               <xsl:text>&#10;          </xsl:text>
Received on Friday, 29 January 2010 02:30:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 29 January 2010 02:31:02 GMT