[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: mulitple xsl:import from different directories

Subject: Re: mulitple xsl:import from different directories
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jul 2012 18:52:53 -0400
Re:  mulitple xsl:import from different directories
At 2012-07-09 23:57 +0200, Olivier XILLO wrote:
I have a master XSL file that need to include/import several xsl files located in a directory 'xsl_dir'.
However, I don't know in advance the number and names of xsl files.
So, I basically need to do something like :
<xsl:include href="xsl_dir/*.xsl"/>


I'm using XSLT2.0 with Saxon 9.3 HE.

Any idea on how I could achieve this ?

Use XSLT to create a single file of multiple <xsl:include> statements by using Saxon's implementation of collection(), and then have a single <xsl:include> in your stylesheet that includes the generated file.


I can't see a way of doing it all at compile time ... I'm sure you'll need the pre-step of creating the intermediate file of include statements. At least you won't have to change your stylesheet as the one include need never change.

I hope this helps.

. . . . . . . . . . Ken


-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.