[xslt] xsltproc on windows front slash/backslash conundrum



Our tool chain runs on Solaris and Windows. In the following example (on
Win2K), the xslt branding.xsl sets some params and imports filter.xsl.
If I invoke xsltproc in the following way, with back slashes in the path
to branding.xsl, I get the following error:

H:\pkdp\docmodules\mary\enus\frankenhelp>"C:\Documents and
Settings\dcramer\Desk
top\xsltproc\bin\xsltproc.exe" -o frankenfiltered.xml
"h:\pkdp\docmodules\doctoo
ls\1.0\DocShared\xsl\filter\branding.xsl" frankenproc.xml
warning: failed to load external entity "filter.xsl"
compilation error: file
h:/pkdp/docmodules/doctools/1.0/DocShared/xsl/filter/branding.xsl line 7
element import
xsl:import : unable to load filter.xsl

If I change the backslashes to front slashes, it works fine as long as
the document doesn't contain any external entities (and the xsl tries to
resolve them). If the document contains external entities and I use
forward slashes in the path, then I get:

H:\pkdp\docmodules\mary\enus\frankenhelp>"C:\Documents and
Settings\dcramer\Desk
top\xsltproc\bin\xsltproc.exe" -o frankenfiltered.xml
"h:/pkdp/docmodules/doctoo
ls/1.0/DocShared/xsl/share/holmanize.xsl" frankenhelp.xml
warning: failed to load external entity
"h:///pkdp/docmodules/doctools/1.0/DocShared/xsl/share/frankenguide.xml"

In this case, xsltproc is very confused about where to look for
frankenguide.xml, which is really in the same directory as
frankenhelp.xml, not in the same directory as the xsl stylesheet. 

Unfortunately, we have doc build system in perl that runs our docs
through a series of transformations, the first of which would work if I
used xsltproc with back slashes, the rest if I used back slashes. I'd
like to switch to xsltproc for the speed savings, but don't think I can
talk the developer who owns the code into using backslashes on one pass
and front slashes on the others. It would probably be better to fix
xsltproc or the code it uses anyway.

I've tried various combinations of front and backslashes, with no luck.
If there's nothing I'm missing, I'd like to report this as a bug.

Thanks,
David

Version Info:

H:\pkdp\docmodules\mary\enus\frankenhelp>"C:\Documents and
Settings\dcramer\Desk
top\xsltproc\bin\xsltproc.exe" --version
Using libxml 20424, libxslt 10020 and libexslt 711
xsltproc was compiled against libxml 20424, libxslt 10020 and libexslt
711
libxslt 10020 was compiled against libxml 20424
libexslt 711 was compiled against libxml 20424




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]