include Makefile.param
all: titlepage.templates.xsl param.xsl \
- profile-docbook.xsl profile-chunk.xsl profile-onechunk.xsl
+ profile-docbook.xsl profile-chunk-code.xsl
xml: param.xml
profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl
$(XSLT) $< ../profiling/xsl2profile.xsl $@
-profile-chunk.xsl: chunk.xsl ../profiling/xsl2profile.xsl
- $(XSLT) $< ../profiling/xsl2profile.xsl $@
-
-profile-onechunk.xsl: onechunk.xsl ../profiling/xsl2profile.xsl
+profile-chunk-code.xsl: chunk-code.xsl ../profiling/xsl2profile.xsl
$(XSLT) $< ../profiling/xsl2profile.xsl $@
clean:
PARAMS=../params/admon.graphics.xml \
../params/admon.graphics.extension.xml \
../params/admon.graphics.path.xml \
+ ../params/admon.textlabel.xml \
../params/admon.style.xml \
../params/annotate.toc.xml \
../params/appendix.autolabel.xml \
--- /dev/null
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+<xsl:include href="manifest.xsl"/>
+
+<!-- Why is chunk-code now xsl:included?
+
+Suppose you want to customize *both* the chunking algorithm used *and* the
+presentation of some elements that may be chunks. In order to do that, you
+must get the order of imports "just right". The answer is to make your own
+copy of this file, where you replace the initial import of "docbook.xsl"
+with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+Put the templates for changing the presentation of elements in your base.xsl.
+
+Put the templates that control chunking after the include of chunk-code.xsl.
+
+Voila! (Man I hope we can do this better in XSLT 2.0)
+
+-->
+
+<xsl:include href="profile-chunk-code.xsl"/>
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<xsl:import href="profile-chunk.xsl"/>
+
+<!-- Ok, using the onechunk parameter makes this all work again. -->
+<!-- It does have the disadvantage that it only works for documents that have -->
+<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
+<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
+
+<xsl:param name="onechunk" select="1"/>
+
+<xsl:template name="href.target.uri">
+ <xsl:param name="object" select="."/>
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>