How to use Stylesheets from different resource folders?

Here should go questions about transforming XML with XSLT and FOP.
chrishaase
Posts: 8
Joined: Thu Mar 31, 2005 2:13 pm
Location: Hannover, Germany

How to use Stylesheets from different resource folders?

Post 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
chrishaase
Posts: 8
Joined: Thu Mar 31, 2005 2:13 pm
Location: Hannover, Germany

Post by chrishaase »

P.S: All Stylesheets in folder 'general' are used as substyles with xsl:include in letter, offer and billing.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How to use Stylesheets from different resource folders?

Post 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
chrishaase
Posts: 8
Joined: Thu Mar 31, 2005 2:13 pm
Location: Hannover, Germany

Post by chrishaase »

Works fine! Thank you very much! :-)

Greetings,
Chris
Post Reply