I realize this is probably a trivial question: how do I make Saxon read a
source file that is inside a jar? The issue is: LibreOffice does not work well
with XSLT filters, and my work around is to directly read the content.xml
which is inside a LibreOffice document file rather then invoke the
transformation from inside LibreOffice.
So I am trying something like:
java -jar "c:\Users...\saxon9he.jar"
But to no avail. I get the erro:
Transformation failed: Source file jar:file:\c:...\myFile\content.xml does not
I've tried replacing slashes with backslashes, but it seems java takes care of
this pitfall. What am I doing wrong? I am sure the solution is very simple.
All the best,
I found it: I need to use the -u option and use a single slash after file:.
java -jar "c:\Users...\saxon9he.jar" -u
works. Hope this is helpful for others!
I would recommend using forwards slashes rather than backslashes. The
standards for file scheme URIs are pretty fuzzy, but forwards slash is the
only path delimiter recognized in the W3C URI specs.
The "jar" URI scheme, incidentally, is not defined in any standard, but was
invented by Sun. Because of the exclamation mark, the URIs are technically
illegal according to the RFC specifications, and therefore according to the
XSLT spec, and they aren't accepted by the java java.net.URI class, but Saxon
treats them specially in the interests of user convenience.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.