[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Dynamically determine which XSLT files to include and import?

Subject: Re: [xsl] Dynamically determine which XSLT files to include and import?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Jul 2013 11:36:51 -0400

At 2013-07-29 15:34 +0000, Costello, Roger L. wrote:
Is there a way for an XSLT program to, at runtime, decide which XSLT files to include and import?

Only based on environment issues at runtime by using use-when=, not by any data information.

I imagine something like this at the top of the XSLT program:

    if the input file has value X set then
        include A.xsl, B.xsl
        include C.xsl, D.xsl

Any way to do this?

No, the source tree is not even built until the entire stylesheet has been interpreted because there are stylesheet instructions that impact on the building of the tree.

So by the time you have any input data in your tree, all stylesheet building has been completed.

I hope this helps understand the situation.

. . . . . . . . . . Ken

Public XSLT, XSL-FO, and UBL classes in the Netherlands     Oct 2013 |
Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 |
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