summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-19 22:06:26 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-19 22:06:26 +0000
commit016dd743cf77b2536015e4e9594716dfdc81d02d (patch)
treef03cc1aae39835468e3e581aa46dcb0e9bc0ff17 /include
parent802104d9b0f45c55f16326b755f2b1612eb4ef87 (diff)
downloadlibdom-016dd743cf77b2536015e4e9594716dfdc81d02d.tar.gz
libdom-016dd743cf77b2536015e4e9594716dfdc81d02d.tar.bz2
Begin implementation of DocumentType class
Remove dom_document_set_doctype() -- dom_node_insert_before() (and thus _append_child()) can be used to achieve the same effect. DocumentType node is now a child of the Document node (as it should have been) rather than a hidden field. Make dom_node_destroy() aware of DocumentType nodes potentially having no owner. Make dom_node_finalise() aware of it, too. Make dom_node_get_owner_document() return NULL for Document nodes, as per the spec. Fix bug in dom_node_insert_before() -- previously it failed to catch attempts to insert a second root element. Make dom_node_insert_before() handle DocumentType nodes appropriately. Implement XML binding's dom_implementation_create_document_type() function. Fix XML binding's dom_implementation_create_document() implementation to cope with changed API relating to doctype insertion. Fix up XML parser wrapper to cater for new doctype insertion mechanism. Also sprinkle some NULL about for paranoia purposes. svn path=/trunk/dom/; revision=3551
Diffstat (limited to 'include')
-rw-r--r--include/dom/bootstrap/implpriv.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/dom/bootstrap/implpriv.h b/include/dom/bootstrap/implpriv.h
index 5c6a820..36359c5 100644
--- a/include/dom/bootstrap/implpriv.h
+++ b/include/dom/bootstrap/implpriv.h
@@ -15,6 +15,9 @@
* The Document implementation includes this as it needs the declaration of
* dom_document_create and dom_document_set_doctype.
*
+ * The DocumentType implementation includes this as it needs the declaration
+ * of dom_document_type_create.
+ *
* No other client should be including this.
*/
@@ -248,8 +251,11 @@ dom_exception dom_register_source(struct dom_implementation_source *source,
dom_exception dom_document_create(struct dom_implementation *impl,
dom_alloc alloc, void *pw, struct dom_document **doc);
-/* Set a Document's DocumentType */
-dom_exception dom_document_set_doctype(struct dom_document *doc,
- struct dom_document_type *doctype);
+/* Create a DOM document type */
+dom_exception dom_document_type_create(struct dom_string *qname,
+ struct dom_string *public_id,
+ struct dom_string *system_id,
+ dom_alloc alloc, void *pw,
+ struct dom_document_type **doctype);
#endif