Project

Profile

Help

XQuery String constructor and entity references: bug in SaxonJ?

Added by Martin Honnen over 2 years ago

For the XQuery

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";

declare option output:method 'text';

``[<]``

I would expect the output

<

https://www.w3.org/TR/xquery-31/#id-string-constructors says:

Character entities are not expanded in string constructor content. Thus, [&lt;] evaluates to the string "<", not the string "<".

yet Saxon 11 J gives

<

Replies (3)

Please register to reply

RE: XQuery String constructor and entity references: bug in SaxonJ? - Added by Martin Honnen over 2 years ago

The quote from the spec got mangled, it is difficult to get that right with markdown, due to the meaning of backticks in markdown and XQuery

RE: XQuery String constructor and entity references: bug in SaxonJ? - Added by Martin Honnen over 2 years ago

Character entities are not expanded in string constructor content. Thus, ``[<]`` evaluates to the string "&lt;", not the string "<".

XQuery String constructor and entity references: bug in SaxonJ? - Added by Norm Tovey-Walsh over 2 years ago

Saxon - Help: XQuery String constructor and entity references: bug in
SaxonJ?

Looks like. I created https://saxonica.plan.io/issues/5647 to track it.

Be seeing you,
norm

--
Norman Tovey-Walsh
https://nwalsh.com/

The formula 'Two and two make five' is not without its
attractions.--Dostoevsky

    (1-3/3)

    Please register to reply