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

RE: Conditinally including an XSL module

Subject: RE: Conditinally including an XSL module
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 17 Jul 2000 18:47:42 +0100
xsl modules
> However, I have a main XSL that includes several modules.  I 
> would like to be able  to conditionally include one of the modules.
> The condition would be based on a value extracted from the XML file. 

It's surprising how often this comes up: I've never seen a similar request
that in C a #include directive should be executed depending on a data value
computed at run-time. The model is the same: xsl:include and xsl:import are
static compile-time directives. It couldn't be otherwise, since you can't do
anything at run-time until you know the full set of template rules and
variables available.

So what's the underlying requirement that people would like a "run-time
include" to satisfy? Presumably it's to have a different set of template
rules depending on what you find in the source document, and perhaps to have
different sets of template rules in force at different times. That looks
rather like an extension of the "mode" concept, with the ability to select
the processing mode dynamically, and to make it "sticky". Perhaps even to
set the default mode, so that <xsl:apply-templates/> will only look for
rules with "mode='xyz'". Am I right?

Mike Kay  


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.