html5/markup/tools generate-spec-source.xsl,1.194,1.195

Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv8748/tools

Modified Files:
	generate-spec-source.xsl 
Log Message:
streamlined documentation for common/shared form attributes


Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -d -r1.194 -r1.195
--- generate-spec-source.xsl	31 Jul 2009 16:24:39 -0000	1.194
+++ generate-spec-source.xsl	1 Aug 2009 10:44:34 -0000	1.195
@@ -334,57 +334,22 @@
             </xsl:for-each>
           </section>
           <xsl:text>&#10;    </xsl:text>
-          <section id="shared-attributes">
-            <xsl:text>&#10;        </xsl:text>
-            <h2>Other shared attributes</h2>
-          <xsl:text>&#10;    </xsl:text>
-          <section id="common-form-attrs">
+          <section id="form-attributes">
             <xsl:text>&#10;        </xsl:text>
             <h2>Form attributes</h2>
-            <xsl:text>&#10;        </xsl:text>
-            <div class="content-model">
-              <span class="common-pattern-name"><dfn
-                  id="common-form.attrs">common-form.attrs</dfn></span>
-              <xsl:text> = </xsl:text>
-              <xsl:for-each
-                select="document('../html.rnc.spec.html')//h:*[@id='common-form.attrs']/node()">
-                <xsl:copy-of select="."/>
-              </xsl:for-each>
-              <xsl:text> </xsl:text>
-              <a class="hash" href="#common-form.attrs">#</a>
-              <xsl:text>&#10;            </xsl:text>
-            </div>
-            <xsl:text>&#10;          </xsl:text>
-            <div class="no-number no-toc">
-              <xsl:text>&#10;        </xsl:text>
-              <dl class="attr-defs">
-                <xsl:text>&#10;        </xsl:text>
-                <xsl:for-each select="document('../html.rnc.spec.html')//h:span[@class='pattern']
-                  [starts-with(@id,'common-form.attrs.')]">
-                  <dt>
-                    <dfn class="attribute-name" id="{@id}"
-                      title="{@id}">
-                      <xsl:value-of select="h:span[@class='name']"/>
-                    </dfn>
-                    <span class="attr-values">
-                      <xsl:text> = </xsl:text>
-                      <xsl:for-each select="h:span[@class='model']/node()">
-                        <xsl:call-template name="process.datatype.reference"/>
-                      </xsl:for-each>
-                    </span>
-                    <a class="hash" href="#{@id}">#</a>
-                  </dt>
-                  <xsl:message>Missing description for:<xsl:text> </xsl:text><xsl:value-of select="@id"/></xsl:message>
-                  <dd><i class="TK">(detailed attribute description to come)</i></dd>
-                </xsl:for-each>
-              </dl>
-              <xsl:text>&#10;      </xsl:text>
+            <xsl:text>&#10;    </xsl:text>
             <dl class="attr-defs">
-              <xsl:for-each select="document('../html.rnc.spec.html')//h:span[@class='pattern']
+              <xsl:text>&#10;        </xsl:text>
+              <xsl:for-each select="
+                (document('../html.rnc.spec.html')//h:span[@class='pattern']
+                [starts-with(@id,'common-form.attrs.')])
+                |
+                (document('../html.rnc.spec.html')//h:span[@class='pattern']
                 [starts-with(@id,'shared-form.attrs') or starts-with(@id,'input.attrs')]
                 [not(@id='shared-form.attrs.formmethod.data')]
-                [not(@id='shared-form.attrs.formenctype.data')]
+                [not(@id='shared-form.attrs.formenctype.data')])
                 ">
+                <xsl:sort select="."/>
                 <dt>
                   <xsl:variable name="shared-attr-name">
                     <xsl:choose>
@@ -431,10 +396,6 @@
               <xsl:text>&#10;        </xsl:text>
             </dl>
             <xsl:text>&#10;    </xsl:text>
-            </div>
-            <xsl:text>&#10;    </xsl:text>
-          </section>
-          <xsl:text>&#10;    </xsl:text>
           </section>
           <xsl:text>&#10;    </xsl:text>
           <section id="datatypes">
@@ -1773,36 +1734,28 @@
                         or starts-with(@id,'source.')
                         or starts-with(@id,'style.')
                         ">
+                        <xsl:variable name="ref" select="@id"/>
                         <span class="pattern" id="{@id}">
-                          <xsl:copy-of select="node()"/>
-                        </span>
-                      </xsl:when>
-                      <xsl:when test="@id = 'textarea.attrs'">
-                        <span class="pattern" id="{@id}">
-                          <xsl:for-each select="node()">
-                            <xsl:choose>
-                              <xsl:when test=".='rows-and-cols-wf1'">
-                                <xsl:variable name="ref"
-                                  select="substring-after(@href,'#')"/>
-                                <xsl:for-each select="//*[@id = $ref]/node()">
-                                  <xsl:choose>
-                                    <xsl:when test="@href = '#textarea.attrs.rows-and-cols-wf1.inner'">
-                                      <xsl:for-each
-                                        select="//*[@id = 'textarea.attrs.rows-and-cols-wf1.inner']/node()">
-                                        <xsl:copy-of select="."/>
-                                      </xsl:for-each>
-                                    </xsl:when>
-                                    <xsl:otherwise>
+                          <xsl:choose>
+                            <xsl:when test="document('../html.rnc.spec.html')//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
+                              <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id = $ref]/node()">
+                                <xsl:choose>
+                                  <xsl:when test=". = 'common-form.attrs'">
+                                    <xsl:for-each
+                                      select="document('../html.rnc.spec.html')//h:*[@id = 'common-form.attrs']/node()">
                                       <xsl:copy-of select="."/>
-                                    </xsl:otherwise>
-                                  </xsl:choose>
-                                </xsl:for-each>
-                              </xsl:when>
-                              <xsl:otherwise>
-                                <xsl:copy-of select="."/>
-                              </xsl:otherwise>
-                            </xsl:choose>
-                          </xsl:for-each>
+                                    </xsl:for-each>
+                                  </xsl:when>
+                                  <xsl:otherwise>
+                                    <xsl:copy-of select="."/>
+                                  </xsl:otherwise>
+                                </xsl:choose>
+                              </xsl:for-each>
+                            </xsl:when>
+                            <xsl:otherwise>
+                              <xsl:copy-of select="node()"/>
+                            </xsl:otherwise>
+                          </xsl:choose>
                         </span>
                       </xsl:when>
                       <xsl:when test="@id = 'td.attrs' or @id = 'th.attrs'">
@@ -1848,7 +1801,29 @@
                         </span>
                       </xsl:when>
                       <xsl:otherwise>
-                        <xsl:copy-of select="."/>
+                        <xsl:variable name="ref" select="@id"/>
+                        <xsl:choose>
+                          <xsl:when test="document('../html.rnc.spec.html')//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
+                            <span class="pattern" id="{@id}">
+                              <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id = $ref]/node()">
+                                <xsl:choose>
+                                  <xsl:when test=". = 'common-form.attrs'">
+                                    <xsl:for-each
+                                      select="document('../html.rnc.spec.html')//h:*[@id = 'common-form.attrs']/node()">
+                                      <xsl:copy-of select="."/>
+                                    </xsl:for-each>
+                                  </xsl:when>
+                                  <xsl:otherwise>
+                                    <xsl:copy-of select="."/>
+                                  </xsl:otherwise>
+                                </xsl:choose>
+                              </xsl:for-each>
+                            </span>
+                          </xsl:when>
+                          <xsl:otherwise>
+                            <xsl:copy-of select="."/>
+                          </xsl:otherwise>
+                        </xsl:choose>
                       </xsl:otherwise>
                     </xsl:choose>
                   </p>

Received on Saturday, 1 August 2009 10:44:46 UTC