[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Couldn't illegal XML characters be used simply by escaping them?
- From: David Carlisle <davidc@nag.co.uk>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Sat, 10 Nov 2012 16:56:07 +0000
On 10/11/2012 13:08, Costello, Roger L. wrote:
> <Test> Here is a null character: �</Test>
>
> What will an XML Parser do with that character entity reference? It
> will resolve it (let (null) represent the null character):
>
> <Test> Here is a null character: (null)</Test>
> But now the output of the XML Parser is an XML document that contains
> an illegal character. Thus an error is thrown.
>
No, actually in XML 1.1 you can do that for everything except 0 so you
can escape character 1 that way, but an XML 1.1 parser will not resolve
� to a null, it is a fatal syntax error.
http://www.w3.org/TR/xml11/#NT-Char
In XML 1.0 any Numeric reference to a non XML character is a syntax error.
It is not that the reference is resolved and then at a later stage you
get an error from an illegal character, the syntax of numeric character
references explicitly makes such references a syntax error.
http://www.w3.org/TR/xml/#wf-Legalchar
David
--
google plus: https:/profiles.google.com/d.p.carlisle
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]