[ expat-Bugs-544679 ] PEs in external subset error
noreply@sourceforge.net
noreply@sourceforge.net
Sat May 18 11:34:02 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
----------------------------------------------------------------------
>Comment By: Karl Waclawek (kwaclaw)
Date: 2002-05-18 14:33
Message:
Logged In: YES
user_id=290026
Expat 1.95.2 had various problems with external PE
references, among them that it simply would not pass
them to the ExternalEntityRefHandler, when encountering
them within entity values, and that it would not pass
the entity declaration to the EntityDeclHandler.
This has been fixed with patch # 551599 which has been
checked in. Let's wait until more testing has been done,
before we close this one.
Karl
----------------------------------------------------------------------
Comment By: Karl Waclawek (kwaclaw)
Date: 2002-04-27 09:25
Message:
Logged In: YES
user_id=290026
Related to bug # 548690. Check comments there.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=544679&group_id=10127