You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Halvorson, Loren" <Lo...@firepond.com> on 2000/04/18 19:54:24 UTC

16K boundary bug parsing DTD in version 3.0.1

I have found what I think is a bug in XERCES-J parser version 3.01.

One of our DTD's (encoded as UTF-8) is about 25K. An error occurs exactly at
the 16K boundary. If an entity declarations just happens to fall across the
16K boundary, the method "scanDecls" in
org.apache.xerces.framework.XMLDTDScanner fails to recognize it and throws
an error. If I pad the file so a comment or white space falls across the
boundary everything is good.  So it would seem that there is a bug in the
code that parses DTD's that has trouble with files larger than 16K.

For example, the situation I was tracing had the word ENTITY broken across
this boundary:

	...first 16K of data...<!ENTI

	TY...next 16K of data...

In order to get it to work, I had to add comments padding in the first 16K
so that the declaration no longer was broken.

--Loren Halvorson

Is SAX for parsing only?

Posted by Carl Downs <ca...@convio.com>.
Folks-

I've got Xerces generating a DOM tree from JDBC result sets
that I pass to Xalan for translation.  Is it possible to use Xerces
to generate a SAX event stream instead of a DOM tree, or
is SAX for parsing only?

Thanks,
Carl


Re: 16K boundary bug parsing DTD in version 3.0.1

Posted by Vassili Dzuba <va...@wanadoo.fr>.
I think it's bug 72 (the patch is there)