W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2006

[Bug 2441] xqx: character references

From: <bugzilla@wiggum.w3.org>
Date: Thu, 28 Sep 2006 21:47:03 +0000
To: public-qt-comments@w3.org
Message-Id: <E1GT3ih-0001Gy-1b@wiggum.w3.org>


------- Comment #15 from davidc@nag.co.uk  2006-09-28 21:47 -------
> Well, it seems that the resolution of entity references and character
> references is not clearly defined...

I honestly am struggling to see any ambiguity in the current specification
and so I'm not sure I can really answer your questions in a helpful way but
I'll try.

> "Each predefined entity reference is replaced by the character it represents
> when the string literal is processed."

There are five predefined entities, including amp and that means that &amp;
gets replaced by an ampersand character. The whole point of writing &amp;
rather than & is to _stop_ it being used as markup so it is absolutely clear
that in XQuery as in XML 
&amp;#1234;is the 7 characters 7 # 1 2 3 4 ; not a reference to the character
with codepoint 1234. It would be absolutely bizare if Xquery were defined
otherwise, as it would be using XML syntax with completely different semantics.

> Are string-length("abc&#x1D156;def") and string-length("abc&amp;#x1D156;def")?
> at least one XQuery processor I tried resolves these two strings to the same
> string value,
bugs happen, report it as a bug to that system's maintainers, That is
unquestionably a bug.

> So which characters should be replaced by entity refs when producing XQueryX? 
> Seems that the stylesheet assumes ",',<,> should be replaced but not &?
as always when writing xml (or xml-like) syntax you just need to quote those
characters that have special significance in XML, which includes &, and this is
what the stylesheet does, see the template name="quote" which

Received on Thursday, 28 September 2006 21:47:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:15 UTC