This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XPath 2.0: Collection-Valued Expressions (Was: Re: XQuery 1.0 and XPath 2.0 Functions and Operators Version 1.0)


Hi Mike,

>> Oh, OK, I didn't realise. Guess it's our fault for letting the
>> multiple requests for dynamic evaluation and its inclusion in
>> several XSLT processors speak for themselves rather than making a
>> formal noise about the requirement. Can I request now that it's on
>> the requirements list for XPath 3.0 (assuming we get that far)?
>
> You can request that it's added to the requirements for 2.0 if you
> want (by commenting on the published 2.0 requirements). Whether your
> request will succeed, I cannot say...

OK, worth a shot. Mike, please could you forward this to
mailto:xsl-editors@w3.org as messages that I send to W3C mailing lists
do not get through.

As XSLT use becomes more sophisticated, there are a growing number of
situations where users wish to use XPaths within the source XML for a
transformation, or passed in as parameters, and have these XPaths
evaluated by the XSLT processor. Typical use cases are:

  * XML specifications of table columns holding an XPath pointing
    to the values to be held in each column
  * support for user-defined sorts
  * search queries where the searcher specifies the search field as an
    XPath
  * simplified XPointers in XInclude or XLink elements

One well articulated example is described at:
  http://aspn.activestate.com/ASPN/Mail/Message/679116

This functionality is supported by extension functions such as
saxon:evaluate() and xalan:evaluate(). However, as with other common
extension functions, these are processor-specific. Also, the
complexity involved (in particular access to the context in which the
XPath is evaluated, and therefore things like the context node,
function library, variable assignments and namespace mappings) means
that user-defined functions to achieve this functionality would be
substantially inferior to those that were built-in to the processor.

The functionality could possibly be achieved through:

  * an expression data type in a manner similar to saxon:expression(),
    which would also lend itself to satisfying XPath requirement 2.5
    "Should Support Aggregation Functions Over Collection-Valued
    Expressions"
  * an evaluate() function similar to saxon:evaluate() and
    xalan:evaluate()
  * using attribute value templates within XSLT attributes (perhaps
    described in terms of simplifying the process of generating XSLT
    from XSLT and using the result as the stylesheet for a
    transformation)

I therefore respectfully request that the WG will reconsider its
decision not to include dynamic evaluation in the requirements for
XPath/XSLT 2.0.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]