- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 02 Aug 2010 15:34:25 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv3563/tools
Modified Files:
chunker.xsl
Log Message:
build tweak
Index: chunker.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/chunker.xsl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- chunker.xsl 2 Aug 2010 11:27:39 -0000 1.12
+++ chunker.xsl 2 Aug 2010 15:34:23 -0000 1.13
@@ -26,14 +26,11 @@
<xsl:param name="title"/>
<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:if test="$quiet = 0">
<xsl:message>
<xsl:value-of select="$filename"/>
- <!-- * <xsl:text>Writing </xsl:text> -->
- <!-- * <xsl:value-of select="$filename"/> -->
- <!-- * <xsl:text> for "</xsl:text> -->
- <!-- * <xsl:value-of select="$title"/> -->
- <!-- * <xsl:text>"</xsl:text> -->
</xsl:message>
</xsl:if>
<exsl:document href="{$filename}"
@@ -50,6 +47,8 @@
<xsl:with-param name="title" select="$title"/>
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="up" select="$up"/>
+ <xsl:with-param name="index" select="$index"/>
<xsl:with-param name="content" select="$content"/>
</xsl:call-template>
</exsl:document>
@@ -58,77 +57,11 @@
<xsl:param name="title"/>
<xsl:param name="prev"/>
<xsl:param name="next"/>
+ <xsl:param name="up"/>
+ <xsl:param name="index"/>
<xsl:param name="content">
<xsl:apply-imports/>
</xsl:param>
- <html>
- <xsl:text> </xsl:text>
- <head>
- <xsl:text> </xsl:text>
- <xsl:choose>
- <xsl:when test="$maturity = 'ED'">
- <link rel='stylesheet' href='W3C-ED.css' type='text/css'/>
- </xsl:when>
- <xsl:when test='
- $maturity="WD"
- or $maturity="FPWD"
- or $maturity="LCWD"
- or $maturity="FPWDLC"
- '>
- <link rel='stylesheet' href='http://www.w3.org/StyleSheets/TR/W3C-WD' type='text/css'/>
- </xsl:when>
- <xsl:otherwise>
- <link rel='stylesheet' href='http://www.w3.org/StyleSheets/TR/W3C-{$maturity}' type='text/css'/>
- </xsl:otherwise>
- </xsl:choose>
- <title>
- <xsl:value-of select="$title"/>
- </title>
- <xsl:for-each select="//h:link[@rel='stylesheet']">
- <xsl:text> </xsl:text>
- <xsl:copy-of select="."/>
- </xsl:for-each>
- <xsl:if test="$site='whatwg'">
- <style>
-body {
-background-image: url(http://www.whatwg.org/images/WD);
-background-repeat: repeat-y;
-}
-h1, h2, h3, .section-title-ref {
-color: #3C790A;
-}
- </style>
- </xsl:if>
- <!-- * <xsl:call-template name="head.nav.links"> -->
- <!-- * <xsl:with-param name="title" select="$title"/> -->
- <!-- * <xsl:with-param name="prev" select="$prev"/> -->
- <!-- * <xsl:with-param name="next" select="$next"/> -->
- <!-- * </xsl:call-template> -->
- <xsl:text> </xsl:text>
- </head>
- <xsl:text> </xsl:text>
- <body class="chunk">
- <div id="jump-indexes" class="no-number no-toc">
- <div id="jumpIndexA-button">elements</div>
- </div>
- <xsl:call-template name="header.navigation">
- <xsl:with-param name="prev" select="$prev"/>
- <xsl:with-param name="next" select="$next"/>
- </xsl:call-template>
- <xsl:copy-of select="$content"/>
- <xsl:call-template name="footer.navigation">
- <xsl:with-param name="prev" select="$prev"/>
- <xsl:with-param name="next" select="$next"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <script src="js/jump-indexes.js" type="text/javascript"></script>
- </body>
- <xsl:text> </xsl:text>
- </html>
- </xsl:template>
- <xsl:template name="header.navigation">
- <xsl:param name="prev" select="preceding-sibling::*"/>
- <xsl:param name="next" select="following-sibling::*"/>
<xsl:variable name="prev-text">
<xsl:choose>
<xsl:when test="contains($prev/@id,'.')">
@@ -193,6 +126,83 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
+ <html>
+ <xsl:text> </xsl:text>
+ <head>
+ <xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$maturity = 'ED'">
+ <link rel='stylesheet' href='W3C-ED.css' type='text/css'/>
+ </xsl:when>
+ <xsl:when test='
+ $maturity="WD"
+ or $maturity="FPWD"
+ or $maturity="LCWD"
+ or $maturity="FPWDLC"
+ '>
+ <link rel='stylesheet' href='http://www.w3.org/StyleSheets/TR/W3C-WD' type='text/css'/>
+ </xsl:when>
+ <xsl:otherwise>
+ <link rel='stylesheet' href='http://www.w3.org/StyleSheets/TR/W3C-{$maturity}' type='text/css'/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <title>
+ <xsl:value-of select="$title"/>
+ </title>
+ <xsl:for-each select="//h:link[@rel='stylesheet']">
+ <xsl:text> </xsl:text>
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+ <xsl:if test="$site='whatwg'">
+ <style>
+body {
+background-image: url(http://www.whatwg.org/images/WD);
+background-repeat: repeat-y;
+}
+h1, h2, h3, .section-title-ref {
+color: #3C790A;
+}
+ </style>
+ </xsl:if>
+ <xsl:call-template name="head.nav.links">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="prev-text" select="$prev-text"/>
+ <xsl:with-param name="next-text" select="$next-text"/>
+ <xsl:with-param name="up" select="$up"/>
+ <xsl:with-param name="index" select="$index"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </head>
+ <xsl:text> </xsl:text>
+ <body class="chunk">
+ <div id="jump-indexes" class="no-number no-toc">
+ <div id="jumpIndexA-button">elements</div>
+ </div>
+ <xsl:call-template name="header.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="prev-text" select="$prev-text"/>
+ <xsl:with-param name="next-text" select="$next-text"/>
+ </xsl:call-template>
+ <xsl:copy-of select="$content"/>
+ <xsl:call-template name="footer.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="prev-text" select="$prev-text"/>
+ <xsl:with-param name="next-text" select="$next-text"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <script src="js/jump-indexes.js" type="text/javascript"></script>
+ </body>
+ <xsl:text> </xsl:text>
+ </html>
+ </xsl:template>
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="preceding-sibling::*"/>
+ <xsl:param name="next" select="following-sibling::*"/>
+ <xsl:param name="prev-text"/>
+ <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>
@@ -217,70 +227,8 @@
<xsl:template name="footer.navigation">
<xsl:param name="prev" select="preceding-sibling::*"/>
<xsl:param name="next" select="following-sibling::*"/>
- <xsl:variable name="prev-text">
- <xsl:choose>
- <xsl:when test="contains($prev/@id,'.')">
- <xsl:choose>
- <xsl:when test="$prev/@id='meta.name'">
- <xsl:text>meta name</xsl:text>
- </xsl:when>
- <xsl:when test="$prev/@id='meta.charset'">
- <xsl:text>meta charset</xsl:text>
- </xsl:when>
- <xsl:when test="contains($prev/@id,'meta.http-equiv.')">
- <xsl:value-of select="concat('meta http-equiv=',substring-after($prev/@id,'meta.http-equiv.'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(substring-before($prev/@id,'.'),' type=',substring-after($prev/@id,'.'))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="contains($prev/@id,'-')">
- <xsl:call-template name="string.subst">
- <xsl:with-param name="string" select="$prev/@id"/>
- <xsl:with-param name="target">-</xsl:with-param>
- <xsl:with-param name="replacement">
- <xsl:text> </xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$prev/@id"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="next-text">
- <xsl:choose>
- <xsl:when test="contains($next/@id,'.')">
- <xsl:choose>
- <xsl:when test="$next/@id='meta.name'">
- <xsl:text>meta name</xsl:text>
- </xsl:when>
- <xsl:when test="$next/@id='meta.charset'">
- <xsl:text>meta charset</xsl:text>
- </xsl:when>
- <xsl:when test="contains($next/@id,'meta.http-equiv.')">
- <xsl:value-of select="concat('meta http-equiv=',substring-after($next/@id,'meta.http-equiv.'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(substring-before($next/@id,'.'),' type=',substring-after($next/@id,'.'))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="contains($next/@id,'-')">
- <xsl:call-template name="string.subst">
- <xsl:with-param name="string" select="$next/@id"/>
- <xsl:with-param name="target">-</xsl:with-param>
- <xsl:with-param name="replacement">
- <xsl:text> </xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$next/@id"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+ <xsl:param name="prev-text"/>
+ <xsl:param name="next-text"/>
<xsl:text> </xsl:text>
<hr class="footerbreak"/>
<xsl:text> </xsl:text>
@@ -301,126 +249,29 @@
</div>
</xsl:template>
- <xsl:template name="head.navs.links">
- <xsl:param name="title"/>
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:variable name="this" select="."/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:if test="$home">
- <link rel="home">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="object" select="$home"/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$home"
- mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
- </xsl:if>
-
- <xsl:if test="$up">
- <link rel="up">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="object" select="$up"/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
- </xsl:if>
-
+ <xsl:template name="head.nav.links">
+ <xsl:param name="prev"/>
+ <xsl:param name="prev-text"/>
+ <xsl:param name="next"/>
+ <xsl:param name="next-text"/>
+ <xsl:param name="up"/>
+ <xsl:param name="index"/>
<xsl:if test="$prev">
- <link rel="prev">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="object" select="$prev"/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
+ <link rel="prev" href="{$prev/@id}.html" title="{$prev-text}"/>
+ <xsl:text> </xsl:text>
</xsl:if>
-
<xsl:if test="$next">
- <link rel="next">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="object" select="$next"/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
+ <link rel="next" href="{$next/@id}.html" title="{$next-text}"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="$up">
+ <link rel="up" href="{$up}"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:if test="$index">
+ <link rel="index" href="{$index}"/>
+ <xsl:text> </xsl:text>
</xsl:if>
-
- <xsl:for-each select="//part
- |//reference
- |//preface
- |//chapter
- |//article
- |//refentry
- |//appendix[not(parent::article)]|appendix
- |//glossary[not(parent::article)]|glossary
- |//index[not(parent::article)]|index">
- <link rel="{local-name(.)}">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="context" select="$this"/> -->
- <!-- * <xsl:with-param name="object" select="."/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
- </xsl:for-each>
-
- <xsl:for-each select="section|sect1|refsection|refsect1">
- <link>
- <xsl:attribute name="rel">
- <xsl:choose>
- <xsl:when test="local-name($this) = 'section'
- or local-name($this) = 'refsection'">
- <xsl:value-of select="'subsection'"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'section'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="context" select="$this"/> -->
- <!-- * <xsl:with-param name="object" select="."/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
- </xsl:for-each>
-
- <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
- <link rel="subsection">
- <xsl:attribute name="href">
- <!-- * <xsl:call-template name="href.target"> -->
- <!-- * <xsl:with-param name="context" select="$this"/> -->
- <!-- * <xsl:with-param name="object" select="."/> -->
- <!-- * </xsl:call-template> -->
- </xsl:attribute>
- <xsl:attribute name="title">
- <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
- </xsl:attribute>
- </link>
- </xsl:for-each>
</xsl:template>
<xsl:template name="string.subst">
Received on Monday, 2 August 2010 15:34:27 UTC