[Home] [By Thread] [By Date] [Recent Entries]



> I thought namespaces were a pain to implement.
> 
> I have a question about "Validity constraint: Proper Declaration/PE 
> Nesting" [1] I understand that this is saying the following is violates 
> the VC:
> 
> Doc1.dtd
> ========
> <!ENTITY % e "<!-- a ">
> <!ENTITY % f "%e;comment -->">
> 
> 
> Doc2.dtd
> ========
> <!ENTITY % e "<!-- a ">

I agree.

> 
> But what about this:
> 
> Doc3.dtd
> ========
> <!ENTITY % e "<foo>">
> <!ENTITY % f "%e;</foo>">
> <!ENTITY g "%g;">
> 
> I think that it is legal but who knows anymore. As near as I can figure 
> it doesn't violate this VC because it is not a markup decl specifically. 
> Also, it is not a violation of "Validity constraint: Proper Group/PE 
> Nesting" [2]. I assume it is valid because of this text in 4.3.2 "An 
> internal general parsed entity is well-formed if its replacement text 
> matches the production labeled content. All internal parameter entities 
> are well-formed by definition."

Yes, I agree.
 
> Bonus questions: Which wins out: "Well-formedness constraint: In DTD" 
> [3] or "Not Recognized" [4]
> 
> [1] http://www.w3.org/TR/REC-xml/#vc-PEinMarkupDecl
> [2] http://www.w3.org/TR/REC-xml/#vc-PEinGroup
> [3] http://www.w3.org/TR/REC-xml/#indtd
> [4] http://www.w3.org/TR/REC-xml/#not-recognized


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.

 
Karl

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member