Re: [xml] redicting parts of trees

On Thu, May 19, 2005 at 11:00:54PM +0200, Kasimier Buchcik wrote:

On Thu, 2005-05-19 at 16:52 -0400, Daniel Veillard wrote:
On Thu, May 19, 2005 at 10:28:23PM +0200, Kasimier Buchcik wrote:
Is slowly boils down to using just the xmlReconciliateNs mechanism
to declare all missing ns-declarations on the given node, as Daniel
first suggested - although you have been warned ;-)

  I'm not the one this API is designed for, so I will refrain from
getting in the choices unless I see something which would be too
dangerous to put in the API. I'm happy to see the 3 main consumers
of that API firmly discussing the options and fully understanding
the scope of the problem. You just need to not forgot ID/REF in the

Ah, right ID/IDREF: maybe we need an additional traversal before any
attempt to adopt can be done; so reject the node if this constraint
is violated. Would be a mess to stop somewhere in the branch.
Any ideas here?

  No just check if an attribute being moved is an ID in the ID list of
the source document and then unregister it from the ID table. The more 
painful part if that when adding back in the new document you would
need to update the target ID table too. The good point is that those
operations are NOP if you don't have a DTD (and they are not xml:id),
checking the presence/emptyness of the id table on the source and the
presence of a DTD on the target should make big shortcut in most cases.

Daniel Veillard      | Red Hat Desktop team
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]