OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XSLT: Variable href in <xsl:import>

[ Lists Home | Date Index | Thread Index ]

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/





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS