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

Re: More questions about conformance and entities


Re:  More questions about conformance and entities
Jeff Rafter wrote:
>>Bonus questions: Which wins out: "Well-formedness constraint: In DTD" 
>>[3] or "Not Recognized" [4]
>>[3] http://www.w3.org/TR/REC-xml/#indtd
>>[4] http://www.w3.org/TR/REC-xml/#not-recognized

Karl Waclawek answered:
> I have always found "Well-formedness constraint: In DTD" redundant,
> as due to "Not Recognized", you cannot define PE references outside of the DTD.
> So, "Not Recognized" wins, and the above entity declaration is legal.

Just to make sure everyone else is as sick of this minutia as I am I 
thought I would take this a step further. Consider:

Doc5.xml
========
<!DOCTYPE doc SYSTEM "doc5.dtd">
<doc>&gen_foo;</doc>

Doc5.dtd
========
<!ELEMENT doc (foo)>
<!ELEMENT foo EMPTY>
<!ENTITY % pe_foo "<foo>">
<!ENITY gen_foo "&#37;pe_foo;</foo>">

Now, the replacement text for gen_foo after it is scanned becomes:

%pe_foo;</foo>

It is obvious that the reference to gen_foo would violate WFness. The 
question is: is this a PE inside the DTD and inside content-- thus 
violating "Well-formedness constraint: In DTD" while simultaneously 
being "recognized"? : )

All the best,
Jeff Rafter

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.