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

  • From: Martin Gudgin <marting@d...>
  • To: XML-Dev Mailing list <xml-dev@x...>
  • Date: Thu, 12 Oct 2000 22:14:34 +0100

> "Elliotte Rusty Harold" wrote
>
> Section 4-1 of the XML 1.0 second edition spec states:
>
>
> Well-Formedness Constraint: In DTD
> Parameter-entity references may only appear in the DTD.
>
>
> The Annotated XML spec notes that:
>
> This constraint is not actually wrong, but it is rather misleading.
> Suppose I have a parameter entity named Fred, then if the string %Fred;
> appears somewhere in the document, outside of the DTD, that's not an
> error as this suggests; it's just the string %Fred;.
>
> So my question is why is this constraint here at all? What is its
> effect? If we removed it form the spec (say in the third edition) would
> this in any way change which document are considered to be well-formed
> or valid? Would removing it give parsers any leeway they don't have now?
> Right now this seems like an unnecessary statement to me.
>

My understanding is that the spec is correct; parameter entity references
cannot appear outside of a DTD, the reason being that outside of a DTD
%Fred; is *not* a reference to a parameter entity, it's just the string
%Fred;. Put another way the % character is only treated specially in the
DTD, it is treated just like any other character when encountered in the XML
part of the document.

Martin Gudgin
DevelopMentor


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