Catalog and references into zip files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
cmarchand
Posts: 8
Joined: Fri Oct 23, 2015 10:44 am

Catalog and references into zip files

Post by cmarchand »

Hello,

I have zip files that are XSL libraries.
In oxygen, I want to include thoses libraries into my project XSL, like

Code: Select all

<xsl:include href="library:identity.xsl" />
As my library is a zip (or jar) file, may I define a catalog entry like this :

Code: Select all

<rewriteSystem systemIdStartString="library:" rewritePrefix="zip:${pdu}/dependencies/library.zip/"/>
Then, may I attach a catalog to a project, and not to the whole Oxygen ?

Best regards,
Christophe
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Catalog and references into zip files

Post by Radu »

Hi Christophe,

You cannot use Oxygen editor variables both in the catalog XML files and in XSLT stylesheets because they will not get expanded in any way.
I'm not sure how you could avoid the absolute path in your XML catalog in this case.
Oxygen has support also for running ANT build files. So maybe you could write an ANT build file which would automatically generate this XML catalog as a temporary file, then start an XSLT task using it and delete it afterwards.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
cmarchand
Posts: 8
Joined: Fri Oct 23, 2015 10:44 am

Re: Catalog and references into zip files

Post by cmarchand »

How can I attach a catalog to a XSL task, or to a project ?
If I generate the catalog, I can avoid using variables in.
But I need to change catalog when I change project, because two different projects may use two different releases of the same catalog.

Then, is there a URI syntax to use files in .zip or .jar files ?

Best regars,
Christophe
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Catalog and references into zip files

Post by Radu »

Hi Christophe,

You can refer to resources in ZIP and JAR libraries using the "jar" protocol like:

jar:file:///C:/path/to/archive.zip!/path/inside/archive/test.xsl

The XSLT task from an ANT build file allows you to set an XML catalog to use:

https://ant.apache.org/manual/Tasks/style.html

and you could try to create the temporary XML catalog with another XSLT task which takes parameters from the build file.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply