[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Why are erroneous ENTITY declarations not caught inXML val
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 "&#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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|