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

Re: Conditional Include statements

Subject: Re: Conditional Include statements
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Mar 2009 15:14:18 +0800
Re:  Conditional Include statements
At 2009-03-31 12:14 +0530, Mukul Gandhi wrote:
On Tue, Mar 31, 2009 at 11:23 AM, Tony Rowe <tony.rowe@xxxxxxxxxxxxxx> wrote:
> <xsl:include href="HLP xxx.xslt"/>
> ...
>
> But is it possible that I can put this include statement within a Template match, based upon some variable value?


xsl:include can only be specified as a direct child of xsl:stylesheet
element (please, see http://www.w3.org/TR/xslt#include. "The
xsl:include element is only allowed as a top-level element.")

Further to Mukul's correct answer, even if it were allowed below the top level all included and imported stylesheets are assimilated into the operation tree before the processor even looks at the source tree. This is because the processor doesn't know everything about the stylesheet's intentions for the source tree until all of the stylesheet fragments are accessed.


Thus, there would be no way to inspect a variable or do anything at all with the operation tree at the time of performing the includes or imports.

I hope this helps.

. . . . . . . . . . . . . Ken


-- XSLT/XSL-FO/XQuery training in Los Angeles (New dates!) 2009-06-08 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.