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

  • From: David Carlisle <davidc@n...>
  • To: "Costello, Roger L." <costello@m...>
  • Date: Tue, 23 Oct 2012 11:29:33 +0100

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

http://www.w3.org/TR/1998/REC-xml-19980210.xml

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.

David



________________________________________________________________________
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]


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