- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 29 Apr 2009 16:16:41 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup-spec/tools
In directory hutz:/tmp/cvs-serv20085/tools
Modified Files:
generate-spec-source.xsl
Log Message:
refined handling of doc for type-less button, command, input
Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup-spec/tools/generate-spec-source.xsl,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- generate-spec-source.xsl 27 Apr 2009 09:44:34 -0000 1.165
+++ generate-spec-source.xsl 29 Apr 2009 16:16:39 -0000 1.166
@@ -59,13 +59,6 @@
<xsl:sort select="@name"/>
</xsl:apply-templates>
<xsl:text> </xsl:text>
- <section id="enumerated" class="no-number no-toc">
- <xsl:text> </xsl:text>
- <h2>Master models for elements with enumerated-attribute variants</h2>
- <!-- * make the section -->
- <xsl:call-template name="make.enumerated.variants"/>
- </section>
- <xsl:text> </xsl:text>
</section>
<xsl:text> </xsl:text>
<section id="common-models">
@@ -1050,53 +1043,79 @@
<xsl:choose>
<xsl:when test="$name='button.submit'">
<xsl:text> </xsl:text>
- <section id="button.notype" class="no-number">
+ <section id="button" class="no-number">
<xsl:text> </xsl:text>
<h2 class="element-head">
<span class="element">button</span>
- <xsl:text> </xsl:text>
- <span class="elem-qualifier"><span class="attribute-name">type</span> unspecified</span>
</h2>
<xsl:text> </xsl:text>
- <p>A <span class="element">button</span> element with
- no <span class="attribute">type</span> attribute
- specified represents the same thing as a <a
- href="#button.submit">button element with its type
- attribute set to "submit"</a>.</p>
+ <div>
+ <xsl:text> </xsl:text>
+ <xsl:for-each
+ select="document('../html.rnc.spec.html')
+ //h:span[@id='button']
+ ">
+ <xsl:call-template name="make.special.context"/>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <p>A <span class="element">button</span> element with
+ no <span class="attribute">type</span> attribute
+ specified represents the same thing as a <a
+ href="#button.submit">button element with its type
+ attribute set to "submit"</a>.</p>
+ <xsl:text> </xsl:text>
+ </div>
+ <xsl:text> </xsl:text>
</section>
</xsl:when>
<xsl:when test="$name='command.command'">
<xsl:text> </xsl:text>
- <section id="command.notype" class="no-number">
+ <section id="command" class="no-number">
<xsl:text> </xsl:text>
<h2 class="element-head">
<span class="element">command</span>
- <xsl:text> </xsl:text>
- <span class="elem-qualifier"><span class="attribute-name">type</span> unspecified</span>
</h2>
<xsl:text> </xsl:text>
- <p>A <span class="element">command</span> element with
- no <span class="attribute">type</span> attribute
- specified represents the same thing as a <a
- href="#command.command">command element with its type
- attribute set to "command"</a>.</p>
+ <div>
+ <xsl:text> </xsl:text>
+ <xsl:for-each
+ select="document('../html.rnc.spec.html')
+ //h:span[@id='command']
+ ">
+ <xsl:call-template name="make.special.context"/>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <p>A <span class="element">command</span> element with
+ no <span class="attribute">type</span> attribute
+ specified represents the same thing as a <a
+ href="#command.command">command element with its type
+ attribute set to "command"</a>.</p>
+ </div>
</section>
</xsl:when>
<xsl:when test="$name='input.text'">
<xsl:text> </xsl:text>
- <section id="input.notype" class="no-number">
+ <section id="input" class="no-number">
<xsl:text> </xsl:text>
<h2 class="element-head">
<span class="element">input</span>
- <xsl:text> </xsl:text>
- <span class="elem-qualifier"><span class="attribute-name">type</span> unspecified</span>
</h2>
<xsl:text> </xsl:text>
- <p>An <span class="element">input</span> element with
- no <span class="attribute">type</span> attribute
- specified represents the same thing as a <a
- href="#input.text">input element with its type
- attribute set to "text"</a>.</p>
+ <div>
+ <xsl:text> </xsl:text>
+ <xsl:for-each
+ select="document('../html.rnc.spec.html')
+ //h:span[@id='input']
+ ">
+ <xsl:call-template name="make.special.context"/>
+ </xsl:for-each>
+ <xsl:text> </xsl:text>
+ <p>An <span class="element">input</span> element with
+ no <span class="attribute">type</span> attribute
+ specified represents the same thing as a <a
+ href="#input.text">input element with its type
+ attribute set to "text"</a>.</p>
+ </div>
</section>
</xsl:when>
<xsl:when test="$name='meta.name'">
@@ -1426,24 +1445,6 @@
</xsl:template>
<!-- * ***************************************************************** -->
- <!-- * * MAKE ENUMERATED VARIANTS SECTION -->
- <!-- * ***************************************************************** -->
- <xsl:template name="make.enumerated.variants">
- <ul>
- <xsl:for-each
- select="document('../html.rnc.spec.html')
- //h:span[@id='input'
- or @id='button'
- or @id='command'
- or @id='meta'
- ]
- ">
- <xsl:call-template name="make.context"/>
- </xsl:for-each>
- </ul>
- </xsl:template>
-
- <!-- * ***************************************************************** -->
<!-- * * MAKE THE CONTENT MODELS SECTION -->
<!-- * ***************************************************************** -->
<xsl:template name="make.content.models.section">
@@ -1783,8 +1784,6 @@
<!-- * * MAKE AN INDIVIDUAL CONTEXT SECTION -->
<!-- * ***************************************************************** -->
<xsl:template name="make.context">
- <xsl:if test="not(starts-with(@id,'dir.'))">
- <!-- * don’t include obsoleted elements in context info -->
<xsl:text> </xsl:text>
<xsl:variable name="parent">
<xsl:value-of select="substring-before(@id,'.inner')"/>
@@ -1796,25 +1795,6 @@
<li class="context-mdl">
<xsl:choose>
<xsl:when test="
- starts-with(@id,'button')
- or starts-with(@id,'input')
- or starts-with(@id,'command')
- ">
- <dl>
- <dt class="content-model">
- <span class="element-pattern-name" id="{@id}">
- <a href="#{@id}" >
- <span class="element">
- <xsl:value-of select="@id"/>
- </span>
- </a>
- <xsl:text> = </xsl:text>
- </span>
- </dt>
- <dd class="elem-mdl"><xsl:copy-of select="node()"/></dd>
- </dl>
- </xsl:when>
- <xsl:when test="
@id='script'
or @id='common.elem.metadata'
">
@@ -1877,7 +1857,22 @@
</xsl:otherwise>
</xsl:choose>
</li>
- </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="make.special.context">
+ <dl>
+ <dt class="content-model">
+ <span class="element-pattern-name" id="{@id}">
+ <a href="#{@id}" >
+ <span class="element">
+ <xsl:value-of select="@id"/>
+ </span>
+ </a>
+ <xsl:text> = </xsl:text>
+ </span>
+ </dt>
+ <dd class="elem-mdl"><xsl:copy-of select="node()"/></dd>
+ </dl>
</xsl:template>
<!-- * ***************************************************************** -->
Received on Wednesday, 29 April 2009 16:16:51 UTC