why (Q re well-formedness constraints)

Why is the following condition added to paragraph 3.1 of the XML
spec?

===

Well-Formedness Constraint: No External Entity References 
  Attribute values cannot contain direct or indirect entity references
  to external entities.

===

This is extremely interesting.  How is a processor going to know if an
entity refers to something external unless it reads the (external)
DTD?  If it has to read the DTD, how can this be a well-formedness
constraint?  I mean, isn't it a validity constraint?

If it's a validity constraint, then it makes no sense to me (entities
can resolve perfectly well both inside and outside of attribute vals).

(I'm sorry if this is a dumb question.)

Richard Goerwitz

Received on Friday, 1 May 1998 15:00:22 UTC