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

RE: Error in XHTML Modularisation Recommendation? (was: RE: [x


entity lt
From: Rick Jelliffe [mailto:ricko@a...]
> From: "MAISONNY Benoit" <Benoit.MAISONNY@e...>
> 
> > So: that post explains the situation for the entity "lt", 
> which seems to be
> > bogus indeed in the XHTML Modularisation Specification (I 
> would like to know
> > the HTML gurus' opinion on this one). My (very similar) 
> problem was in fact
> > with the "amp" entity, but of course the lt one popped up 
> right after.
> 
> > Solution: I simply redeclared lt and amp in my "driver" 
> file like this:
> > <!ENTITY lt "&#38;#60;">
> > <!ENTITY amp "&#38;#38;">
> > That was enough for MSXML to accept my modularised DTD.
> 
> Those definitions are the ones recommended  in the XML spec.  

Rick is right. Here is the link that he quotes below:
http://www.w3.org/TR/2000/REC-xml-20001006#sec-predefined-ent

So it is clear what XML 1.0 says. I understand that:
<!ENTITY lt "&#60;"> is correct (single escaping)
<!ENTITY lt "&#38;#60;"> is correct (double escaping)

XHTML 1.0 defines these "special entities" correctly, as per XML 1.0.
But XHTML Modularisation modifies them:
http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_XHTM
L_Special_Characters

In fact, <!ENTITY lt "&#38;&#60;"> is correct as well, but is not what is
intended by &lt;
It is replaced by &< in a document.
Am I wrong to say that this shouldn't generate a validation error? After
all, it is the same as "&amp;&lt;" in a XHTML 1.0 document, for instance.

I quote the comment from xhtml-special.ent:
"Revisions:
2000-10-28: added &apos; and altered XML Predefined Entities for
compatibility"

Many parsers don't like this revision, as I reported earlier.


Benoit


> 
> "If the entities gt, apos, or quot are declared, they must be 
> declared as internal entities whose replacement text is the 
> single character being escaped (or a character reference to 
> that character; the double escaping here is unnecessary but 
> harmless)."
> 
> > I did further tests with the "bogus" DTD and the other 
> parsers. I think it
> > can be interesting to report that here. I simply added 
> "&lt;" somewhere in
> > my sample XML instance and tried to validate it.
> 
> The XML spec in s .4.6 says
> "All XML processors must recognize these entities whether 
> they are declared or not. "
> about lt, gt, amp, apos, and quot.  
> 
> So I believe it is an error for a parser to complain that 
> there is no definition.
> 
> Cheers
> Rick Jelliffe
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
> 

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.