[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Double escaping

  • From: Tim Bray <tbray@textuality.com>
  • To: xml-dev@lists.xml.org
  • Date: Sun, 6 Nov 2016 12:32:19 -0800

Double escaping
Lauren said “why are entity declarations for < and & double-escaped?” I said “huh?” She said “xml-dev is arguing about it”.  So, hi again.  

This is sort of interesting.  If you go all the way back to the first edition of the spec and look at section 4.6, after the examples there's a one-liner that says:

Note that the < and & characters in the declarations of "lt" and "amp" are doubly escaped to meet the requirement that entity replacement be well-formed.


This is gone, and the paragraph before the examples is re-written, in all subsequent revisions starting with the Second Edition.  It’s  a long time since I’ve been inside an XML parser, and I confess I don’t fully grok why the recommendation says:

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

Rather than just 

<!ENTITY lt "&#60;">

Now in fact, this is a “for interoperability” which was code for “to work with SGML parsers”, and I have never encountered an XML document which actually declares &lt; or &amp;  

It’s a long time ago, but I’m pretty sure I didn’t work on any revision of the spec after the First Edition; I certainly don’t remember the discussion that led up to this change.  By that time, there would have been several seasoned XML Processor implementors in the discussion, and this would presumably reflect their experience.  



[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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.