path: root/bindings
diff options
authorJohn Mark Bell <>2007-09-29 01:01:55 +0000
committerJohn Mark Bell <>2007-09-29 01:01:55 +0000
commit6b1aeb6465f339bfbc7be33b1ecab3f235adbe7f (patch)
tree720ad0f18306af6b11b9b1c0dbd622bf57792af6 /bindings
parent83bc8f09261fb4d265cc79d39e740b4a0c9648e2 (diff)
Introduce global initialistaion/finalisation for DOM library. This should be used to initialise any parts of the library before they are used. Mostly, this will comprise of static initialisers. Finalisation cleans up afterwards. This API is only exposed to language-specific binding libraries -- they should expose their own global initialisation/finalisation routines which call the core libdom ones.
Introduce new utility code for namespace and qname processing. Port dom_document_create_element_ns() and dom_document_create_attribute_ns() to this new code. Make libdom-libxml's initialiser initialise libdom itself first of all. svn path=/trunk/dom/; revision=3604
Diffstat (limited to 'bindings')
1 files changed, 5 insertions, 0 deletions
diff --git a/bindings/xml/xmlbinding.c b/bindings/xml/xmlbinding.c
index 3660015..7e2814e 100644
--- a/bindings/xml/xmlbinding.c
+++ b/bindings/xml/xmlbinding.c
@@ -385,9 +385,14 @@ xml_error xml_dom_binding_initialise(xml_alloc alloc, void *pw)
dom_exception err;
+ err = dom_initialise(alloc, pw);
+ if (err != DOM_NO_ERR)
+ return XML_NOMEM;
err = dom_register_source(&xml_dom_impl_src, (dom_alloc) alloc, pw);
if (err != DOM_NO_ERR)
return XML_NOMEM;
return XML_OK;