Project

Profile

Help

Is exsl:node-set() an identity map?

Added by Michael Staal-Olsen over 4 years ago

Is it correctly understood that the Saxon implementation of exsl:node-set() is an identity map? That is at least the impression I get from the following piece of documenation: https://www.saxonica.com/html/documentation/functions/exslt-common/node-set.html.

If not, what is the behaviour of the function, and would the closest to an equivalent in XSLT 2.0 and 3.0 be to remove the explicit usage of the function?


Replies (5)

Please register to reply

RE: Is exsl:node-set() an identity map? - Added by Michael Staal-Olsen over 4 years ago

And is it not incorrect that the map is not available in Saxon HE?

RE: Is exsl:node-set() an identity map? - Added by Michael Kay over 4 years ago

Correct, in current Saxon versions the exslt:node-set() function simply returns its first argument. It's provided only so that XSLT 1.0 stylesheets, which often have to call this function, continue to work. If you know that your code will only run under XSLT 2.0 or 3.0 you can remove the call on the function,.

I'm not sure about the triple negative in your last question, There have been some Saxon versions in which the function wasn't available in HE, but in recent versions it was reinstated.

RE: Is exsl:node-set() an identity map? - Added by Michael Staal-Olsen over 4 years ago

My question could bedste better formulated. My point was, that the URL I refer to points to a page claiming that only PE and EE supports the map.

RE: Is exsl:node-set() an identity map? - Added by Debbie Lockett over 4 years ago

Sorry, the documentation is incorrect - I will get it fixed. Unlike other EXSLT extension functions, exslt:node-set() is available in Saxon-HE (since 9.6), but the documentation currently states that it requires PE or EE.

RE: Is exsl:node-set() an identity map? - Added by Debbie Lockett over 4 years ago

9.8 and 9.9 documentation now updated online (to clarify that the EXSLT common module functions node-set() and object-type() are both available in Saxon-HE).

    (1-5/5)

    Please register to reply