PPE2 (ne E71) (followup)

Maybe you were under the impression this was solved by


http://lists.w3.org/Archives/Member/w3c-xml-core-wg/2000JanMar/0107.html

It's not.  An external parameter entity that consists of nothing but
whitespace matches extPE and also can occur inside a declaration.  For
example,

<!ENTITY % e SYSTEM "e.ent">
<!ATTLIST e att CDATA #IMPLIED %e;>

If e.ent contains only whitespace, there's nothing that makes this
ill-formed.

Also consider the case of something like

<!ENTITY % e1 SYSTEM "e1.ent">
<!ENTITY % e2 "%e1;">

What is a parser supposed to do with this (assuming there are no other
references to e1)?  As the spec is written, it's supposed to determine
that e1 matches extPE.  How can it do this?  It would have to parse it
as an extPE at some point. But at what point? It makes a difference,
because the well-formedness of an external parameter entity depends on
what parameter entities are defined and this changes through the parse. 
Is it supposed to parse it as an extPE at that point (in addition to
using its replacement text as the replacement text of e2)? Or is it
supposed to wait until it has parsed the complete DTD, and then parse e2
as an extPE only if it hasn't yet been referenced at the markup
declaration level.  If it references it, is it supposed to ignore the
declarations in it or what?  It just doesn't make any sense to require
that a parser check that an entity that is not referenced at the markup
declaration level matches the extPE production.  There are two
reasonable choices:

1.  Disallow references to external parameter entities other than at the
markup declaration level.

2.  Restrict the requirement that external parameter entities match
extPE (ie be well-formed) to external parameter entities for which there
is a reference at the markup declaration level.

James

Received on Saturday, 9 September 2000 01:39:33 UTC