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

RE: Parameter in "xsl:include"

Subject: RE: Parameter in "xsl:include"
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 29 Mar 2001 15:17:02 +0100
RE:  Parameter in "xsl:include"
> Similar to Martin's question a month back, I want to use an
> external parameter/variable in an <xsl:include>. The
> difference is that each time the stylesheet is used, the
> parameter _may_ be different.

Lots of people want to do this, and you can't. xsl:include is a compile time
thing: you can't build a stylesheet that varies depending on its data, any
more than you can build a Java program that depends on its data.

There are a number of possible alternatives.

- select the stylesheet you want to use from a range of possible
stylesheets, and have this import shared stylesheet modules, rather than
starting with a general purpose stylesheet and having this select a
special-purpose one.

- use modes to control which sets of template rules are active

- do a multi-phase transformation, controlled from the processor's API, in
which the first phase makes decisions about which stylesheets to use for
subsequent phases.

Mike Kay
Software AG
>


 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.