[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Annoying XSLT code
> > Both XSLT and XQuery allow you to generate code; neither of > them (without > > extensions) allow you to execute the code that you have generated. > > It depends on the definition of "code" and "execute". > > Using FXSL higher-order functions one can have a function return > another function that exist statically or is dynamically created. > > Of course, this is possible only in XSLT -- not in XQuery. Yes, but I think the discussion was about xx:evaluate() - constructing expressions from strings. Many XSLT and XQuery processors offer this as an extension. It's true that in many cases - but not all - higher order functions are an alternative solution to the problem. However, I've seen quite a few applications where it's useful to hold XPath expressions in an XML configuration file (or even allow users to enter them in a form) and then evaluate them dynamically. In the applications I've come across, support for XPath here is quite sufficient. Generating stylesheets tends to have a rather different kind of use case: typically there is some kind of specialized high level transformation language with a small number of powerful constructs, which then gets translated into XSLT for execution. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|