Re: Ælfred2 SAX conformance

Chris Burdess <[email protected]>
Newsgroups gmane.comp.java.classpath.extensions.xml
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Burdess wrote:
> The patch normalises ignorableWhitespace and characters recognition, 
> so it doesn't penalise other parsers for not having the exact same 
> behaviour as Xerces (which is not demonstrably correct in this 
> matter). There are a couple of performance improvements as well.

It also raises a bit of a bugbear for Xerces, as it checks for 
fatalError correctly. When Xerces encounters a fatalError, it doesn't 
call endDocument afterwards. The SAX specification mandates that 
endDocument is always called. So this patch reduces Xerces conformance 
to 37.28%.

 From the SAX specification for endDocument:

"The SAX parser will invoke this method only once, and it will  be the 
last method invoked during the parse. The parser shall  not invoke this 
method until it has either abandoned parsing  (because of an 
unrecoverable error) or reached the end of  input."

In the conformance tests for Xerces, the last method invoked is often 
fatalError NOT endDocument, which I interpret as a fail.
- -- 
Chris Burdess
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBEfIF6dl1DEqHgrgRArFVAKCCDxJ5gcxiSE8UL3feaFefe4QMHQCgo45c
xds6JApDRyXMQhuSk3IPPwA=
=TPuO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.