[Expat-bugs] [ expat-Bugs-896188 ] Not well-formed internal parameter entities

SourceForge.net noreply at sourceforge.net
Fri Feb 13 00:01:40 EST 2004


Bugs item #896188, was opened at 2004-02-12 19:11
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=896188&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Kloth (jkloth)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Not well-formed internal parameter entities

Initial Comment:
In testing against the XML Conformance Test Suites, we've 
discovered that Expat doesn't verify that internal parameter 
entities are well-formed (as per XML 1.0 3rd 4.3.2). 
 
Attached is a patch that fixes this and 2 example documents that 
demonstrate both valid and invalid behavior. 
 

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

>Comment By: Karl Waclawek (kwaclaw)
Date: 2004-02-13 00:01

Message:
Logged In: YES 
user_id=290026

One more comment:

It seems that Well-formedness constraint: PE Between 
Declarations applies here rather than section 4.3.2.

I guess the solution might involve modifying the
processInternalEntity() function in such a way, that
the state before and after calling doProlog() is
checked for two things:
1) is this a PE reference between declarations?
2) if yes, how does it return - any incomplete declarations?

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-02-12 22:39

Message:
Logged In: YES 
user_id=290026

Well, the patch seems to fix the two test cases mentioned
below, but when I ran Expat through the whole test suite 
again, it turned out that it now fails on 32 test cases more
than before. 

One example: test case xmlconf/sun/valid/optional.xml
uses the dtdtest.dtd in the same directory. 
It is well-formed and valid, but Expat now reports a syntax 
error on line 19, column 26 of the dtd.

Seems this patch should be examined more closely.
But I wouldn't give up yet.

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

Comment By: Jeremy Kloth (jkloth)
Date: 2004-02-12 21:28

Message:
Logged In: YES 
user_id=38980

Attached is the "Fix Explained" (hopefully) document. 

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-02-12 21:02

Message:
Logged In: YES 
user_id=290026

OK, now I remember. If you look at bug #569461 there
was a discussion regarding these two test cases,
(a while back) and there I thought it would require some
time to understand the logic in Expat well enough for a fix.

This is cool - having a fix for that! Thanks!

I would like you to explain the logic behind the fix,
because I really don't want to "fix" Expat so short before
a new release unless I understand the fix and can reasonably
be sure it doesn't mess up anything else.

You might want to create a "Fix Explained" attachment
rather than a note, as this web interface really isn't
a good text editor.

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

Comment By: Jeremy Kloth (jkloth)
Date: 2004-02-12 20:52

Message:
Logged In: YES 
user_id=38980

Actually, the error should be on line 4 (the %e; expansion).  I'm using a 
CVS (updated today) build. 
 
I've attached another invalid example to further demonstrate the 
problem. 
 
The XML Test Suite tests for this case are 
xmltest/not-wf/not-sa/010.xml and 011.xml 

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-02-12 20:13

Message:
Logged In: YES 
user_id=290026

I tried the current Expat (CVS), and it reports a syntax
error on line 5, column 0 for bad.xml. Is that not what it 
should do? Are you saying that your copy of Expat
doesn't do that? Which version are you using?

Which test cases of the XML conformance suite
does Expat not pass - related to this issue?

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

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



More information about the Expat-bugs mailing list