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

Re: XSLT: Variable href in <xsl:import>


xsl import dynamic
David,

>   Any idea if this will change in xslt 2.0? Couldn't really find it in the
>   rec (http://www.w3.org/TR/xslt20/) but it seems like a change which is
>   plausible enough.
>
> No, chance: it would completely break the xslt processing model, you
> can't evaluate any expressions unless you know all functions.
> variables templates etc that are defined, and you can't know that
> until _after_ the stylesheet has been assembled by following the
> xsl:import.

It's not quite that clear-cut. If you restrict the static and dynamic
context information that you can use within an XPath, you can
effectively limit the XPath to using only information that is
available at compile time. You can say, for example, that there aren't
any in-scope variables that can be referred to, that the only
functions that are available are the built-in ones, and that there's
no context item. There are still a few useful things that you can do
even with such restrictions, such as evaluating:

  system-property('xsl:is-schema-aware') = "yes"

to see if the XSLT processor is schema aware, and include different
stylesheets based on whether it is or isn't.

Of course, including different stylesheets based on a parameter value
would still be a no-no, but that's because parameter values aren't
available at compile time, not because you can never evaluate any
XPath at compile time.

(Take a look at xsl:use-when when the next draft of XSLT 2.0 comes
out...)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.