xsl-list
[Top] [All Lists]

Re: [xsl] Is it possible to store XSLT code fragments as data and then dynamically evaluate those code fragments?

2019-06-21 06:49:53
Hi,

I have done this sort of thing successfully in Saxon using the
transform() function. The pattern is not exactly the same - you take
your list of XPaths (runtime parameter or source), stitch them
together into an XSLT, and execute. It is a useful pattern for all
kinds of heuristics, not only dynamic path evaluation.

I also agree with Graydon, however, that if retrieval is your only
purpose, producing and executing XQuery might make more sense than
producing XSLT. (Trivial in this case.) Either way, XSLT is awesome at
code generation (which might be the same as dynamic function calls
seen through the other end of the spy glass?) -- and always has been.
This is also bread and butter in XSLT 1.0, writing an interim
serialization to the file system as necessary.

Cheers, Wendell
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>