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

Re: [saxon] Why are erroneous ENTITY declarations not caught in validati

  • From: "Christopher R. Maden" <crism@maden.org>
  • To: saxon-help@lists.sourceforge.net, xml-dev@l...
  • Date: Tue, 23 Oct 2012 05:50:07 -0400

Re: [saxon] Why are erroneous ENTITY declarations not caught in validati
[copying xml-dev in media res, since the conversation is there now, too]

On 10/23/2012 03:48 AM, Michael Kay wrote:
> I thought I remembered seeing something like that. But I don't see
>  anything in the sections you cite that appears to override:
> 
> <quote> Well-formedness constraint: Entity Declared
> 
> In a ... document with only an internal DTD subset which contains
> no parameter entity references ..., for an entity reference that
> does not occur within the external subset or a parameter entity,
> the Name given in the entity reference must match that in an
> entity declaration that does not occur within the external subset
> or a parameter entity, except that well-formed documents need not
> declare any of the following entities: amp, lt, gt, apos, quot. 
> </quote>
> 
> #intern-replacement does say that the entity reference is not 
> immediately replaced by the content of the corresponding entity 
> declaration, but it doesn't appear to say anything that overrides 
> #wf-entdeclared, which I read as saying that the corresponding
> entity declaration must exist.

As David Carlisle said, some of this is implicit inclusion of SGML
rules, which seemed obvious to everyone at the time...

Attempting to re-read the well-formedness constraint more carefully, I
think you’re right.  I can’t see any way that an undeclared reference
in the internal subset is allowed.

I suspect simple lazy implementation; since the references are not
expanded until they are used, checking is overhead...  Still, it does
seem like the kind of error that XML’s draconian rules were intended
to help prevent.  Interesting that this widespread bug has slipped by
for so long.  Good catch, Roger.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
LIVE FREE: vote for Gary Johnson, Libertarian for President.
     <URL: http://garyjohnson2012.com/ >  <URL: http://lp.org/ >
GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9  A210 4A51 DBAC 5C5C 3D5E


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