OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: DocBook chunk.xsl resolves path to docbook.xsl incorrectly with Xalan (with Windows, but not with *nix)


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"
            <classpath refid="xalan.classpath"/>

"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".


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]