Reputation: 7123
If you look at the the W3C XQuery test K2-Serialization-7.xq:
<a>{ codepoints-to-string(1 to 31) }</a>
the expected result (according to the W3C test suite) escapes all the characters in the the ASCII range 1-31:
<a>	

</a>
It's not clear why the tab (0x9) and newline (0xA) characters are escaped at since they're perfectly legal in XML files. Hence, the expected result seems wrong. Can anybody explain this?
Upvotes: 0
Views: 1236
Reputation:
In fact your expected result is wrong.
From http://www.w3.org/TR/2008/REC-xml-20081126/#charsets
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
Only in XML 1.1 this was changed. From http://www.w3.org/TR/2006/REC-xml11-20060816/#dt-character
Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
Upvotes: 2