[xml] xmlParseDTD breaks now

Date view Thread view Subject view Author view

From: Joe McAlerney (joey@silicondefense.com)
Date: Tue Sep 26 2000 - 16:49:42 EDT


Hello,

After upgrading from 2.2.2 to 2.2.3, I found that my DOM application was
halting when it called xmlParseDTD.
Here is the way I call it:

dtd = xmlParseDTD("example.dtd","example.dtd");

Please bare with me as I drag you through my thinking/debugging process.

The specific place it halts, is buried down in resolveEntity() in the
file SAX.c. xmlParseDTD calls xmlSAXParseDTD, which initializes a new
xmlParserCtxt, and passes it's userdata ptr into resolveEntity, along
with my ExternalID and SystemID.

The new version of resolveEntity() attempts to extract a base value from
the newly initialized xmlParserCtxt value, but can't because there is
nothing to extract. As a result, a NULL value is passed into
xmlBuildURI, and a NULL value is returned. Unfortunately, that value is
needed to load the external entity. Since it can not, NULL's are
returned back up to the xmlParseDTD level.

The recent uri.c patch didn't seem to apply to this, but I patched it
anyway. Is there a new step to add? Or, was I calling it wrong in the
first place, but it just happened to work? Other information... hmm...
Well, the example.dtd file is in the directory the app is run in, and an
xmlDocument is built after the DTD. I would just use xmlNewDTD, but the
DTD must be created before the document in my application.

Thank you for any help,

-Joe M.

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Sep 26 2000 - 17:43:32 EDT