- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 01 Feb 2010 02:34:58 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv27127/tools
Modified Files:
generate-spec-source.xsl
Log Message:
checkpointing
Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- generate-spec-source.xsl 30 Jan 2010 04:44:26 -0000 1.222
+++ generate-spec-source.xsl 1 Feb 2010 02:34:55 -0000 1.223
@@ -8,6 +8,7 @@
exclude-result-prefixes="h s str exsl"
>
<xsl:output method="xml"/>
+ <xsl:param name="show-content-models" select="0"/>
<xsl:param name="aria" select="0"/>
<xsl:param name="rnc-html">../schema.html</xsl:param>
<xsl:param name="head">../src/head.html</xsl:param>
@@ -97,7 +98,7 @@
select="substring($type,2)"/>
</xsl:variable>
<xsl:text> </xsl:text>
- <section id="common-{$type}">
+ <section id="common.elem.{$type}">
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="$type='anything'">
@@ -108,20 +109,9 @@
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
- <dl class="content-models">
- <xsl:text> </xsl:text>
- <dt class="content-model">
- <span
- class="common-pattern-name">
- <dfn id="{@id}">
- <xsl:value-of select="@id"/>
- </dfn>
- </span>
- <xsl:text> = </xsl:text>
- <a class="hash" href="#{@id}">#</a>
- </dt>
+ <div class="content-models">
<xsl:text> </xsl:text>
- <dd>
+ <p>
<xsl:choose>
<xsl:when test="$type='anything'">
<span class="attr-prose-desc"
@@ -134,9 +124,9 @@
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
- </dd>
+ </p>
<xsl:text> </xsl:text>
- </dl>
+ </div>
<xsl:text> </xsl:text>
</section>
</xsl:for-each>
@@ -1250,7 +1240,7 @@
<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>
+ <a href="#normal-character-data">normal character data</a>
and
<a href="#common.elem.phrasing">phrasing elements</a>
</p>
@@ -1258,7 +1248,7 @@
<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>
+ <a href="#normal-character-data">normal character data</a>
and
<a href="#common.elem.phrasing">flow elements</a>
</p>
@@ -1266,7 +1256,7 @@
<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>
+ <p><a href="#transparent">transparent</a></p>
</div>
</xsl:when>
<xsl:when
@@ -1280,6 +1270,7 @@
</div>
</div>
</xsl:if>
+ <xsl:if test="not($show-content-models = 0)">
<div class="no-number no-toc" id="{$name}-content-model">
<xsl:text> </xsl:text>
<h2 class="element-subhead">Content model</h2>
@@ -1364,8 +1355,9 @@
<xsl:text> </xsl:text>
</xsl:element>
<xsl:text> </xsl:text>
+ </div>
</div>
- </div>
+ </xsl:if>
</xsl:template>
<!-- * ***************************************************************** -->
@@ -1452,9 +1444,9 @@
<xsl:if test="not($name = 'html')">
<div class="no-number no-toc" id="{$full-name}-context">
<xsl:text> </xsl:text>
- <h2 class="element-subhead">Permitted contexts</h2>
+ <h2 class="element-subhead">Permitted parent elements</h2>
<xsl:text> </xsl:text>
- <ul>
+ <p>
<xsl:choose>
<xsl:when test="$name='li'">
<xsl:for-each
@@ -1464,6 +1456,9 @@
or @href = '#oli'
]]">
<xsl:call-template name="make.context"/>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
@@ -1479,6 +1474,9 @@
or starts-with(@href,concat('#',$name,'.elem.'))
]]">
<xsl:call-template name="make.context"/>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
@@ -1490,12 +1488,15 @@
<xsl:if test="not($full-name = @id)">
<xsl:call-template name="make.context"/>
</xsl:if>
+ <xsl:if test="not(position() = last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
- </ul>
+ </p>
<xsl:text> </xsl:text>
</div>
</xsl:if>
@@ -1620,9 +1621,9 @@
</xsl:variable>
<xsl:variable name="adjusted-ref">
<!-- * HACK special-casing to deal with media.source -->
- <xsl:value-of select="concat(substring-before(@id,'.inner.'),'.elem.',substring-after(@id,'.inner.'))"/>
+ <xsl:value-of select="substring-before(@id,'.inner.')"/>
</xsl:variable>
- <li class="context-mdl">
+ <span class="context-mdl">
<xsl:choose>
<xsl:when test="
@id='script'
@@ -1631,24 +1632,28 @@
<a href="#{@id}">
<xsl:value-of select="@id"/>
</a>
- <xsl:text> = </xsl:text>
- <xsl:for-each select="node()">
- <xsl:call-template name="garnish.as.needed"/>
- </xsl:for-each>
+ <!-- * <xsl:text> = </xsl:text> -->
+ <!-- * <xsl:for-each select="node()"> -->
+ <!-- * <xsl:call-template name="garnish.as.needed"/> -->
+ <!-- * </xsl:for-each> -->
</xsl:when>
- <xsl:when test="starts-with(@id,'common.elem.')">
+ <xsl:when test="@id='common.elem.phrasing'">
<a href="#{@id}">
- <xsl:value-of select="@id"/>
+ <xsl:text>phrasing elements</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:when test="@id='common.elem.flow'">
+ <a href="#{@id}">
+ <xsl:text>flow elements</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:when test="@id='common.elem.metadata'">
+ <a href="#{@id}">
+ <xsl:text>metadata elements</xsl:text>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="$parent='noscript'">
- <!-- * hack special-casing -->
- <a href="#noscript.elem.head">
- <xsl:text>noscript.elem.head</xsl:text>
- </a>
- </xsl:when>
<xsl:when test="
contains(@id,'.inner.flow')
or
@@ -1658,18 +1663,27 @@
<a href="#{$adjusted-ref}"><xsl:value-of select="$adjusted-ref"/></a>
</xsl:when>
<xsl:otherwise>
- <a href="#{concat($parent,'-mdl')}">
- <xsl:value-of select="$parent"/>
- </a>
+ <xsl:choose>
+ <xsl:when test="contains($parent,'.elem.')">
+ <a href="#{substring-before($parent,'.elem.')}">
+ <xsl:value-of select="substring-before($parent,'.elem.')"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="#{$parent}">
+ <xsl:value-of select="$parent"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
- <xsl:text> = </xsl:text>
- <xsl:for-each select="node()">
- <xsl:call-template name="garnish.as.needed"/>
- </xsl:for-each>
+ <!-- * <xsl:text> = </xsl:text> -->
+ <!-- * <xsl:for-each select="node()"> -->
+ <!-- * <xsl:call-template name="garnish.as.needed"/> -->
+ <!-- * </xsl:for-each> -->
</xsl:otherwise>
</xsl:choose>
- </li>
+ </span>
</xsl:template>
<xsl:template name="make.special.context">
@@ -1796,21 +1810,16 @@
</xsl:when>
<xsl:when test="@name='li'">
<div class="attr-content-models">
- <xsl:for-each
- select="document($rnc-html)//*[@id='li.attrs'
- or @id='oli.attrs' or @id='mli.attrs']">
- <!-- * <dt class="attr-content-model"> -->
- <!-- * <a class="attribute-pattern-name" -->
- <!-- * href="#{@id}" -->
- <!-- * > -->
- <!-- * <xsl:value-of select="@id"/> -->
- <!-- * </a> -->
- <!-- * <xsl:text> = </xsl:text> -->
- <!-- * </dt> -->
- <p>
- <xsl:copy-of select="."/>
- </p>
- </xsl:for-each>
+ <p>
+ <a href="#common-attributes">common attributes</a>
+ </p>
+ <p><span class="postfix or">or</span></p>
+ <p>
+ <a href="#common-attributes">common attributes</a>
+ <xsl:text> </xsl:text>
+ <span class="postfix &">&</span>
+ <a href="#oli.attrs.value">value</a>
+ </p>
</div>
</xsl:when>
<xsl:otherwise>
@@ -1884,6 +1893,9 @@
</xsl:otherwise>
</xsl:choose>
</p>
+ <xsl:if test="not(position() = last())">
+ <span class="postfix or">or</span>
+ </xsl:if>
</xsl:for-each>
</div>
</xsl:otherwise>
@@ -2275,7 +2287,7 @@
</xsl:call-template>
</span>
<xsl:if test="not($ref='area.attrs.shape.default')">
- <span class="punc"><a href='#interleave' title='INTERLEAVED IN ANY ORDER' class='rnc-symbol'>&</a></span>
+ <span class="punc postfix &">&</span>
<xsl:text> </xsl:text>
<a class="attribute-name"
id="{$coords.pattern}"
@@ -2548,18 +2560,20 @@
select="//h:*[@id = 'common.inner.metadata']/node()"/>
<xsl:text>)</xsl:text>
</xsl:when>
- <xsl:when test="
- @href='#li'
- or @href='#style'
- ">
- <a class="ref" href="{@href}-pattern"><xsl:value-of select="."/></a>
- </xsl:when>
<xsl:when test="@href='#audio.attrs.src'">
<a class="ref" href="{@href}">audio.attrs.src</a>
</xsl:when>
<xsl:when test="@href='#video.attrs.src'">
<a class="ref" href="{@href}">video.attrs.src</a>
</xsl:when>
+ <xsl:when test="@href='#common.elem.phrasing'">
+ <a class="ref" href="{@href}">phrasing elements</a>
+ </xsl:when>
+ <xsl:when test="contains(@href,'.elem.')">
+ <a class="ref" href="{substring-before(@href,'.elem.')}">
+ <xsl:value-of select="substring-after(substring-before(@href,'.elem.'),'#')"/>
+ </a>
+ </xsl:when>
<xsl:otherwise>
<xsl:copy-of select="."/>
</xsl:otherwise>
Received on Monday, 1 February 2010 02:35:00 UTC