Re: [xml] xmlCopyDtd() does not copy the children of the DTD node...

On Thu, Jan 24, 2002 at 01:53:10AM +0000, Anthony Jones wrote:

Ok, I'm working on fixing xmlCopyDtd(), hopefully I'll have something
working soon. Until then, here are a few bugfixes that my hacking around
have turned up:

patch1 - xmlCopyAttribute() does not set cur->type, and does not copy

  Hum, right :-)

patch2 - in xmlSetTreeDoc() don't try and update the properties of a non-
       element node. Am I right in thinking only XML_ELEMENT_NODEs will
       have properties?

  Yes, right.

       Also, why do we not update a XML_ENTITY_DECL?

  There was probably a very good reason <grin/>, but why ... 

       I'll need to do this eventually, and it would be useful if I could
       use xmlSetTreeDoc()...

  Testing that it won't break libxml2 and libxslt regression tests should
be sufficient, to check it if breaks existing code.

patch3 - NULL pointer check in xmlGetDtdEntity(). I also noticed that

  Right, xmlGetParameterEntity was missing it too.

       the documentation and naming for xmlGetDtdEntity() suggest it will
       behave like all the other xmlGetDtd* functions (in valid.c), ie.
       taking a xmlDtdPtr as the first argument. Perhaps the documention
       could be changed to make this a bit clearer?

  Right too, done.

    thanks a lot !


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]