Diffences in Usage oXygen vs saxon @ commandline

<oXygen/> general issues.
gerhardegger
Posts: 2

Diffences in Usage oXygen vs saxon @ commandline

Wed Jul 20, 2016 7:29 pm

Hi all,

The following works fine in oXygen (using Saxon 9), but does not work on the commandline!

I have a problem with writing into a zip-file - i.e. a Docx-File.

<xsl:param name="template"/>
....
<xsl:variable name="filename"><xsl:text>zip:file:</xsl:text><xsl:value-of select="$template"/><xsl:text>!word/document.xml</xsl:text></xsl:variable>
.....
<xsl:result-document href="{$filename}">
<xsl:copy-of select="$content"/>
</xsl:result-document>


On the commandline I use: java -jar saxon9ee.jar testfile.xml xml2docx.xsl template=/Users/gerhard/xml2docx/Template.docx

Here is the error I get:

Error at xsl:result-document on line 261 of xml2docx.xsl:
Resolved URL is malformed: unknown protocol: zip
Resolved URL is malformed


What's wrong?


Thank you all for your replies :-)


Gerhard
adrian
Posts: 2336

Re: Diffences in Usage oXygen vs saxon @ commandline

Thu Jul 21, 2016 12:36 pm

Hello,

You are using "zip:file:" which is an Oxygen specific protocol. This means it cannot possibly work outside of Oxygen.
Furthermore you are using "zip:file:" for writing (xsl:result-document) for which there is no workaround outside of Oxygen. For read-only access to files within ZIP archives you could use "jar:file:", which is supported by Java.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
gerhardegger
Posts: 2

Re: Diffences in Usage oXygen vs saxon @ commandline

Thu Jul 21, 2016 3:42 pm

Oh ... I see :(

Anyway: Thanks for your reply!!

Best Regards, Gerhard

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 2 guests