[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

fn:codepoints-to-string

Martin Probst martin at x-hive.com
Tue Oct 25 14:53:30 PDT 2005


codepoints to string
Hi,
I'm not completely sure if this is the right place to ask, but I think
there are quite a lot of people in the standards group that read this
list.
fn:codepoints-to-string specifies (in here:
http://www.w3.org/TR/xpath-functions/#func-codepoints-to-string ):

> Summary: Creates an xs:string from a sequence of [The Unicode
> Standard] code points. Returns the zero-length string if $arg is the
> empty sequence. If any of the code points in $arg is not a legal XML
> character, an error is raised [err:FOCH0001].

The interesting part is the "not a legal XML character". What is a legal
XML character? The standard probably does not refer to characters in
QNames, but what then?

There is a test in XQTS that tests fn:codepoints-to-string(60), which
will give '<', and expects this to fail. But why? '<' is a completely
legal, sound character in element and attribute contents, except that
you have to escape it when serialising the document. The XPath/XQuery
datamodel does not work on serialised documents, and any XQuery/XPath
engine will escape the character for you when serialising your document.

Does anyone know what this sentence in the spec originally intended to
prohibit? If it actually wants to prohibit '<', '&' and friends, it
should be rewritten to actually say that, or even better just drop the
whole sentence, as it does not make any sense, at least to me.

Martin



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.