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

Re: including multiple files

Subject: Re: including multiple files
From: "Birnbaum, David J djbpitt@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 3 Oct 2015 18:18:29 -0000
Re:  including multiple files
Dear Michael (cc XSL-List),

Thank for the quick response!



On 10/2/15, 6:24 PM, "Michael Kay" <mike@xxxxxxxxxxxx> wrote:

>You need to write a transformation that generates the stylesheet
>containing the variable number of includes.
><xsl:namespace-alias stylesheet-prefix=3t2 result-prefix=3xsl2/>
><xsl:template name=3gen-includes2>
>  <t:stylesheet version=32.02>
>  <xsl:for-each select=3uri-collection(some-dir?select=*.xsl9)2>
>    <t:include href=3{.}2/>
>  </xsl:for-each>
> </t:stylesheet>
>Michael Kay
>> On 2 Oct 2015, at 23:15, Birnbaum, David J djbpitt@xxxxxxxx
>><xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Dear XSL-list,
>> I fear that this may be a blind spot, or perhaps just a Bad Idea, but
>> developing an XSLT application that I'd like to modularize by creating a
>> series of smaller stylesheets that I can include with <xsl:include>.
>> will eventually be several dozen of them, the exact inventory will
>> over the course of development, and I didn't want to have to list them
>> individually, with separate <xsl:include> statements for each one. I
>> thought it should be possible to simplify the process by putting all of
>> the subsidiary stylesheets into a subdirectory, addressing it from
>> the main one with collection(), and iterating over the members of that
>> collection to pass the URL of each one to <xsl:include
>> href="somethingOrOther"/>. In this way, each time the transformation was
>> run, the main stylesheet would include whatever it found in the
>> subdirectory at run time.
>> I'm stumbling, though, because 1) <xsl:include> must be top-level and
>>2) I
>> can't iterate with <xsl:for-each> at the top level.
>> Can anyone point to a strategy that would let me <xsl:include> multiple
>> smaller stylesheets into a larger one without having to create a
>> explicit <xsl:include> element for each of them?
>> Thanks,
>> David
>> djbpitt@xxxxxxxxx

Current Thread


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.
First Name
Last Name
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.