Next in thread →
Next in month →
Re: [docbook-apps] DocBook chunk.xsl resolves path to docbook.xsl incorrectly with Xalan (with Windows, but not with *nix)
Hello,
Your suggested solution solved the problem. Xalan didn't like the paths on Windows.
As I am using Ant to compile, using the standard <makeurl> task before filtering and invoking the XSLT customization layer file was all I needed to do.
Thanks,
Christopher
On 7 November 2012 20:49, Bob Stayton <> wrote:
It is possible that Xalan is confused by the Windows pathname
syntax:
<xsl:import
href="">
I would try:
<xsl:import
href="">
Bob Stayton
Sagehill Enterprises
From: Christopher BROWN
Sent: Wednesday, November 07, 2012 8:42 AM
To: DocBook Apps list
Subject: [docbook-apps] DocBook chunk.xsl resolves path to
docbook.xsl incorrectly with Xalan (with Windows, but not with
*nix)
Hello,
I'm observing a strange problem, where I use the "html/chunk.xsl"
stylesheet via Ant and the <xslt> task. It works under Linux (Ubuntu
12.04) and Mac OS X 10.8, but not under Windows. The problem seems to be
that (as expected) under *nix, the "chunk.xsl" imports the "docbook.xsl"
stylesheet (in the same directory, because there's no directory in the XSLT,
which is correct), but under Windows it resolves against the "basedir" of Ant
and not the "basedir" of the XSLT task.
I'm using:
- DocBook HTML stylesheets 1.76.1
- Ant 1.8.4
- Java 6.0 u37
- Xalan 2.7.1
Here's the relevant bit of my "build.xml" file (${vbuild} is an absolute
path):
<xslt
basedir="${vbuild}/docbook/src/${l10n}"
style="${vbuild}/docbook/custom/${l10n}/custom-html.xsl"
destdir="${vbuild}/docbook/out/${l10n}" extension=".html"
includes="*.xml">
<classpath
refid="xalan.classpath"/>
</xslt>
"xalan.classpath" includes: resolver.jar, serializer.jar, xalan.jar,
xercesImpl.jar
Here's the output from Ant:
[xslt] Transforming into
c:\java\build\temp\ProjectName\docbook\out\en
[xslt] Processing
c:\java\build\temp\ProjectName\docbook\src\en\manual.xml to
c:\java\build\temp\ProjectName\docbook\out\en\manual.html
[xslt] Loading stylesheet
c:\java\build\temp\ProjectName\docbook\custom\en\custom-html.xsl
[xslt]
c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:25:33: Error!
Had IO Exception with stylesheet file: docbook.xsl Cause:
java.io.FileNotFoundException: C:\java\projects\ProjectName\docbook.xsl (The
system cannot find the file specified)
[xslt]
c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:32:38: Error!
Had IO Exception with stylesheet file: chunk-common.xsl Cause:
java.io.FileNotFoundException: C:\java\projects\ProjectName\chunk-common.xsl
(The system cannot find the file specified)
[xslt]
c:\java\build\temp\ProjectName\docbook-xsl-1.76.1\html\chunk.xsl:50:37: Error!
Had IO Exception with stylesheet file: chunk-code.xsl Cause:
java.io.FileNotFoundException: C:\java\projects\viewshell\chunk-code.xsl (The
system cannot find the file specified)
Like I say, it works under *nix but not under Windows. I can't see
what needs configuring so that under Windows, the "chunk.xsl" looks in the same
directory as itself for "docbook.xsl". I've not modified the standard
docbook files.
My "custom-html.xsl" customization layer contains this import on *nix
(first line) and Windows (second line) :
<xsl:import
href="">
<xsl:import
href="">
...the path is hard-coded into this file as part of the build process (ant
copy, filtering on). On all platforms, "custom-html.xsl" finds
"chunk.xsl", but on Windows, "chunk.xsl" can't find "docbook.xsl".
Thanks,
Christopher
Next in thread →
Next in month →