[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Carlisle <davidc@n...>
  • To: "Costello, Roger L." <costello@m...>
  • 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: &#x0;</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
&#x0; 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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member