- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 04 Aug 2010 12:59:21 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/tools In directory hutz:/tmp/cvs-serv4335/tools Modified Files: chunker.xsl generate-spec-source.xsl specgen.xsl toc.xsl Log Message: added the beginnings of an alphabetical index Index: generate-spec-source.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v retrieving revision 1.287 retrieving revision 1.288 diff -u -d -r1.287 -r1.288 --- generate-spec-source.xsl 2 Aug 2010 11:27:39 -0000 1.287 +++ generate-spec-source.xsl 4 Aug 2010 12:59:19 -0000 1.288 @@ -398,109 +398,101 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> - <xsl:variable name="tc-first"> - <xsl:value-of select="translate( - substring($first,1,1), - 'abcdefghijklmnopqrstuvwxyz', - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' - )"/><xsl:value-of - select="substring($first,2)"/> - </xsl:variable> <xsl:text> </xsl:text> <xsl:if test="$pattern='uri'"> - <section id="data-url-no-spaces-def" class="no-toc"> + <section id="data-url-no-spaces-def" class="no-toc no-number"> <h2 class="common-subhead"><dfn id="data-url-no-spaces">URL</dfn></h2> <xsl:copy-of select="document('../src/datatypes.html')// h:dd[preceding-sibling::h:dt='data-url-no-spaces'][not(position()=1)]/node()"/> </section> </xsl:if> - <section id="{@id}-def" class="no-toc"> + <section id="{@id}-def" class="no-toc no-number"> <xsl:text> </xsl:text> <xsl:choose> <xsl:when test="$pattern='tokens'"> - <h2 class="common-subhead"><dfn id="{@id}">Set of space-separated tokens</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">set of space-separated tokens</dfn></h2> </xsl:when> <xsl:when test="$pattern='browsing-context-name'"> - <h2 class="common-subhead"><dfn id="{@id}">Browsing-context name</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">browsing-context name</dfn></h2> </xsl:when> <xsl:when test="$pattern='browsing-context-name-or-keyword'"> - <h2 class="common-subhead"><dfn id="{@id}">Browsing-context name or keyword</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">browsing-context name or keyword</dfn></h2> </xsl:when> <xsl:when test="$pattern='hash-name'"> - <h2 class="common-subhead"><dfn id="{@id}">Hash-name reference</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">hash-name reference</dfn></h2> </xsl:when> <xsl:when test="$pattern='mediaquery'"> - <h2 class="common-subhead"><dfn id="{@id}">Media-query list</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">media-query list</dfn></h2> </xsl:when> <xsl:when test="$pattern='langcode'"> - <h2 class="common-subhead"><dfn id="{@id}">Language tag</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">language tag</dfn></h2> </xsl:when> <xsl:when test="$pattern='datetime'"> - <h2 class="common-subhead"><dfn id="{@id}">Date and time</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">date and time</dfn></h2> </xsl:when> <xsl:when test="$pattern='datetime-local'"> - <h2 class="common-subhead"><dfn id="{@id}">Local date and time</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">local date and time</dfn></h2> </xsl:when> <xsl:when test="$pattern='date-or-time'"> - <h2 class="common-subhead"><dfn id="{@id}">Date or time</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">date or time</dfn></h2> </xsl:when> <xsl:when test="$pattern='sandbox-allow-list'"> - <h2 class="common-subhead"><dfn id="{@id}">Sandbox “allow” keywords list</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">sandbox “allow” keywords list</dfn></h2> </xsl:when> <xsl:when test="$pattern='charset'"> - <h2 class="common-subhead"><dfn id="{@id}">Character encoding name</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">character encoding name</dfn></h2> </xsl:when> <xsl:when test="$pattern='charsetlist'"> - <h2 class="common-subhead"><dfn id="{@id}">List of character-encoding names</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of character-encoding names</dfn></h2> </xsl:when> <xsl:when test="$pattern='keylabellist'"> - <h2 class="common-subhead"><dfn id="{@id}">List of key labels</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of key labels</dfn></h2> </xsl:when> <xsl:when test="$pattern='default-style'"> - <h2 class="common-subhead"><dfn id="{@id}">Default-style name</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">default-style name</dfn></h2> </xsl:when> <xsl:when test="$pattern='meta-charset'"> - <h2 class="common-subhead"><dfn id="{@id}">Meta-charset string</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">meta-charset string</dfn></h2> </xsl:when> <xsl:when test="$pattern='refresh'"> - <h2 class="common-subhead"><dfn id="{@id}">Refresh value</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">refresh value</dfn></h2> </xsl:when> <xsl:when test="$pattern='mimetype'"> <h2 class="common-subhead"><dfn id="{@id}">MIME type</dfn></h2> </xsl:when> <xsl:when test="$pattern='mimetypelist'"> - <h2 class="common-subhead"><dfn id="{@id}">List of MIME types</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of MIME types</dfn></h2> </xsl:when> <xsl:when test="$pattern='emailaddresslist'"> - <h2 class="common-subhead"><dfn id="{@id}">List of e-mail addresses</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of e-mail addresses</dfn></h2> </xsl:when> <xsl:when test="$pattern='emailaddress'"> - <h2 class="common-subhead"><dfn id="{@id}">E-mail address</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">e-mail address</dfn></h2> </xsl:when> <xsl:when test="$pattern='float'"> - <h2 class="common-subhead"><dfn id="{@id}">Floating-point number</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">floating-point number</dfn></h2> </xsl:when> <xsl:when test="$pattern='float.non-negative'"> - <h2 class="common-subhead"><dfn id="{@id}">Non-negative floating-point number</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">non-negative floating-point number</dfn></h2> </xsl:when> <xsl:when test="$pattern='integer.non-negative'"> - <h2 class="common-subhead"><dfn id="{@id}">Non-negative integer</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">non-negative integer</dfn></h2> </xsl:when> <xsl:when test="$pattern='integer.positive'"> - <h2 class="common-subhead"><dfn id="{@id}">Positive integer</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">positive integer</dfn></h2> </xsl:when> <xsl:when test="$pattern='float.positive'"> - <h2 class="common-subhead"><dfn id="{@id}">Positive floating-point number</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">positive floating-point number</dfn></h2> </xsl:when> <xsl:when test="$pattern='uri.absolute'"> - <h2 class="common-subhead"><dfn id="{@id}">Absolute URL</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">absolute URL</dfn></h2> </xsl:when> <xsl:when test="$pattern='uri'"> <h2 class="common-subhead"><dfn id="{@id}">URL potentially surrounded by spaces</dfn></h2> </xsl:when> <xsl:when test="$pattern='uris'"> - <h2 class="common-subhead"><dfn id="{@id}">List of URIs</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of URIs</dfn></h2> </xsl:when> <xsl:when test="$pattern='id'"> <h2 class="common-subhead"><dfn id="{@id}">ID</dfn></h2> @@ -509,24 +501,24 @@ <h2 class="common-subhead"><dfn id="{@id}">ID reference</dfn></h2> </xsl:when> <xsl:when test="$pattern='idrefs'"> - <h2 class="common-subhead"><dfn id="{@id}">List of ID references</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">list of ID references</dfn></h2> </xsl:when> <xsl:when test="$pattern='color'"> - <h2 class="common-subhead"><dfn id="{@id}">Simple color</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">simple color</dfn></h2> </xsl:when> <xsl:when test="$pattern='rectangle'"> - <h2 class="common-subhead"><dfn id="{@id}">Rectangle coordinates</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">rectangle coordinates</dfn></h2> </xsl:when> <xsl:when test="$pattern='circle'"> - <h2 class="common-subhead"><dfn id="{@id}">Circle coordinates</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">circle coordinates</dfn></h2> </xsl:when> <xsl:when test="$pattern='polygon'"> - <h2 class="common-subhead"><dfn id="{@id}">Polygon coordinates</dfn></h2> + <h2 class="common-subhead"><dfn id="{@id}">polygon coordinates</dfn></h2> </xsl:when> <xsl:otherwise> <h2 class="common-subhead"> <dfn id="{@id}"> - <xsl:value-of select="$tc-first"/> + <xsl:value-of select="$first"/> <xsl:if test="$qualified"> <xsl:text> </xsl:text> <xsl:value-of @@ -559,14 +551,14 @@ </section> <xsl:text> </xsl:text> <xsl:if test="$pattern='tokens'"> - <section id="data-unordered-tokens-def" class="no-toc"> - <h2 class="common-subhead"><dfn id="data-unordered-tokens">Unordered set of unique space-separated tokens</dfn></h2> + <section id="data-unordered-tokens-def" class="no-toc no-number"> + <h2 class="common-subhead"><dfn id="data-unordered-tokens">unordered set of unique space-separated tokens</dfn></h2> <xsl:copy-of select="document('../src/datatypes.html')// h:dd[preceding-sibling::h:dt='unordered-tokens'][not(position()=1)]/node()"/> </section> - <section id="data-ordered-tokens-def" class="no-toc"> - <h2 class="common-subhead"><dfn id="data-ordered-tokens">Ordered set of unique space-separated tokens</dfn></h2> + <section id="data-ordered-tokens-def" class="no-toc no-number"> + <h2 class="common-subhead"><dfn id="data-ordered-tokens">ordered set of unique space-separated tokens</dfn></h2> <xsl:copy-of select="document('../src/datatypes.html')// h:dd[preceding-sibling::h:dt='ordered-tokens'][not(position()=1)]/node()"/> @@ -848,6 +840,7 @@ <!-- * <xsl:text> </xsl:text> --> <xsl:text> </xsl:text> </div> + <xsl:text> </xsl:text> <script src="js/jump-indexes.js" type="text/javascript"></script> <xsl:text> </xsl:text> <script src="js/dfn.js" type="text/javascript"></script> @@ -1576,6 +1569,9 @@ <div class="no-number no-toc" id="{$name}-content-model"> <xsl:text> </xsl:text> <h2 class="element-subhead">Permitted contents</h2> + <xsl:if test="$name='a' or $name='canvas' or $name='del' or $name='ins' or $name='map' or $name='noscript'"> + <a href="#transparent"></a> + </xsl:if> <div class="content-models"> <xsl:text> </xsl:text> <xsl:text> </xsl:text> @@ -2391,6 +2387,14 @@ <xsl:text> </xsl:text> <xsl:variable name="definition"> <dt> + <xsl:if test="not(@href = '#global-attributes') and not(@href = '#common.attrs')"> + <xsl:attribute name="id"> + <xsl:value-of select="substring-after(@href,'#')"/> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:value-of select="substring-after(@href,'#')"/> + </xsl:attribute> + </xsl:if> <xsl:variable name="spec-target"> <xsl:choose> <xsl:when test="document('../src/map-attributes.html')//*[preceding-sibling::*=$ref]"> @@ -2440,7 +2444,8 @@ <xsl:text> </xsl:text> </xsl:if> <xsl:choose> - <xsl:when test="$ref = 'common.attrs'"> + <xsl:when test="$ref = 'common.attrs' + or $ref = 'global-attributes'"> <a class="attribute-name" title="global-attributes" href="#global-attributes"> @@ -2617,8 +2622,6 @@ </xsl:if> <xsl:text> </xsl:text> <a class="hash" - id="{substring-after(@href,'#')}" - title="{substring-after(@href,'#')}" href="{@href}">#</a> <xsl:text> </xsl:text> </xsl:otherwise> @@ -2725,6 +2728,7 @@ <xsl:variable name="shape" select="substring-after($ref,'area.attrs.shape.')"/> <xsl:variable name="coords.pattern" select="concat('area.attrs.coords.',$shape)"/> <xsl:for-each select="$rnc-html"> + <span class="qualified-attribute"> <span class="attribute-name">shape</span> <xsl:text> = </xsl:text> <span class="attr-values"> @@ -2737,10 +2741,13 @@ <xsl:with-param name="replacement">"</xsl:with-param> </xsl:call-template> </span> + </span> <xsl:if test="not($ref='area.attrs.shape.default')"> <span class="punc postfix &">&</span> <xsl:text> </xsl:text> - <span class="attribute-name">coords</span> + <span class="attribute-name" + id="{$coords.pattern}" + >coords</span> <xsl:text> = </xsl:text> <span class="attr-values"> <xsl:for-each select="key('elements',$coords.pattern)//*[@class='model']//h:a"> @@ -2753,7 +2760,6 @@ </xsl:if> <xsl:text> </xsl:text> <a class="hash" - id="{$ref}" title="{$ref}" href="#{$ref}"> <xsl:text>#</xsl:text> @@ -2761,7 +2767,6 @@ <xsl:text> </xsl:text> <xsl:if test="not($ref='area.attrs.shape.default')"> <a class="hash" - id="{$coords.pattern}" title="{$coords.pattern}" href="#{$coords.pattern}" > Index: specgen.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/specgen.xsl,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- specgen.xsl 2 Aug 2010 11:27:39 -0000 1.75 +++ specgen.xsl 4 Aug 2010 12:59:19 -0000 1.76 @@ -2,6 +2,7 @@ xmlns:h='http://www.w3.org/1999/xhtml' xmlns='http://www.w3.org/1999/xhtml' xmlns:date="http://exslt.org/dates-and-times" + xmlns:exsl="http://exslt.org/common" exclude-result-prefixes='h date' version='1.0' id='xslt'> <xsl:output method='html' encoding='us-ascii' @@ -13,8 +14,11 @@ <xsl:param name="site">W3C</xsl:param> <xsl:param name="chunk" select="0"/> <xsl:param name="TOC-file"/> + <xsl:param name="toc-link" select="concat($TOC-file,'#unexpanded-toc')"/> <xsl:param name="aria" select="0"/> <xsl:key name="elements" match="*" use="@id"/> + <xsl:key name="dfn" match="h:dfn" use="substring-after(@id,string-length(@id))"/> + <xsl:key name="refs" match="h:a[starts-with(@href,'#')]" use="substring-after(@href,'#')"/> <xsl:key name="chunk" match="*[@id='elements']/h:section |//h:section[count(ancestor::h:section)=0] [not(@id='abstract')][not(@id='status')][not(@id='toc')]" use="@id"/> @@ -68,6 +72,11 @@ <link rel='stylesheet' href='http://www.w3.org/StyleSheets/TR/W3C-{$maturity}' type='text/css'/> </xsl:otherwise> </xsl:choose> + <xsl:if test="not($chunk=0)"> + <link rel="next" href="intro.html" title="intro"/> + <link rel="index" href="index.html"/> + <link rel="contents" href="Overview.html#unexpanded-toc"/> + </xsl:if> <xsl:if test="$site='whatwg'"> <style> body { @@ -116,8 +125,192 @@ </xsl:if> <xsl:call-template name="top"/> <xsl:apply-templates/> + <xsl:call-template name="make-index"/> </body> </xsl:template> + <xsl:template name="make-index"> + <xsl:variable name="index-contents"> + <xsl:text> </xsl:text> + <div id="index"> + <xsl:text> </xsl:text> + <h2>Index <a class="hash" href="#index">#</a> + <xsl:text> </xsl:text> + <a class="toc-bak" href="{$TOC-file}#index-toc">T</a> + </h2> + <xsl:text> </xsl:text> + <xsl:for-each select="key('dfn','')"> + <xsl:sort select="translate(normalize-space(.), + 'abcdefghijklmnopqrstuvwxyz', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + )"/> + <xsl:variable name="sourcepage" + select="key('elements',@id)/ancestor-or-self::h:section[child::h:h2[@class='element-head']] + |key('elements',@id)/ancestor-or-self::h:section[(count(ancestor::h:section)=0 and not(@id='elements'))] + "/> + <div class="index-entry"> + <xsl:text> </xsl:text> + <p> + <a> + <xsl:attribute name="href"> + <xsl:choose> + <xsl:when test="$chunk = 0"> + <xsl:value-of select="concat('#',@id)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat($sourcepage/@id,'.html#',@id)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:value-of select="normalize-space(.)"/> + <xsl:if test="starts-with(@id,'refs')"> + <xsl:text> (specification)</xsl:text> + </xsl:if> + </a> + </p> + <xsl:text> </xsl:text> + <xsl:if test="count(key('refs',@id)) > 0"> + <ul> + <xsl:text> </xsl:text> + <xsl:for-each select="key('refs',@id)"> + <xsl:variable name="href" select="@href"/> + <xsl:variable name="id" select="generate-id(.)"/> + <xsl:variable name="ref" select="substring-after(@href,'#')"/> + <xsl:variable name="section" select="(ancestor::h:section[child::h:h2])[last()]"/> + <xsl:variable name="page" + select="key('elements',$section/@id)/ancestor-or-self::h:section[child::h:h2[@class='element-head']] + |key('elements',$section/@id)/ancestor-or-self::h:section[(count(ancestor::h:section)=0 and not(@id='elements'))] + "/> + <xsl:variable name="subsection" select=" + (ancestor::h:dt + |ancestor::h:dd/preceding-sibling::h:dt[1] + |(ancestor::h:*[child::h:h2])[last()])[last()] + "/> + <xsl:variable name="link-text"> + <xsl:choose> + <xsl:when test="$section/*/h:span[@class='element']"> + <xsl:copy-of select="$section/*/h:span[@class='element']"/> + <xsl:if test="$section/*/h:span[@class='elem-qualifier']"> + <xsl:copy-of select="$section/*/h:span[@class='elem-qualifier']"/> + </xsl:if> + <xsl:text> element</xsl:text> + </xsl:when> + <xsl:when test="$section/*[@class='datatype-desc']"> + <cite class="index"> + <xsl:value-of select="normalize-space($section/h:h2)"/> + </cite> + <xsl:text> data type</xsl:text> + </xsl:when> + <xsl:otherwise> + <cite class="index"> + <xsl:value-of select="normalize-space($section/h:h2)"/> + </cite> + <xsl:text> section</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="$subsection/@id = $section/@id"> + <xsl:if test="count($section//h:a[@href = $href]) > 1"> + <xsl:for-each select="$section//h:a[@href = $href]"> + <xsl:if test="generate-id(.) = $id and not(position() = 1)"> + <span class="index-counter"> + <xsl:text> [</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>]</xsl:text> + </span> + </xsl:if> + </xsl:for-each> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:text>: </xsl:text> + <xsl:choose> + <xsl:when test="$subsection/h:h2"> + <cite class="index"> + <xsl:value-of select="normalize-space($subsection/h:h2)"/> + </cite> + </xsl:when> + <xsl:when test="$subsection/self::h:dt"> + <xsl:choose> + <xsl:when test="$subsection//*[@class='qualified-attribute']"> + <xsl:copy-of select="$subsection//*[@class='qualified-attribute']"/> + <xsl:text> attribute </xsl:text> + </xsl:when> + <xsl:when test="$subsection//*[@class='attribute-name']"> + <xsl:copy-of select="$subsection//*[@class='attribute-name']"/> + <xsl:text> attribute</xsl:text> + </xsl:when> + <xsl:otherwise> + <cite class="index"> + <xsl:value-of select="normalize-space($subsection)"/> + </cite> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:text>@@FIXME@@</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="count($subsection//h:a[@href = $href]) > 1"> + <xsl:for-each select="$subsection//h:a[@href = $href]"> + <xsl:if test="generate-id(.) = $id and not(position() = 1)"> + <span class="index-counter"> + <xsl:text> [</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>]</xsl:text> + </span> + </xsl:if> + </xsl:for-each> + </xsl:if> + <xsl:if test="count($subsection/following-sibling::*//h:a[@href = $href]) > 1"> + <xsl:for-each select=" + $subsection/following-sibling::*//h:a[@href = $href] + "> + <xsl:if test="generate-id(.) = $id and not(position() = 1)"> + <span class="index-counter"> + <xsl:text> [</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>]</xsl:text> + </span> + </xsl:if> + </xsl:for-each> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:choose> + <xsl:when test="not($chunk = 0)"> + <li><a href="{$page/@id}.html#{$id}"><xsl:copy-of select="$link-text"/></a></li> + </xsl:when> + <xsl:otherwise> + <li><a href="#{$id}"><xsl:copy-of select="$link-text"/></a></li> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:text> </xsl:text> + </ul> + <xsl:text> </xsl:text> + </xsl:if> + </div> + <xsl:text> </xsl:text> + </xsl:for-each> + </div> + <xsl:text> </xsl:text> + </xsl:variable> + <xsl:choose> + <xsl:when test="$chunk = 0"> + <xsl:copy-of select="$index-contents"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="maturity" select="$maturity"/> + <xsl:with-param name="quiet" select="$quiet"/> + <xsl:with-param name="content" select="$index-contents"/> + <xsl:with-param name="title">HTML5: Index</xsl:with-param> + <xsl:with-param name="filename">index.html</xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <xsl:template name='top'> <div id="jump-indexes" class="no-number no-toc"> <div id="jumpIndexA-button">elements</div> @@ -687,6 +880,9 @@ </xsl:choose> </xsl:template> <xsl:template match="h:a[@href[starts-with(.,'#')]]" name="link-handler"> + <xsl:variable name="id"> + <xsl:value-of select="generate-id(.)"/> + </xsl:variable> <xsl:choose> <xsl:when test="preceding-sibling::h:span[@class='postfix intermixed'] and ancestor::*[@class='elem-mdl'] @@ -748,6 +944,9 @@ <xsl:when test="$href='syntax'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>syntax.html</xsl:text> </xsl:attribute> @@ -757,6 +956,9 @@ <xsl:when test="$href='elements'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>elements.html</xsl:text> </xsl:attribute> @@ -766,6 +968,9 @@ <xsl:when test="$href='html-elements'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>elements.html#html-elements</xsl:text> </xsl:attribute> @@ -775,6 +980,9 @@ <xsl:when test="$href='common-models'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>common-models.html</xsl:text> </xsl:attribute> @@ -784,6 +992,9 @@ <xsl:when test="$href='global-attributes'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>global-attributes.html</xsl:text> </xsl:attribute> @@ -793,6 +1004,9 @@ <xsl:when test=". ='common.attrs'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>global-attributes.html</xsl:text> </xsl:attribute> @@ -803,6 +1017,9 @@ <xsl:when test="$href='forms-attributes'"> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:text>forms-attributes.html</xsl:text> </xsl:attribute> @@ -822,6 +1039,9 @@ </xsl:if> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:attribute name="href"> <xsl:value-of select="concat($section/@id,'.html')"/> <xsl:value-of select="@href"/> @@ -832,12 +1052,21 @@ </xsl:choose> </xsl:when> <xsl:when test=". = 'common.attrs'"> - <a href="#global-attributes">global attributes</a> + <a> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> + <xsl:attribute name="href">#global-attributes</xsl:attribute> + <xsl:text>global attributes</xsl:text> + </a> </xsl:when> <xsl:when test=". = 'embed.attrs.other'"/> <xsl:otherwise> <a> <xsl:copy-of select="@*"/> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> <xsl:apply-templates/> </a> </xsl:otherwise> @@ -928,7 +1157,7 @@ </xsl:template> <xsl:template match="h:div[@id='tocjump']"> <div id="tocjump" class="skip-link" style="text-align: center"> - <a href="{$TOC-file}#unexpanded-toc">Skip to Table of Contents</a> + <a href="{$toc-link}">Skip to Table of Contents</a> </div> </xsl:template> <xsl:template match="*[@class='toc']"> Index: toc.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/toc.xsl,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- toc.xsl 29 Jul 2010 09:39:27 -0000 1.21 +++ toc.xsl 4 Aug 2010 12:59:19 -0000 1.22 @@ -15,6 +15,21 @@ <xsl:with-param name='alpha' select='true()'/> </xsl:call-template> </xsl:for-each> + <ul class="index-toc"> + <li> + <xsl:if test="$unexpanded=0"> + <xsl:attribute name="id">index-toc</xsl:attribute> + </xsl:if> + <xsl:choose> + <xsl:when test="$chunk = 0"> + <a href="#index">Index</a> + </xsl:when> + <xsl:otherwise> + <a href="index.html">Index</a> + </xsl:otherwise> + </xsl:choose> + </li> + </ul> </xsl:template> <xsl:template name='toc1'> <xsl:param name='prefix'/> Index: chunker.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/chunker.xsl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- chunker.xsl 2 Aug 2010 15:34:23 -0000 1.13 +++ chunker.xsl 4 Aug 2010 12:59:19 -0000 1.14 @@ -27,7 +27,7 @@ <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="up">Overview.html</xsl:param> - <xsl:param name="index">Overview.html</xsl:param> + <xsl:param name="index">index.html</xsl:param> <xsl:if test="$quiet = 0"> <xsl:message> <xsl:value-of select="$filename"/> @@ -64,6 +64,7 @@ </xsl:param> <xsl:variable name="prev-text"> <xsl:choose> + <xsl:when test="not($prev)"/> <xsl:when test="contains($prev/@id,'.')"> <xsl:choose> <xsl:when test="$prev/@id='meta.name'"> @@ -96,6 +97,7 @@ </xsl:variable> <xsl:variable name="next-text"> <xsl:choose> + <xsl:when test="not($next)"/> <xsl:when test="contains($next/@id,'.')"> <xsl:choose> <xsl:when test="$next/@id='meta.name'"> @@ -205,7 +207,7 @@ <xsl:param name="next-text"/> <xsl:text> </xsl:text> <h2 class="chunkpagetitle"><a - href="{$TOC-file}"><xsl:value-of select="/*/h:head/h:title"/></a></h2> + href="{$toc-link}"><xsl:value-of select="/*/h:head/h:title"/></a></h2> <xsl:text> </xsl:text> <div class="nav"> <xsl:text> </xsl:text> @@ -230,7 +232,9 @@ <xsl:param name="prev-text"/> <xsl:param name="next-text"/> <xsl:text> </xsl:text> - <hr class="footerbreak"/> + <xsl:if test="$prev or $next"> + <hr class="footerbreak"/> + </xsl:if> <xsl:text> </xsl:text> <div class="nav"> <xsl:text> </xsl:text> @@ -268,6 +272,10 @@ <link rel="up" href="{$up}"/> <xsl:text> </xsl:text> </xsl:if> + <xsl:if test="$toc-link"> + <link rel="contents" href="{$toc-link}"/> + <xsl:text> </xsl:text> + </xsl:if> <xsl:if test="$index"> <link rel="index" href="{$index}"/> <xsl:text> </xsl:text>
Received on Wednesday, 4 August 2010 12:59:23 UTC