[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 Tue, 2012-10-23 at 11:51 +0100, David Carlisle wrote: > On 23/10/2012 11:29, David Carlisle wrote: > <!ENTITY foo "<![CDATA[ &hhh ]]>" > David, are those little horns growing on your forehead? :-) Another awfulness about cdata sections I hadn't thought of before! Hmm, and thinking about it, <!ENTITY start-comment "<!--"> is also allowed, although again you can't use it. Roger, the answer to your original question comes from SGML - in SGML, entities were basically over-complicated string macros, and you could indeed have a start-tag in one entity and a close-tag in another, or define a "tilde" entity that just contained a combining tilde character, and then write n˜ We restricted entities in XML, but our goal at the time was to put SGML on the Web, not to make a new language, and some of the SGML cruft is still there because we didn't think about removing it. The right answer, in retrospect, would probably have been that the replacement text in a general entity should have the same well-formedness rules as replacement text of an external entity. There are even weirder rules about parameter entities in XML, because we wanted to avoid some crazy corner cases that people sometimes did in SGML, and that made it harder to process SGML documents. We can't change it now, as we don't want to break existing documents. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml Co-author, 5th edition of "Beginning XML", Wrox, Summer 2012
[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
|