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

RE: Question about Including external stylesheets

Subject: RE: Question about Including external stylesheets
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 10:05:34 +0100
include external stylesheet
> In my client application, I am using a certain stylesheet to
> transform the
> output from our app. server. Depending on the content of the
> XML I want to
> include(import actually) one of several stylesheets dynamically. I've
> noticed that it is not possible to use a variable in the call to an
> xsl:include statement (I don't think) and certainly not with
> an import since
> it has to be the first thing in the stylesheet. Does anyone
> have any ideas
> about how I can link a stylesheet with another stylesheet dynamically?

As you say, include and import are static facilities, like #include in C,
they can't be used to modify your stylesheet on the fly.

I think the best approach to this problem is a two-stage transformation. The
first stage does any generic processing and selects the stylesheet to be
used for the second stage (e.g. by writing an <?xml-stylesheet?> processing
instruction to the result document). The second stage then uses a different
stylesheet depending what decisions were made during the first stage.

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.