Commit 4d9c948f authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik

Added allocation/deallocation functions for the DOM-wrapper context.

* tree.c include/libxml/tree.h: Added allocation/deallocation
  functions for the DOM-wrapper context.
parent 017264fe
Mon Jun 27 17:02:14 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* tree.c include/libxml/tree.h: Added allocation/deallocation
functions for the DOM-wrapper context.
Mon Jun 27 15:41:30 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* tree.c: Commented the new functions to be experimental.
......
......@@ -1122,6 +1122,10 @@ XMLPUBFUN void XMLCALL
/*
* DOM-wrapper helper functions.
*/
XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
xmlDOMWrapNewCtxt (void);
XMLPUBFUN void XMLCALL
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr elem,
......
......@@ -7127,6 +7127,41 @@ xmlSetCompressMode(int mode) {
else xmlCompressMode = mode;
}
/*
* xmlDOMWrapNewCtxt:
*
* Allocates and initializes a new DOM-wrapper context.
*
* Returns the xmlDOMWrapCtxtPtr or NULL in case of an internal errror.
*/
xmlDOMWrapCtxtPtr
xmlDOMWrapNewCtxt(void)
{
xmlDOMWrapCtxtPtr ret;
ret = xmlMalloc(sizeof(xmlDOMWrapCtxt));
if (ret == NULL) {
xmlTreeErrMemory("allocating DOM-wrapper context");
return (NULL);
}
memset(ret, 0, sizeof(xmlDOMWrapCtxt));
return (ret);
}
/*
* xmlDOMWrapFreeCtxt:
* @ctxt: the DOM-wrapper context
*
* Frees the DOM-wrapper context.
*/
void
xmlDOMWrapFreeCtxt(xmlDOMWrapCtxtPtr ctxt)
{
if (ctxt == NULL)
return;
xmlFree(ctxt);
}
#define XML_TREE_NSMAP_PARENT -1
#define XML_TREE_NSMAP_XML -2
#define XML_TREE_NSMAP_DOC -3
......@@ -8540,7 +8575,7 @@ internal_error:
* @sourceDoc: the optional sourceDoc
* @node: the node to start with
* @destDoc: the destination doc
* @parent: the optional new parent of @node in @destDoc
* @destParent: the optional new parent of @node in @destDoc
* @options: option flags
*
* Ensures that ns-references point to @destDoc: either to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment