This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] base.dir param not working in customization layer


<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>
>
> ----------------
>
> The base.dir in the customization file does nothing, but the command
> line one works.  Can anyone offer a hint as to why? :-)  Thanks.
>
> -- 
> Larry Garfield AIM: LOLG42
> larry@garfieldtech.com ICQ: 6817012
>
> "If nature has made any one thing less susceptible than all others of
> exclusive property, it is the action of the thinking power called an
> idea, which an individual may exclusively possess as long as he keeps it
> to himself; but the moment it is divulged, it forces itself into the
> possession of every one, and the receiver cannot dispossess himself of
> it."  -- Thomas Jefferson
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]