diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-27 23:03:13 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-27 23:03:13 +0000 |
commit | 7b83a0bb1cd4604ab6a55705c4b1c40c769090a6 (patch) | |
tree | e8740ad003d8f601a8f9d665e587233ec58c12e9 /src/core/attr.c | |
parent | 024e202af7efd730c0b6de46901d2cb274556b4f (diff) | |
download | libdom-7b83a0bb1cd4604ab6a55705c4b1c40c769090a6.tar.gz libdom-7b83a0bb1cd4604ab6a55705c4b1c40c769090a6.tar.bz2 |
Modify dom_node_initialise() API to permit specification of namespace URI and prefix.
Fix up everything else to cope.
svn path=/trunk/dom/; revision=3599
Diffstat (limited to 'src/core/attr.c')
-rw-r--r-- | src/core/attr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/attr.c b/src/core/attr.c index dbf2fc2..232f7ba 100644 --- a/src/core/attr.c +++ b/src/core/attr.c @@ -39,9 +39,11 @@ struct dom_attr { /** * Create an attribute node * - * \param doc The owning document - * \param name The name of the node to create - * \param result Pointer to location to receive created attribute + * \param doc The owning document + * \param name The (local) name of the node to create + * \param namespace The namespace URI of the attribute, or NULL + * \param prefix The namespace prefix of the attribute, or NULL + * \param result Pointer to location to receive created attribute * \return DOM_NO_ERR on success, * DOM_INVALID_CHARACTER_ERR if ::name is invalid, * DOM_NO_MEM_ERR on memory exhaustion. @@ -51,7 +53,8 @@ struct dom_attr { * The returned attribute will already be referenced. */ dom_exception dom_attr_create(struct dom_document *doc, - struct dom_string *name, struct dom_attr **result) + struct dom_string *name, struct dom_string *namespace, + struct dom_string *prefix, struct dom_attr **result) { struct dom_attr *a; dom_exception err; @@ -65,7 +68,7 @@ dom_exception dom_attr_create(struct dom_document *doc, /* Initialise the base class */ err = dom_node_initialise(&a->base, doc, DOM_ATTRIBUTE_NODE, - name, NULL); + name, NULL, namespace, prefix); if (err != DOM_NO_ERR) { dom_document_alloc(doc, a, 0); return err; |