- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 09 Aug 2010 01:03:45 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv32670/tools
Modified Files:
chunker.xsl specgen.xsl
Log Message:
make dfn pop-ups work in multipage version
Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- specgen.xsl 8 Aug 2010 09:49:20 -0000 1.83
+++ specgen.xsl 9 Aug 2010 01:03:43 -0000 1.84
@@ -37,12 +37,6 @@
<xsl:variable name="person-nodeset" select='key("elements","editors")/*[@ class="person"]'/>
<xsl:variable name="groupinfo-nodeset" select="key('elements','groupinfo')"/>
<xsl:template match='/'>
- <!-- * <xsl:if test='$maturity = "ED"'> -->
- <!-- * <xsl:comment> * </xsl:comment> -->
- <!-- * <xsl:comment> * Note: This file was generated from source at <xsl:value-of select="$source"/><xsl:text> </xsl:text></xsl:comment> -->
- <!-- * <xsl:comment> * Run the "make" command to regenerate it. </xsl:comment> -->
- <!-- * <xsl:comment> * </xsl:comment> -->
- <!-- * </xsl:if> -->
<xsl:apply-templates select='/*'/>
</xsl:template>
<xsl:template match='h:*'>
@@ -118,7 +112,7 @@
</xsl:choose>
</xsl:template>
<xsl:template match="h:body">
- <body>
+ <body onload="initDfn()">
<xsl:copy-of select='@*[namespace-uri()="" or namespace-uri="http://www.w3.org/XML/1998/namespace"]'/>
<xsl:if test="not($chunk = 0)">
<xsl:attribute name="class">chunk</xsl:attribute>
@@ -143,13 +137,9 @@
'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">
+ <div class="index-entry" id="{@id}_index">
<xsl:text> </xsl:text>
- <p>
+ <p class="index-term">
<xsl:value-of select="normalize-space(.)"/>
<xsl:if test="starts-with(@id,'refs')">
<xsl:text> (specification)</xsl:text>
@@ -165,36 +155,16 @@
<xsl:text> </xsl:text>
<span class="index-notation">(defining instance)</span></li>
<xsl:text> </xsl:text>
- <xsl:if test="count(key('refs',@id)) > 0">
- <xsl:variable name="index-items">
- <xsl:text> </xsl:text>
- <xsl:for-each select="key('refs',@id)">
- <li><xsl:call-template name="make-link-with-name-of-named-ancestor-of-node"/></li>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- </xsl:variable>
- <xsl:for-each select="exsl:node-set($index-items)/h:li/h:a">
- <xsl:variable name="contents" select="."/>
- <xsl:choose>
- <xsl:when test="$contents=preceding::h:a"/>
- <xsl:otherwise>
- <li>
- <xsl:copy-of select="$contents"/>
- <xsl:for-each select="following::h:a[.=$contents]">
- <span class="index-counter">
- <xsl:text> [</xsl:text>
- <a href="{@href}">
- <xsl:value-of select="position() + 1"/>
- </a>
- <xsl:text>]</xsl:text>
- </span>
- </xsl:for-each>
- </li>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text> </xsl:text>
- </xsl:if>
+ </ul>
+ <ul id="{@id}_index_items">
+ <xsl:choose>
+ <xsl:when test="key('refs',@id)">
+ <xsl:call-template name="make-consolidated-index-entry"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <li class="index-no-references">No references in this document.</li>
+ </xsl:otherwise>
+ </xsl:choose>
</ul>
<xsl:text> </xsl:text>
</div>
@@ -212,15 +182,52 @@
<xsl:otherwise>
<xsl:call-template name="write.chunk">
<xsl:with-param name="id">index</xsl:with-param>
+ <xsl:with-param name="filename">index.html</xsl:with-param>
+ <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:call-template>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="method">xml</xsl:with-param>
+ <xsl:with-param name="filename">index.xhtml</xsl:with-param>
+ <xsl:with-param name="id">index</xsl:with-param>
<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="make-consolidated-index-entry">
+ <xsl:variable name="index-items">
+ <xsl:for-each select="key('refs',@id)">
+ <li><xsl:call-template name="make-link-with-name-of-named-ancestor-of-node"/></li>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:for-each select="exsl:node-set($index-items)/h:li/h:a">
+ <xsl:variable name="contents" select="."/>
+ <xsl:choose>
+ <xsl:when test="$contents=preceding::h:a"/>
+ <xsl:otherwise>
+ <li>
+ <xsl:copy-of select="$contents"/>
+ <xsl:for-each select="following::h:a[.=$contents]">
+ <span class="index-counter">
+ <xsl:text> [</xsl:text>
+ <a href="{@href}">
+ <xsl:value-of select="position() + 1"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </span>
+ </xsl:for-each>
+ </li>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
<xsl:template name="make-link-with-name-of-named-ancestor-of-node">
<xsl:param name="id-of-target" select="generate-id()"/>
<xsl:param name="section" select="(ancestor::h:section[child::h:h2])[last()]"/>
Index: chunker.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/chunker.xsl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- chunker.xsl 5 Aug 2010 07:42:17 -0000 1.17
+++ chunker.xsl 9 Aug 2010 01:03:42 -0000 1.18
@@ -180,7 +180,7 @@
<xsl:text> </xsl:text>
</head>
<xsl:text> </xsl:text>
- <body class="chunk">
+ <body class="chunk" onload="initDfn()">
<div id="jump-indexes" class="no-number no-toc">
<div id="jumpIndexA-button">jump</div>
</div>
@@ -199,6 +199,8 @@
</xsl:call-template>
<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>
</body>
<xsl:text> </xsl:text>
</html>
Received on Monday, 9 August 2010 01:03:47 UTC