[ expat-Patches-578161 ] Re: WFC: Entity Declared & Section 5.1

noreply@sourceforge.net noreply@sourceforge.net
Tue Jul 9 13:26:02 2002


Patches item #578161, was opened at 2002-07-06 13:55
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=310127&aid=578161&group_id=10127

Category: None
Group: None
Status: Open
>Resolution: Accepted
Priority: 7
Submitted By: Karl Waclawek (kwaclaw)
>Assigned to: Karl Waclawek (kwaclaw)
Summary: Re: WFC: Entity Declared & Section 5.1

Initial Comment:
This patch addresses three issues:
1) Bug #569461:
(conformance with OASIS test-suite) - partial fix
2) Bug #570263 (attr default & external PEs)
3) tab->blank conversion for xmlparse.c.

See the attached files PatchDesc.txt
for a description, and PatchImpl.txt
for an overview of the implementation.

The patch consists of the attached files 
expat.h (based on CVS rev. 1.26) and
xmlparse.c (based on CVS rev. 1.47).
For diff purposes I have attached an "untabified"
version of xmlparse.c rev. 1.47, since a diff against
the CVS version would be meaningless.

Karl

P.S: I have not attached this to one of the bugs,
since it is too large a patch.


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

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-07-09 16:25

Message:
Logged In: YES 
user_id=3066

Per email with Karl, I've checked in a de-tabified version
of xmlparse.c, and he's going to follow with the checkin of
this patch, which I'm assigning back to him as accepted.

Karl, can you add a brief entry to Changes summarizing the
changes relating to PE and skipped entity handling?

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-08 22:50

Message:
Logged In: YES 
user_id=290026

OK, 
hopefully this time the script is really clean of any
DOS linebreaks. Attached as test2.sh.

Karl

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-08 19:14

Message:
Logged In: YES 
user_id=290026

Fred, are you going to move 
XML_ERROR_ENTITY_DECLARED_IN_PE yourself,
or do you want me to do it?

Also, I attached an improved shellscript, provided
by Rolf Ade, since the one I wrote wouldn't run
on Unix witout some extra effort (Obviously, I never wrote
a shell script before :-) )

Karl



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

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-07-08 18:20

Message:
Logged In: YES 
user_id=3066

API note:  XML_ERROR_ENTITY_DECLARED_IN_PE should be added
to the end of the XML_Error enum, otherwise code that uses
Expat needs to be re-compiled as well as re-linked for a new
version of the library.

Still reviewing all the changes; this is a pretty serious
patch!  Assigned to myself to finish reviewing.

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-08 13:29

Message:
Logged In: YES 
user_id=290026

I ran a new shell script testing this patch against the
current version of the xml test suite available at:
http://www.w3.org/XML/Test/xmlts20020606.zip .

This new script adds the following functionality:
It tries to match the output files from the test suite
against those produced by xmlwf
(applying to valid test files only, of course).

It seems that basically the only differences found are,
that the canonical output in the test-suite includes
notation declarations, whereas xmlwf does not produce
them. Other than that, there is only one discrepancy
regarding ibm/valid/P02/ibm02v01.xml.

However, on the test-suite mailing list, it was reported
that the corresponding output file may be incorrect.
Check the archive at:
http://lists.w3.org/Archives/Public/public-xml-
testsuite/2002Jun/thread.html

Therefore it seems that the only mismatches the test
script found are due to the definition of "canonical"
output in xmlwf, which does not conform to the
w3 recommendation.

The script is attached as file test1.sh.
I was running it under Cygwin.
If you want to use it, you need to adjust the
definitions of $XMLWF and $OUTPUT for your
environment.

Karl

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

Comment By: Karl Waclawek (kwaclaw)
Date: 2002-07-07 20:31

Message:
Logged In: YES 
user_id=290026

I forgot to mention that the behaviour of the 
skippedEntityHandler callback was modified,
to be in line with the SAX2 specs, but also for
logical reasons:

It makes not much sense to report skipped parameter
entities in declarations and skipped general entities in
attribute values, because such events would be
"out of sync" with the sequence of other callbacks.

Btw, this is an issue that did also come up when
discussing the internalEntityRefHandler feature request, i.e.
when considering the option of *not* expanding such entities.

In this case we were thinking about a special (optional)
marker character (similar to the NS separator). That approach
would also be applicable to the case of skipped entities.

Karl

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

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