[ expat-Bugs-441449 ] problems with parsing external entities

noreply@sourceforge.net noreply@sourceforge.net
Mon, 16 Jul 2001 00:25:06 -0700


Bugs item #441449, was opened at 2001-07-15 08:02
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=441449&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rafael R. Sevilla (didosevilla)
Assigned to: Nobody/Anonymous (nobody)
Summary: problems with parsing external entities

Initial Comment:
I've tried to use Expat's external entity parsing
module in my project (http://xml-lit.sourceforge.net/)
and have gotten some very strange results.  I used
Expat's XML_ExternalEntityParserCreate within an
external entity reference handler and used the parser
once again.  Had mixed results with this.  For one
particular document referred to by an external entity
Expat would give an error: "no element found" at the
end of the document (line number).  Doesn't happen with
all the other documents I have.  The document was
perfectly legal XML and otherwise Expat can parse it
directly...just not through the external entity.  The
document was also quite large, so I tried to work
around it by splitting the document into several more
documents...the problem went away.  Will cruft together
a simpler example document and short program to
illustrate this problem.


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

>Comment By: Rafael R. Sevilla (didosevilla)
Date: 2001-07-16 00:25

Message:
Logged In: YES 
user_id=26058

Further notes on this apparent bug: It seems that it depends
both on the file size and the size of the buffer I use.  For
a buffer that is 8,192 bytes in size, a file of up to 10,775
bytes can be created that can be parsed without error. 
Going to 10,776 or larger file size will cause the parser to
exit with the above error.  Increasing the buffer size made
the problem go away, but apparently it will just take a
bigger file for Expat to produce the same errorin that case.

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

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