Specifying Directory Paths

Here should go questions about transforming XML with XSLT and FOP.
kevin2010
Posts: 3
Joined: Mon Jun 07, 2010 3:36 pm

Specifying Directory Paths

Post by kevin2010 »

We have multiple imports withing some xsl files. Some have paths names defines in a variable:

<xsl:import href="CONTENT:shared.xsl"/>

Is there a way to either define CONTENT to be point to the filepath, or remove the prefix CONTENT and setup oxygen to include the directory (and its xsl files)?

Regards

Kevin
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Specifying Directory Paths

Post by adrian »

Hello,

I'm afraid you can't define a variable or parameter before the imports.


I guess you could use an XML catalog trick to get the imports from another location.
e.g. <xsl:import href="http://mycontent/shared.xsl"/>

In an XML catalog you could put:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteSystem systemIdStartString="http://mycontent" rewritePrefix="/my/file/location"/>
<rewriteURI uriStartString="http://mycontent" rewritePrefix="/my/file/location"/>
</catalog>
This means that SystemIDs and URIs that start with 'http://mycontent' will be redirected to '/my/file/location'.

Then you can add the XML catalog in Oxygen's options: Options -> Preferences -> XML -> XML Catalog

You can read more about catalogs here:
http://www.oxygenxml.com/doc/ug-oxygen/ ... alogs.html

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