<xsl:param name="base.dir" select="../output"/>
This doesn't work because a plain text string in a 'select' attribute is
taken to be an XPath, so it is looking for an element named 'output'. This
is probably the most common mistake in XSL programming, and everyone makes
it. 8^)
Put the string in single quotes, or make it the content of the xsl:param
element:
<xsl:param name="base.dir">../output/</xsl:param>
Note the trailing slash too, as the stylesheet doesn't supply that.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Larry Garfield" <larry@garfieldtech.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, March 23, 2005 9:48 PM
Subject: [docbook-apps] base.dir param not working in customization layer
I'm working with the DocBook XSL scripts for the first time, although
I've been using DocBook with my own XSLT scripts for a few years.
I'm trying to use the chunk.xsl script and set a base.dir for the
output, but it's not working in the customization layer. From the
command line, however, it does. I'm using Xalan 2.6 in either case.
Command line that does work:
java \
-cp "/usr/share/java/xalan2.jar"\
org.apache.xalan.xslt.Process \
-in src/handbook.xml \
-param base.dir ../output/ \
-xsl chunked.xsl
Customization layer that does not work (base.dir has no effect)
(chunked.xsl):
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import the base chunk stylesheet for HTML -->
<xsl:import
href="/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl"/>
<xsl:param name="html.stylesheet" select="'../styles/library.css'"/>
<xsl:param name="chunk.fast" select="1"/>
<xsl:param name="base.dir" select="../output"/>
<xsl:param name="chunk.section.depth" select="0"/>
</xsl:stylesheet>