[ expat-Bugs-544679 ] PEs in external subset error

noreply@sourceforge.net noreply@sourceforge.net
Tue Apr 16 07:31:54 2002


Bugs item #544679, was opened at 2002-04-16 10:29
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=544679&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Karl Waclawek (kwaclaw)
Assigned to: Nobody/Anonymous (nobody)
Summary: PEs in external subset error

Initial Comment:
I ran Expat 1.95.2 against James Clark's test cases 
version 1998-11-18. There are two files in the 
directory .../valid/not-sa, which are supposed
to be valid, but Expat returns an "illegal parameter 
entity reference" error. 

Here is how it looks for the first file:

File 004.xml:
<!DOCTYPE doc SYSTEM "004-1.ent">
<doc></doc>

File 004-1.ent:
<!ELEMENT doc EMPTY>
<!ENTITY % e1 SYSTEM "004-2.ent">
<!ENTITY % e2 "%e1;">  --> Expat reports error here
%e1;

File 0004-2.ent:
<!ATTLIST doc a1 CDATA "value">

And the second file:

File 003.xml:
<!DOCTYPE doc SYSTEM "003-1.ent">
<doc></doc>

File 003-1.ent:
<!ELEMENT doc EMPTY>
<!ENTITY % e SYSTEM "003-2.ent">
<!ATTLIST doc a1 CDATA %e; "v1">  --> Expat error here

File 003-2.ent: empty file


Expat's behaviour seems to *not* conform to this XML 
1.0 rule:

<XML 1.0 excerpt>
Well-formedness constraint: PEs in Internal Subset
In the internal DTD subset, parameter-entity 
references can occur only where markup declarations can
occur, not within markup declarations. (This does not 
apply to references that occur in external
parameter entities or to the external subset.)
</XML 1.0 excerpt>

That is, Expat reports an error for external parameter 
entities too. This might be because a child parser in 
Expat does not know that it is a child parser - and 
therefore that it is processing an external entity.

Karl



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=544679&group_id=10127