OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Why are erroneous ENTITY declarations not caught inXML validation?

On 23/10/2012 10:32, Costello, Roger L. wrote:
> Hi Folks,
> I have an ENTITY declaration prior to the root element:
> -------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE root [
> <!ENTITY address "(&mailbox;|&group;)">
> <!ELEMENT root (#PCDATA)>
> ]>

This is very similar to the fact that

<!ENTITY foo " <hhh> " >

is a well formed declaration but makes any document that references foo 
be non well formed. (later editions of the xml spec hint that it might 
be a bad idea to do this)

Earlier editions of the xml source of the XML spec eg


included the interesting construct

<!ENTITY lt     "<">

_and_ include references & l t ; to an entity of that name.

The combination is only well formed by arguing that lt is pre-declared as

<!ENTITY lt     "&#38;#60;">

so the declaration that appears in the file is skipped.

later editions removed this.


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS