Lists Home |
Date Index |
> Jeff Rafter wrote:
>>>Bonus questions: Which wins out: "Well-formedness constraint: In DTD"
>>> or "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:
> <!DOCTYPE doc SYSTEM "doc5.dtd">
> <!ELEMENT doc (foo)>
> <!ELEMENT foo EMPTY>
> <!ENTITY % pe_foo "<foo>">
> <!ENITY gen_foo "%pe_foo;</foo>">
> Now, the replacement text for gen_foo after it is scanned becomes:
> 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"? : )
I don't see how. Outside the DTD, '%' is simply another character.
All this is, is and end tag without start tag.