If you've got XPath expressions stored in an XML document, then the
only way to evaluate them with standard XSLT is to generate a
stylesheet and then execute it.
It is not the only way.
Someone (like me) may be able to parse an XPath expression
Well, yes, I was making the assumption that the user didn't want to write an
XPath processor.
Certainly, in most cases such "dinamism" is not needed and
may be avoided.
Actually, I see a very large number of XML-based applications that make use
in one way or another of dynamic XPath expressions - either expressions that
are constructed programmatically, or expressions that are read from
configuration files of one kind or another. I think it's a very useful
technique and I think it's a great shame that we weren't able to get it into
XSLT 2.0. Not that it's easy to specify - it's quite hard to find good
answers to all the context issues like namespaces, variables, and
user-defined functions.
(Sometimes the technique is also used to emulate higher-order functions,
which is not something I particularly encourage.)
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--