[Top] [All Lists]

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

2019-06-20 06:53:31
On Thu, Jun 20, 2019 at 11:38:23AM -0000, Costello, Roger L.
costello(_at_)mitre(_dot_)org scripsit:
The big picture is this: I want to perform various mapping operations
on the Book data. I want the mapping operations expressed in a
declarative manner so that Subject Matter Experts (SMEs) can review
the mappings for correctness (e.g., upon reviewing the above code
fragment the SME says: "Yes, that is the correct way to convert costs
in USD to GBP"). Ideally, the mapping operations would be stored as
data and then dynamically evaluated (after the SMEs have certified
their correctness). What do you recommend? It appears that dynamic
evaluation of XSLT code fragments is not possible, so what is the next
best thing?

This sounds like you want to use XQuery.

Being maybe-overly-general, if you want to change the document, you want
XSLT, and if you want to find out what's in there, you want XQuery.  It
sounds like you're talking about having a list of approved searches;
that's much more an XQuery thing to do than an XSLT thing to do.

(You can do it with XSLT, just like you can change the document with
XQuery, but in terms of not fighting with the design intent, XSLT
changes things and XQuery finds things.)

-- Graydon
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>