|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61937 - trunk/tools/boostbook/xsl
From: steven_at_[hidden]
Date: 2010-05-12 18:31:00
Author: steven_watanabe
Date: 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
New Revision: 61937
URL: http://svn.boost.org/trac/boost/changeset/61937
Log:
Tweaks to optimize the docbook to html conversion.
Text files modified:
trunk/tools/boostbook/xsl/admon.xsl | 4 +++-
trunk/tools/boostbook/xsl/callout.xsl | 4 +++-
trunk/tools/boostbook/xsl/chunk-common.xsl | 8 ++++++--
trunk/tools/boostbook/xsl/html.xsl | 27 +++++++++++++++++++--------
trunk/tools/boostbook/xsl/navbar.xsl | 7 ++++---
trunk/tools/boostbook/xsl/xhtml.xsl | 14 +++++++-------
6 files changed, 42 insertions(+), 22 deletions(-)
Modified: trunk/tools/boostbook/xsl/admon.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/admon.xsl (original)
+++ trunk/tools/boostbook/xsl/admon.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -10,7 +10,9 @@
version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/admon.xsl"/>
-<xsl:import href="relative-href.xsl"/>
+
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
<xsl:template name="admon.graphic">
<xsl:param name="node" select="."/>
Modified: trunk/tools/boostbook/xsl/callout.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/callout.xsl (original)
+++ trunk/tools/boostbook/xsl/callout.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -10,7 +10,9 @@
version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/callout.xsl"/>
-<xsl:import href="relative-href.xsl"/>
+
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
<xsl:template name="callout-bug">
<xsl:param name="conum" select='1'/>
Modified: trunk/tools/boostbook/xsl/chunk-common.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/chunk-common.xsl (original)
+++ trunk/tools/boostbook/xsl/chunk-common.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -10,10 +10,14 @@
version="1.0">
<!-- Import the HTML chunking stylesheet -->
+
+<!-- Watch out that we don't override chunk.xsl -->
+<!--
<xsl:import
- href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-common.xsl"/>
+ href="http://docbook.sourceforge.net/release/xsl/current/html/chunk-common.xsl"/> -->
-<xsl:import href="relative-href.xsl"/>
+<!-- Already included in the main stylesheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
<!-- ==================================================================== -->
Modified: trunk/tools/boostbook/xsl/html.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/html.xsl (original)
+++ trunk/tools/boostbook/xsl/html.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -16,14 +16,23 @@
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/html/math.xsl"/>
- <xsl:import href="chunk-common.xsl"/>
- <xsl:import href="docbook-layout.xsl"/>
- <xsl:import href="navbar.xsl"/>
- <xsl:import href="admon.xsl"/>
- <xsl:import href="xref.xsl"/>
- <xsl:import href="relative-href.xsl"/>
- <xsl:import href="callout.xsl"/>
-
+ <!-- Bring in the fast chunking overrides. There's nothing
+ that we need to override, so include instead of importing it. -->
+ <xsl:include
+ href="http://docbook.sourceforge.net/release/xsl/current/html/chunkfast.xsl"/>
+
+ <!-- We have to make sure that our templates override all
+ docbook templates. Therefore, we include our own templates
+ instead of importing them. In order for this to work,
+ the stylesheets included here cannot also include each other -->
+ <xsl:include href="chunk-common.xsl"/>
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="navbar.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
+
<xsl:param name="html.stylesheet">
<xsl:choose>
<xsl:when test = "$boost.defaults = 'Boost'">
@@ -280,6 +289,8 @@
</div>
</xsl:template>
+ <xsl:template name="generate.html.title"/>
+
<!-- ============================================================ -->
<xsl:template name="output.html.stylesheets">
Modified: trunk/tools/boostbook/xsl/navbar.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/navbar.xsl (original)
+++ trunk/tools/boostbook/xsl/navbar.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -9,8 +9,9 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
-<xsl:import href="relative-href.xsl"/>
-
+<!-- Already included in the main style sheet -->
+<!-- <xsl:import href="relative-href.xsl"/> -->
+
<!--
boost.defaults:
*custom - only use explicitly set parameters
@@ -369,7 +370,7 @@
</xsl:call-template>
</a></xsl:if>
<!-- home -->
- <xsl:if test = "$home != . or $nav.context = 'toc'">
+ <xsl:if test = "generate-id($home) != generate-id(.) or $nav.context = 'toc'">
<a accesskey = "h">
<xsl:attribute name = "href"><xsl:call-template name = "href.target">
<xsl:with-param name = "object" select = "$home"/>
Modified: trunk/tools/boostbook/xsl/xhtml.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/xhtml.xsl (original)
+++ trunk/tools/boostbook/xsl/xhtml.xsl 2010-05-12 18:30:59 EDT (Wed, 12 May 2010)
@@ -16,13 +16,13 @@
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/xhtml/math.xsl"/>
- <xsl:import href="chunk-common.xsl"/>
- <xsl:import href="docbook-layout.xsl"/>
- <xsl:import href="navbar.xsl"/>
- <xsl:import href="admon.xsl"/>
- <xsl:import href="xref.xsl"/>
- <xsl:import href="relative-href.xsl"/>
- <xsl:import href="callout.xsl"/>
+ <xsl:include href="chunk-common.xsl"/>
+ <xsl:include href="docbook-layout.xsl"/>
+ <xsl:include href="navbar.xsl"/>
+ <xsl:include href="admon.xsl"/>
+ <xsl:include href="xref.xsl"/>
+ <xsl:include href="relative-href.xsl"/>
+ <xsl:include href="callout.xsl"/>
<xsl:param name="html.stylesheet">
<xsl:choose>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk