From b2256675eaf9cf9fa239da93db4f205d97fc710c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 19 Sep 2007 22:06:26 +0000 Subject: 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 --- src/core/document_type.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/core/document_type.h (limited to 'src/core/document_type.h') diff --git a/src/core/document_type.h b/src/core/document_type.h new file mode 100644 index 0000000..266a1b6 --- /dev/null +++ b/src/core/document_type.h @@ -0,0 +1,17 @@ +/* + * This file is part of libdom. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell + */ + +#ifndef dom_internal_core_document_type_h_ +#define dom_internal_core_document_type_h_ + +struct dom_document_type; + +/* Destroy a document type */ +void dom_document_type_destroy(struct dom_document_type *doctype); + +#endif + -- cgit v1.2.3