In working through the issues with another question, I've found t开发者_开发技巧ext files with embedded Ctrl-S characters (decimal 19) in them. When adding their text to an XML document, an exception is thrown (C#/.NET).
According to this page, as I read it, they are not in the rages for a "Char" and so are illegal: http://www.w3.org/TR/REC-xml/#charsets
However, a cohort found the an XML specification, and implies that it is equivalent to a carriage return (decimal 13, not hex 0x13), here: http://www.w3.org/1999/07/WD-xml-c14n-19990729#charescaping
But then, the paragraph in question is not in the more recent version (http://www.w3.org/TR/xml-c14n) which explicitly states:
- In character data, the carriage-return (#xD) character is represented by "
".
So, two quesitons:
- Am I missing something, or is there a typo on the W3C page -- an "x" in the token  where it should be or 
 ??
- When a specification has an error (not just something that changed but an actual error), does the W3C leave the document accessible? Seems like that's a "yes"
Sure looks like a typo to me. But a typo in the 1999 Canonical XML working draft doesn't seem like an occasion to get too terribly excited.
It's called a "working draft" for a reason. The difference between a working draft and the published recommendation can be considerable, as anyone who used XSL-WD learned to their dismay. The W3C doesn't fix typos in drafts they've published, they publish new versions. That's something that happens pretty slowly. Very slowly, in the case of Canonical XML, which addresses a problem that the world does not appear in desperate need of solving.
You have a single character which contains (decimal) 19, right? That XML spec is talking about character escapes. If that character were legal in XML, it could be escaped as  or as . But it wasn't. And even if it were escaped, the escaped version would not be legal either.
精彩评论