WFCs of prod. [41] and [60]

I am wondering why the prod. [41] WFC: "No External Entity References" 
applies not to default attribute values in attribute declarations while 
WFC: "No < in Attribute Default" does?  See prod. [60] WFC: "No < in 
Attribute Default", which is silently linked to prod. [41] WFC: "No < in 
Attribute Default" (shouldn't the reference perhaps be made legible?). In 
other words: Why is it required to check for '<' in external entities when 
references to such entities must not appear in actual attribute 
values?  Example:

<!DOCTYPE doc [
   <!ENTITY bar1 SYSTEM "bar.ent" >
   <!ELEMENT doc EMPTY >
   <!ATTLIST doc
             foo CDATA "&bar1;" >
]>
<doc foo="blabla" />

Here, the XML processor must check whether the "bar.ent" file contains a 
'<' even though a "&bar1;" attribute value would result in any case in a 
WFC violation.

Another line of argument would be the following:  Since the above document 
is wellformed (in case that bar.ent does not contain a '<') although the 
default attribute value refers to an external entity, and the reference to 
an external entity comes only into play, when no default attribute value 
would have been specified like in:

<!DOCTYPE doc [
   <!ENTITY bar1 SYSTEM "bar.ent" >
   <!ELEMENT doc EMPTY >
   <!ATTLIST doc
             foo CDATA "&bar1;" >
]>
<doc />

Why is it then necessary to check for '<' in default attribute values at 
all, as long as the default value is not actually used?  In other words: It 
would make no difference for the infoset, if prod. [60] WFC: "No < in 
Attribute Default" would be dropped.

Dieter Köhler

Institute of Philosophy and
Centre for Multimedia Studies
University of Karlsruhe
Germany

Received on Wednesday, 20 July 2005 16:02:30 UTC