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



On Thu, Jan 24, 2002 at 01:15:28PM -0500, Daniel Veillard wrote:
Presumably it is the documentation that is incorrect, and xmlCopyEntity
should really copy the node's children as well?

  That's where things can start to get really messy...
Depending on your application you may want to copy the subtree or share it.
If you're copying to another document you need to copy. If within the
same document boundaries, one may need to copy entities content because
the intent is really to replicate it, but one may want to keep a single
instance so that editing inside the entity is shared. It may also depend
if the entity in internal or external.

Yes, I see the problem now...

Anyway, apart from the children of xmlEntity nodes not being copied, this
patch should give the correct behaviour when copying DTDs, including
preserving order of the declarations in the DTD.

Thanks,

Anthony

Attachment: patch
Description: Text document



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