From d208ad37e9dea0e3854e70eef40e33716c54aff0 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 26 Jul 2007 13:17:08 +0000 Subject: Add ability to set a document's doctype after the document has been created svn path=/trunk/dom/; revision=3462 --- src/core/document.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/core/document.c') 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 +#include #include #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 * -- cgit v1.2.3