Hi, On Thu, 2005-06-16 at 09:10 -0400, Rob Richards wrote: [...]
Rob
I attached the current diffs for tree.c and tree.h. There would be three public functions: int xmlDOMWrapReconcileNamespaces(xmlFooCtxtPtr ctxt, xmlNodePtr elem, int options); int xmlDOMWrapAdoptNode(xmlFooCtxtPtr ctxt, xmlDocPtr sourceDoc, xmlNodePtr node, xmlDocPtr destDoc, xmlNodePtr destParent, int options); int xmlDOMWrapRemoveNode(xmlFooCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr node); That makes an addition of ~35 KB to tree.c :-/ Maybe a separate file for DOM-wrapper helper functions would be an option. Since this all is eventually more code than you expected, I just post the diff here, and would like to wait for Daniel to return from vacations for discussion, before exposing anything to the API. Additionally there are some tests which can be generated with the attached files: "test-adopt.xml" - the test definitions "test-adopt-to-c.xsl" - the transformation file to C xsltproc -o test-adopt.c test-adopt-to-c.xsd test-adopt.xml We could transform the test-definitions to python, when/if the functions will become available to python. Open issues: 1. What exactly to do with XIncluded pieces? 2. Design the custom context; it should be used for a yet-to-write node-copy function as well. 3. More? If you have a test-scenario in your head, please send it either by using the structure as in "test-adopt.xml" or just describe the scenario, so we can add the test. Greetings, Kasimier
Attachment:
tree.c.diff
Description: Text Data
Attachment:
tree.h.diff
Description: Text Data
Attachment:
test-adopt-to-c.xsl
Description: Text Data
Attachment:
test-adopt.xml
Description: Text Data