summaryrefslogtreecommitdiff
path: root/bindings/xml
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-29 01:01:55 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-29 01:01:55 +0000
commite99cc0c9b8c618b418b5e0b873d304faf4ad6a4b (patch)
tree720ad0f18306af6b11b9b1c0dbd622bf57792af6 /bindings/xml
parent04b889a8dd1de1fd913bad1749cd10bebadede6e (diff)
downloadlibdom-e99cc0c9b8c618b418b5e0b873d304faf4ad6a4b.tar.gz
libdom-e99cc0c9b8c618b418b5e0b873d304faf4ad6a4b.tar.bz2
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/xml')
-rw-r--r--bindings/xml/xmlbinding.c5
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;
}
+