[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Setting a new DTD
- From: Daniel Veillard <veillard redhat com>
- To: Thomas Jarosch <thomas jarosch intra2net com>
- Cc: xml gnome org
- Subject: Re: [xml] Setting a new DTD
- Date: Wed, 10 Sep 2003 05:04:01 -0400
On Wed, Sep 10, 2003 at 10:19:53AM +0200, Thomas Jarosch wrote:
> _impl->intSubset=NULL;
> xmlUnlinkNode((xmlNode*)dtd);
> xmlFreeDtd(dtd);
>
> This code works for me. But since this is the first time I hack on raw libxml
> (I've been using libxml++ for some time) I wanted to know if its correct. I'm
> not sure if it works in all cases, if I've got all the node linking right and
> that there are no memory leaks.
>
> I would highly appreciate it if a libxml guru could take a look at it
> as I intend to commit this to libxml++.
All the refernces to the items defined in the DTD like entities
will become dandling pointers to freed areas. Might work for a
given application, but a very bad interface to expose in a library API.
Changing the strings in the DTD sounds safer, but probably don't
match what you expect. I would only allow this transformation as part
of a saving mechanism to avoid the broken references problem
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]