Page 1 of 1

How to use Stylesheets from different resource folders?

Posted: Mon Aug 27, 2007 5:31 pm
by chrishaase
Hi all!

I need to use Stylesheets from multiple different folders for a single transformation process. Is there a way to configure FOP or Oxygen to read the .xsl files from multiple folders?

For example, I have this:

/general/adress.xsl
/general/pagemaster.xsl
/general/firstpage.xsl
/general/restpage.xsl

and

/letter/letter1.xsl
/letter/letter2.xsl

/offer/offer1.xsl
/offer/offer2.xsl

/billing/billing.xsl

Processing letter1.xsl needs to include all stylesheets from the the general folder (adress.xsl, pagemaster.xsl, ...), the same is for letter2, offer1, billing.xsl and so on.
At the moment this works only if 'general' is a subfolder of letter, offer and billing.

Any suggestions?

Greetings, Chris

Posted: Tue Aug 28, 2007 11:44 am
by chrishaase
P.S: All Stylesheets in folder 'general' are used as substyles with xsl:include in letter, offer and billing.

Re: How to use Stylesheets from different resource folders?

Posted: Tue Aug 28, 2007 12:09 pm
by sorin_ristache
Hello,
chrishaase wrote:Processing letter1.xsl needs to include all stylesheets from the the general folder (adress.xsl, pagemaster.xsl, ...), the same is for letter2, offer1, billing.xsl and so on. At the moment this works only if 'general' is a subfolder of letter, offer and billing.
You have to specify the path to general/adress.xsl, general/pagemaster.xsl, etc in the include elements of letter1.xsl, letter2, offer1.xsl and the other stylesheets which need to include the stylesheets located in the "general" folder. For example if letter1.xsl is located in /a/b/c/letter1.xsl and address.xsl is located in /a/e/f/adress.xsl then letter1.xsl must specify:

Code: Select all


<xsl:include href="../../e/f/address.xsl"/>
<xsl:include href="../../e/f/pagemaster.xsl"/>
...

Regards,
Sorin

Posted: Tue Aug 28, 2007 2:01 pm
by chrishaase
Works fine! Thank you very much! :-)

Greetings,
Chris