summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-26 13:17:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-26 13:17:08 +0000
commit7233f9f6b42282c407d584e92578bae4b1eb7cb1 (patch)
treedb63c1840db873ab4b0170a3fb030de80d8aa2e5 /src
parenta3ae38c428cfefb0b9c52f551116becebc85ba0b (diff)
downloadlibdom-7233f9f6b42282c407d584e92578bae4b1eb7cb1.tar.gz
libdom-7233f9f6b42282c407d584e92578bae4b1eb7cb1.tar.bz2
Add ability to set a document's doctype after the document has been created
svn path=/trunk/dom/; revision=3462
Diffstat (limited to 'src')
-rw-r--r--src/core/document.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/core/document.c b/src/core/document.c
index b73f5e3..0552c22 100644
--- a/src/core/document.c
+++ b/src/core/document.c
@@ -6,6 +6,7 @@
*/
#include <dom/functypes.h>
+#include <dom/bootstrap/implpriv.h>
#include <dom/core/document.h>
#include "core/characterdata.h"
@@ -752,6 +753,35 @@ dom_exception dom_document_rename_node(struct dom_document *doc,
return DOM_NOT_SUPPORTED_ERR;
}
+/* */
+/* ----------------------------------------------------------------------- */
+/* */
+
+/**
+ * Set a Document's Document Type
+ *
+ * \param doc Document to set type of
+ * \param doctype The doctype to apply
+ * \return DOM_NO_ERR on success,
+ * DOM_INVALID_MODIFICATION_ERR if ::doc already has a doctype.
+ *
+ * The doctype will have its reference count increased. It is the
+ * responsibility of the caller to unref the doctype once it has finished
+ * with it.
+ */
+dom_exception dom_document_set_doctype(struct dom_document *doc,
+ struct dom_document_type *doctype)
+{
+ UNUSED(doc);
+ UNUSED(doctype);
+
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/* */
+/* ----------------------------------------------------------------------- */
+/* */
+
/**
* Acquire a pointer to the base of the document buffer
*