xsl-list
[Top] [All Lists]

Re: [xsl] mulitple xsl:import from different directories

2012-07-10 03:09:58

You could implement Ken Holman's suggestion within a URIResolver. Register a compile-time URIResolver, and have it recognize the *.xsl appearing in the href argument. The URIResolver then returns a document containing a list of xsl:include elements for the file in the directory, wrapped in an xsl;stylesheet element.

What's the best way in Java of expanding the glob xsl_dir/*.xsl? The suggestion here:

http://stackoverflow.com/questions/794381/how-to-find-files-that-match-a-wildcard-string-in-java

is to use the DirectoryScanner class from Ant, but there are other ideas in that post that may be more practical.

Michael Kay
Saxonica

On 09/07/2012 22:57, Olivier XILLO wrote:
Hello,

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 ? Thanks Olivier
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>