[ expat-Bugs-570263 ] Bug with attr defaults and external PE's

noreply@sourceforge.net noreply@sourceforge.net
Sun Jul 7 08:23:03 2002


Bugs item #570263, was opened at 2002-06-17 19:16
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=570263&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rolf Ade (pointsman)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Bug with attr defaults and external PE's

Initial Comment:
Take a look at this document:

<!DOCTYPE doc [
 <!ATTLIST doc a CDATA "D4A">
 <!ENTITY % x SYSTEM "x.ent">
 %x;
 <!ATTLIST doc b CDATA "D4B">
 ]>
<doc>Hello.</doc>


If you process this with expat 1.95.3 and without
processing the external entity %x; expat reports the
element doc with two attributes: a="D4A" b="D4B".

You could easily check this with the xmlwf tool, using
the -d option.

This is wrong. See the last paragraph of the XML rec
Second Editoin 5.1: "[...][T]hey must not process
entity declarations or attribute-list declarations
encountered after a reference to a parameter entity
that is not read, since the entity may have contained
overriding declarations."

As far as I see, this bug was already in 1.95.1, then
fixed in 1.95.2 and showed up again in 1.95.3

rolf


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

>Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-07 11:22

Message:
Logged In: YES 
user_id=290026

Patch # 578161 includes a fix for this bug.
Please test.

I have also attached a test document (files Rolf3.xml,
Rolf3_1.ent and Rolf3_2.ent) which test section 5.1 for
entity declarations. There is an entity reference %z; in
Rolf3_1.ent which needs to be skipped, since there is
no declaration for it, and this is not a WF error.
More details in the comment within Rolf3.xml.

Karl

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-06-17 23:13

Message:
Logged In: YES 
user_id=290026

Yes, this is a bug, and was probably introduced by me.
Now I finally beging to understand why the dtd.complete flag
was used in such strange ways... :-(

So, I guess this one is for me,

Karl

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

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