From 7a9d61b0def3e8cff5b25892fdca5c8cdda4b628 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 6 Jul 2007 21:42:18 +0000 Subject: Purge all trace of the ballache that was dom_ctx. Document the functions in document.c svn path=/trunk/dom/; revision=3385 --- src/core/node.c | 264 ++++++++++++++++++-------------------------------------- 1 file changed, 85 insertions(+), 179 deletions(-) (limited to 'src/core/node.c') diff --git a/src/core/node.c b/src/core/node.c index 4c2af88..468965b 100644 --- a/src/core/node.c +++ b/src/core/node.c @@ -5,15 +5,13 @@ * Copyright 2007 John-Mark Bell */ -#include - +#include "core/document.h" #include "core/node.h" #include "utils/utils.h" /** * Create a DOM node * - * \param ctx The context in which the node resides * \param doc The document which owns the node * \param type The node type required * \param name The node name, or NULL @@ -24,23 +22,22 @@ * The returned node will be referenced, so there is no need for the caller * to explicitly reference it. */ -dom_exception dom_node_create(struct dom_ctx *ctx, - struct dom_document *doc, dom_node_type type, +dom_exception dom_node_create(struct dom_document *doc, dom_node_type type, struct dom_string *name, struct dom_string *value, struct dom_node **node) { struct dom_node *n; - n = ctx->alloc(NULL, sizeof(struct dom_node), ctx->pw); + n = dom_document_alloc(doc, NULL, sizeof(struct dom_node)); if (n == NULL) return DOM_NO_MEM_ERR; if (name != NULL) - dom_string_ref(ctx, name); + dom_string_ref(name); n->name = name; if (value != NULL) - dom_string_ref(ctx, value); + dom_string_ref(value); n->value = value; n->type = type; @@ -52,7 +49,7 @@ dom_exception dom_node_create(struct dom_ctx *ctx, n->next = NULL; n->attributes = NULL; - dom_node_ref(ctx, (struct dom_node *) doc); + dom_node_ref((struct dom_node *) doc); n->owner = doc; /** \todo Namespace handling */ @@ -72,29 +69,23 @@ dom_exception dom_node_create(struct dom_ctx *ctx, /** * Claim a reference on a DOM node * - * \param ctx The context in which the node resides * \param node The node to claim a reference on */ -void dom_node_ref(struct dom_ctx *ctx, struct dom_node *node) +void dom_node_ref(struct dom_node *node) { - UNUSED(ctx); - node->refcnt++; } /** * Release a reference on a DOM node * - * \param ctx The context in which the node resides * \param node The node to release the reference from * * If the reference count reaches zero, any memory claimed by the * node will be released */ -void dom_node_unref(struct dom_ctx *ctx, struct dom_node *node) +void dom_node_unref(struct dom_node *node) { - UNUSED(ctx); - if (--node->refcnt == 0) { /** \todo implement */ } @@ -103,7 +94,6 @@ void dom_node_unref(struct dom_ctx *ctx, struct dom_node *node) /** * Retrieve the name of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the name of * \param result Pointer to location to receive node name * \return DOM_NO_ERR. @@ -112,10 +102,9 @@ void dom_node_unref(struct dom_ctx *ctx, struct dom_node *node) * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_get_name(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_name(struct dom_node *node, + struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -125,7 +114,6 @@ dom_exception dom_node_get_name(struct dom_ctx *ctx, /** * Retrieve the value of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the value of * \param result Pointer to location to receive node value * \return DOM_NO_ERR. @@ -137,10 +125,9 @@ dom_exception dom_node_get_name(struct dom_ctx *ctx, * DOM3Core states that this can raise DOMSTRING_SIZE_ERR. It will not in * this implementation; dom_strings are unbounded. */ -dom_exception dom_node_get_value(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_value(struct dom_node *node, + struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -150,7 +137,6 @@ dom_exception dom_node_get_value(struct dom_ctx *ctx, /** * Set the value of a DOM node * - * \param ctx The context in which the node resides * \param node Node to set the value of * \param value New value for node * \return DOM_NO_ERR on success, @@ -161,10 +147,9 @@ dom_exception dom_node_get_value(struct dom_ctx *ctx, * should unref it after the call (as the caller should have already claimed * a reference on the string). The node's existing value will be unrefed. */ -dom_exception dom_node_set_value(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *value) +dom_exception dom_node_set_value(struct dom_node *node, + struct dom_string *value) { - UNUSED(ctx); UNUSED(node); UNUSED(value); @@ -174,16 +159,12 @@ dom_exception dom_node_set_value(struct dom_ctx *ctx, /** * Retrieve the type of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the type of * \param result Pointer to location to receive node type * \return DOM_NO_ERR. */ -dom_exception dom_node_get_type(struct dom_ctx *ctx, - struct dom_node *node, dom_node_type *result) +dom_exception dom_node_get_type(struct dom_node *node, dom_node_type *result) { - UNUSED(ctx); - *result = node->type; return DOM_NO_ERR; @@ -192,7 +173,6 @@ dom_exception dom_node_get_type(struct dom_ctx *ctx, /** * Retrieve the parent of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the parent of * \param result Pointer to location to receive node parent * \return DOM_NO_ERR. @@ -201,12 +181,12 @@ dom_exception dom_node_get_type(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_parent(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node **result) +dom_exception dom_node_get_parent(struct dom_node *node, + struct dom_node **result) { /* If there is a parent node, then increase its reference count */ if (node->parent != NULL) - dom_node_ref(ctx, node->parent); + dom_node_ref(node->parent); *result = node->parent; @@ -216,17 +196,15 @@ dom_exception dom_node_get_parent(struct dom_ctx *ctx, /** * Retrieve a list of children of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the children of * \param result Pointer to location to receive child list * \return DOM_NO_ERR. * * \todo Work out reference counting semantics of dom_node_list */ -dom_exception dom_node_get_children(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node_list **result) +dom_exception dom_node_get_children(struct dom_node *node, + struct dom_node_list **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -236,7 +214,6 @@ dom_exception dom_node_get_children(struct dom_ctx *ctx, /** * Retrieve the first child of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the first child of * \param result Pointer to location to receive node's first child * \return DOM_NO_ERR. @@ -245,12 +222,12 @@ dom_exception dom_node_get_children(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_first_child(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node **result) +dom_exception dom_node_get_first_child(struct dom_node *node, + struct dom_node **result) { /* If there is a first child, increase its reference count */ if (node->first_child != NULL) - dom_node_ref(ctx, node->first_child); + dom_node_ref(node->first_child); *result = node->first_child; @@ -260,7 +237,6 @@ dom_exception dom_node_get_first_child(struct dom_ctx *ctx, /** * Retrieve the last child of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the last child of * \param result Pointer to location to receive node's last child * \return DOM_NO_ERR. @@ -269,12 +245,12 @@ dom_exception dom_node_get_first_child(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_last_child(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node **result) +dom_exception dom_node_get_last_child(struct dom_node *node, + struct dom_node **result) { /* If there is a last child, increase its reference count */ if (node->last_child != NULL) - dom_node_ref(ctx, node->last_child); + dom_node_ref(node->last_child); *result = node->last_child; @@ -284,7 +260,6 @@ dom_exception dom_node_get_last_child(struct dom_ctx *ctx, /** * Retrieve the previous sibling of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the previous sibling of * \param result Pointer to location to receive node's previous sibling * \return DOM_NO_ERR. @@ -293,12 +268,12 @@ dom_exception dom_node_get_last_child(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_previous(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node **result) +dom_exception dom_node_get_previous(struct dom_node *node, + struct dom_node **result) { /* If there is a previous sibling, increase its reference count */ if (node->previous != NULL) - dom_node_ref(ctx, node->previous); + dom_node_ref(node->previous); *result = node->previous; @@ -308,7 +283,6 @@ dom_exception dom_node_get_previous(struct dom_ctx *ctx, /** * Retrieve the subsequent sibling of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the subsequent sibling of * \param result Pointer to location to receive node's subsequent sibling * \return DOM_NO_ERR. @@ -317,12 +291,12 @@ dom_exception dom_node_get_previous(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_next(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node **result) +dom_exception dom_node_get_next(struct dom_node *node, + struct dom_node **result) { /* If there is a subsequent sibling, increase its reference count */ if (node->next != NULL) - dom_node_ref(ctx, node->next); + dom_node_ref(node->next); *result = node->next; @@ -332,17 +306,15 @@ dom_exception dom_node_get_next(struct dom_ctx *ctx, /** * Retrieve a map of attributes associated with a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the attributes of * \param result Pointer to location to receive attribute map * \return DOM_NO_ERR. * * \todo Work out reference counting semantics of dom_named_node_map */ -dom_exception dom_node_get_attributes(struct dom_ctx *ctx, - struct dom_node *node, struct dom_named_node_map **result) +dom_exception dom_node_get_attributes(struct dom_node *node, + struct dom_named_node_map **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -352,7 +324,6 @@ dom_exception dom_node_get_attributes(struct dom_ctx *ctx, /** * Retrieve the owning document of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the owner of * \param result Pointer to location to receive node's owner * \return DOM_NO_ERR. @@ -361,12 +332,12 @@ dom_exception dom_node_get_attributes(struct dom_ctx *ctx, * the responsibility of the caller to unref the node once it has * finished with it. */ -dom_exception dom_node_get_owner(struct dom_ctx *ctx, - struct dom_node *node, struct dom_document **result) +dom_exception dom_node_get_owner(struct dom_node *node, + struct dom_document **result) { /* If there is an owner, increase its reference count */ if (node->owner != NULL) - dom_node_ref(ctx, (struct dom_node *) node->owner); + dom_node_ref((struct dom_node *) node->owner); *result = node->owner; @@ -376,7 +347,6 @@ dom_exception dom_node_get_owner(struct dom_ctx *ctx, /** * Insert a child into a node * - * \param ctx The context in which the nodes reside * \param node Node to insert into * \param new_child Node to insert * \param ref_child Node to insert before, or NULL to insert as last child @@ -405,12 +375,10 @@ dom_exception dom_node_get_owner(struct dom_ctx *ctx, * ::new_child's reference count will be increased. The caller should unref * it (as they should already have held a reference on the node) */ -dom_exception dom_node_insert_before(struct dom_ctx *ctx, - struct dom_node *node, +dom_exception dom_node_insert_before(struct dom_node *node, struct dom_node *new_child, struct dom_node *ref_child, struct dom_node **result) { - UNUSED(ctx); UNUSED(node); UNUSED(new_child); UNUSED(ref_child); @@ -422,7 +390,6 @@ dom_exception dom_node_insert_before(struct dom_ctx *ctx, /** * Replace a node's child with a new one * - * \param ctx The context in which the nodes reside * \param node Node whose child to replace * \param new_child Replacement node * \param old_child Child to replace @@ -456,12 +423,10 @@ dom_exception dom_node_insert_before(struct dom_ctx *ctx, * transferred to the caller). The caller should unref ::old_child once it * is finished with it. */ -dom_exception dom_node_replace_child(struct dom_ctx *ctx, - struct dom_node *node, +dom_exception dom_node_replace_child(struct dom_node *node, struct dom_node *new_child, struct dom_node *old_child, struct dom_node **result) { - UNUSED(ctx); UNUSED(node); UNUSED(new_child); UNUSED(old_child); @@ -473,7 +438,6 @@ dom_exception dom_node_replace_child(struct dom_ctx *ctx, /** * Remove a child from a node * - * \param ctx The context in which the nodes reside * \param node Node whose child to replace * \param old_child Child to remove * \param result Pointer to location to receive removed node @@ -489,12 +453,10 @@ dom_exception dom_node_replace_child(struct dom_ctx *ctx, * transferred to the caller). The caller should unref ::old_child once it * is finished with it. */ -dom_exception dom_node_remove_child(struct dom_ctx *ctx, - struct dom_node *node, +dom_exception dom_node_remove_child(struct dom_node *node, struct dom_node *old_child, struct dom_node **result) { - UNUSED(ctx); UNUSED(node); UNUSED(old_child); UNUSED(result); @@ -505,7 +467,6 @@ dom_exception dom_node_remove_child(struct dom_ctx *ctx, /** * Append a child to the end of a node's child list * - * \param ctx The context in which the nodes reside * \param node Node to insert into * \param new_child Node to append * \param result Pointer to location to receive node being inserted @@ -531,28 +492,23 @@ dom_exception dom_node_remove_child(struct dom_ctx *ctx, * ::new_child's reference count will be increased. The caller should unref * it (as they should already have held a reference on the node) */ -dom_exception dom_node_append_child(struct dom_ctx *ctx, - struct dom_node *node, +dom_exception dom_node_append_child(struct dom_node *node, struct dom_node *new_child, struct dom_node **result) { /* This is just a veneer over insert_before */ - return dom_node_insert_before(ctx, node, new_child, NULL, result); + return dom_node_insert_before(node, new_child, NULL, result); } /** * Determine if a node has any children * - * \param ctx The context in which the node resides * \param node Node to inspect * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_has_children(struct dom_ctx *ctx, - struct dom_node *node, bool *result) +dom_exception dom_node_has_children(struct dom_node *node, bool *result) { - UNUSED(ctx); - *result = node->first_child != NULL; return DOM_NO_ERR; @@ -561,7 +517,6 @@ dom_exception dom_node_has_children(struct dom_ctx *ctx, /** * Clone a DOM node * - * \param ctx The context in which the node resides * \param node The node to clone * \param deep True to deep-clone the node's sub-tree * \param result Pointer to location to receive result @@ -598,11 +553,9 @@ dom_exception dom_node_has_children(struct dom_ctx *ctx, * \todo work out what happens when cloning Document, DocumentType, Entity * and Notation nodes. */ -dom_exception dom_node_clone(struct dom_ctx *ctx, - struct dom_node *node, bool deep, +dom_exception dom_node_clone(struct dom_node *node, bool deep, struct dom_node **result) { - UNUSED(ctx); UNUSED(node); UNUSED(deep); UNUSED(result); @@ -613,7 +566,6 @@ dom_exception dom_node_clone(struct dom_ctx *ctx, /** * Normalize a DOM node * - * \param ctx The context in which the node resides * \param node The node to normalize * \return DOM_NO_ERR. * @@ -621,10 +573,8 @@ dom_exception dom_node_clone(struct dom_ctx *ctx, * including Attr nodes into "normal" form, where only structure separates * Text nodes. */ -dom_exception dom_node_normalize(struct dom_ctx *ctx, - struct dom_node *node) +dom_exception dom_node_normalize(struct dom_node *node) { - UNUSED(ctx); UNUSED(node); return DOM_NOT_SUPPORTED_ERR; @@ -634,18 +584,16 @@ dom_exception dom_node_normalize(struct dom_ctx *ctx, * Test whether the DOM implementation implements a specific feature and * that feature is supported by the node. * - * \param ctx The context in which the node resides * \param node The node to test * \param feature The name of the feature to test * \param version The version number of the feature to test * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_is_supported(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *feature, - struct dom_node *version, bool *result) +dom_exception dom_node_is_supported(struct dom_node *node, + struct dom_string *feature, struct dom_node *version, + bool *result) { - UNUSED(ctx); UNUSED(node); UNUSED(feature); UNUSED(version); @@ -657,7 +605,6 @@ dom_exception dom_node_is_supported(struct dom_ctx *ctx, /** * Retrieve the namespace of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the namespace of * \param result Pointer to location to receive node's namespace * \return DOM_NO_ERR. @@ -666,12 +613,12 @@ dom_exception dom_node_is_supported(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_get_namespace(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_namespace(struct dom_node *node, + struct dom_string **result) { /* If there is a namespace, increase its reference count */ if (node->namespace != NULL) - dom_string_ref(ctx, node->namespace); + dom_string_ref(node->namespace); *result = node->namespace; @@ -681,7 +628,6 @@ dom_exception dom_node_get_namespace(struct dom_ctx *ctx, /** * Retrieve the prefix of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the prefix of * \param result Pointer to location to receive node's prefix * \return DOM_NO_ERR. @@ -690,12 +636,12 @@ dom_exception dom_node_get_namespace(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_get_prefix(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_prefix(struct dom_node *node, + struct dom_string **result) { /* If there is a prefix, increase its reference count */ if (node->prefix != NULL) - dom_string_ref(ctx, node->prefix); + dom_string_ref(node->prefix); *result = node->prefix; @@ -705,7 +651,6 @@ dom_exception dom_node_get_prefix(struct dom_ctx *ctx, /** * Set the prefix of a DOM node * - * \param ctx The context in which the node resides * \param node The node to set the prefix of * \param prefix Pointer to prefix string * \return DOM_NO_ERR on success, @@ -726,10 +671,9 @@ dom_exception dom_node_get_prefix(struct dom_ctx *ctx, * and the qualifiedName of ::node * is "xmlns". */ -dom_exception dom_node_set_prefix(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *prefix) +dom_exception dom_node_set_prefix(struct dom_node *node, + struct dom_string *prefix) { - UNUSED(ctx); UNUSED(node); UNUSED(prefix); @@ -739,7 +683,6 @@ dom_exception dom_node_set_prefix(struct dom_ctx *ctx, /** * Retrieve the local part of a node's qualified name * - * \param ctx The context in which the node resides * \param node The node to retrieve the local name of * \param result Pointer to location to receive local name * \return DOM_NO_ERR. @@ -748,12 +691,12 @@ dom_exception dom_node_set_prefix(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_get_local_name(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_local_name(struct dom_node *node, + struct dom_string **result) { /* If there is a local name, increase its reference count */ if (node->localname != NULL) - dom_string_ref(ctx, node->localname); + dom_string_ref(node->localname); *result = node->localname; @@ -763,16 +706,12 @@ dom_exception dom_node_get_local_name(struct dom_ctx *ctx, /** * Determine if a node has any attributes * - * \param ctx The context in which the node resides * \param node Node to inspect * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_has_attributes(struct dom_ctx *ctx, - struct dom_node *node, bool *result) +dom_exception dom_node_has_attributes(struct dom_node *node, bool *result) { - UNUSED(ctx); - *result = node->attributes != NULL; return DOM_NO_ERR; @@ -781,7 +720,6 @@ dom_exception dom_node_has_attributes(struct dom_ctx *ctx, /** * Retrieve the base URI of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the base URI of * \param result Pointer to location to receive base URI * \return DOM_NO_ERR. @@ -790,10 +728,9 @@ dom_exception dom_node_has_attributes(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_get_base(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_base(struct dom_node *node, + struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -803,7 +740,6 @@ dom_exception dom_node_get_base(struct dom_ctx *ctx, /** * Compare the positions of two nodes in a DOM tree * - * \param ctx The context in which the nodes reside * \param node The reference node * \param other The node to compare * \param result Pointer to location to receive result @@ -813,11 +749,9 @@ dom_exception dom_node_get_base(struct dom_ctx *ctx, * * The result is a bitfield of dom_document_position values. */ -dom_exception dom_node_compare_document_position(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node *other, - uint16_t *result) +dom_exception dom_node_compare_document_position(struct dom_node *node, + struct dom_node *other, uint16_t *result) { - UNUSED(ctx); UNUSED(node); UNUSED(other); UNUSED(result); @@ -828,7 +762,6 @@ dom_exception dom_node_compare_document_position(struct dom_ctx *ctx, /** * Retrieve the text content of a DOM node * - * \param ctx The context in which the node resides * \param node The node to retrieve the text content of * \param result Pointer to location to receive text content * \return DOM_NO_ERR. @@ -840,10 +773,9 @@ dom_exception dom_node_compare_document_position(struct dom_ctx *ctx, * DOM3Core states that this can raise DOMSTRING_SIZE_ERR. It will not in * this implementation; dom_strings are unbounded. */ -dom_exception dom_node_get_text_content(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string **result) +dom_exception dom_node_get_text_content(struct dom_node *node, + struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(result); @@ -853,7 +785,6 @@ dom_exception dom_node_get_text_content(struct dom_ctx *ctx, /** * Set the text content of a DOM node * - * \param ctx The context in which the node resides * \param node The node to set the text content of * \param content New text content for node * \return DOM_NO_ERR on success, @@ -862,10 +793,9 @@ dom_exception dom_node_get_text_content(struct dom_ctx *ctx, * Any child nodes ::node may have are removed and replaced with a single * Text node containing the new content. */ -dom_exception dom_node_set_text_content(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *content) +dom_exception dom_node_set_text_content(struct dom_node *node, + struct dom_string *content) { - UNUSED(ctx); UNUSED(node); UNUSED(content); @@ -875,7 +805,6 @@ dom_exception dom_node_set_text_content(struct dom_ctx *ctx, /** * Determine if two DOM nodes are the same * - * \param ctx The context in which the nodes reside * \param node The node to compare * \param other The node to compare against * \param result Pointer to location to receive result @@ -883,12 +812,9 @@ dom_exception dom_node_set_text_content(struct dom_ctx *ctx, * * This tests if the two nodes reference the same object. */ -dom_exception dom_node_is_same(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node *other, +dom_exception dom_node_is_same(struct dom_node *node, struct dom_node *other, bool *result) { - UNUSED(ctx); - *result = (node == other); return DOM_NO_ERR; @@ -897,7 +823,6 @@ dom_exception dom_node_is_same(struct dom_ctx *ctx, /** * Lookup the prefix associated with the given namespace URI * - * \param ctx The context in which the node resides * \param node The node to start prefix search from * \param namespace The namespace URI * \param result Pointer to location to receive result @@ -907,11 +832,9 @@ dom_exception dom_node_is_same(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_lookup_prefix(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *namespace, - struct dom_string **result) +dom_exception dom_node_lookup_prefix(struct dom_node *node, + struct dom_string *namespace, struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(namespace); UNUSED(result); @@ -922,17 +845,14 @@ dom_exception dom_node_lookup_prefix(struct dom_ctx *ctx, /** * Determine if the specified namespace is the default namespace * - * \param ctx The context in which the node resides * \param node The node to query * \param namespace The namespace URI to test * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_is_default_namespace(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *namespace, - bool *result) +dom_exception dom_node_is_default_namespace(struct dom_node *node, + struct dom_string *namespace, bool *result) { - UNUSED(ctx); UNUSED(node); UNUSED(namespace); UNUSED(result); @@ -943,7 +863,6 @@ dom_exception dom_node_is_default_namespace(struct dom_ctx *ctx, /** * Lookup the namespace URI associated with the given prefix * - * \param ctx The context in which the node resides * \param node The node to start namespace search from * \param prefix The prefix to look for, or NULL to find default. * \param result Pointer to location to receive result @@ -953,11 +872,9 @@ dom_exception dom_node_is_default_namespace(struct dom_ctx *ctx, * the responsibility of the caller to unref the string once it has * finished with it. */ -dom_exception dom_node_lookup_namespace(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *prefix, - struct dom_string **result) +dom_exception dom_node_lookup_namespace(struct dom_node *node, + struct dom_string *prefix, struct dom_string **result) { - UNUSED(ctx); UNUSED(node); UNUSED(prefix); UNUSED(result); @@ -968,7 +885,6 @@ dom_exception dom_node_lookup_namespace(struct dom_ctx *ctx, /** * Determine if two DOM nodes are equal * - * \param ctx The context in which the nodes reside * \param node The node to compare * \param other The node to compare against * \param result Pointer to location to receive result @@ -985,11 +901,9 @@ dom_exception dom_node_lookup_namespace(struct dom_ctx *ctx, * + The node entities are equal * + The node notations are equal */ -dom_exception dom_node_is_equal(struct dom_ctx *ctx, - struct dom_node *node, struct dom_node *other, - bool *result) +dom_exception dom_node_is_equal(struct dom_node *node, + struct dom_node *other, bool *result) { - UNUSED(ctx); UNUSED(node); UNUSED(other); UNUSED(result); @@ -1001,18 +915,16 @@ dom_exception dom_node_is_equal(struct dom_ctx *ctx, * Retrieve an object which implements the specialized APIs of the specified * feature and version. * - * \param ctx The context in which the node resides * \param node The node to query * \param feature The requested feature * \param version The version number of the feature * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_get_feature(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *feature, - struct dom_string *version, void **result) +dom_exception dom_node_get_feature(struct dom_node *node, + struct dom_string *feature, struct dom_string *version, + void **result) { - UNUSED(ctx); UNUSED(node); UNUSED(feature); UNUSED(version); @@ -1024,7 +936,6 @@ dom_exception dom_node_get_feature(struct dom_ctx *ctx, /** * Associate an object to a key on this node * - * \param ctx The context in which the node resides * \param node The node to insert object into * \param key The key associated with the object * \param data The object to associate with key, or NULL to remove @@ -1032,12 +943,10 @@ dom_exception dom_node_get_feature(struct dom_ctx *ctx, * \param result Pointer to location to receive previously associated object * \return DOM_NO_ERR. */ -dom_exception dom_node_set_user_data(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *key, - void *data, dom_user_data_handler handler, - void **result) +dom_exception dom_node_set_user_data(struct dom_node *node, + struct dom_string *key, void *data, + dom_user_data_handler handler, void **result) { - UNUSED(ctx); UNUSED(node); UNUSED(key); UNUSED(data); @@ -1050,17 +959,14 @@ dom_exception dom_node_set_user_data(struct dom_ctx *ctx, /** * Retrieves the object associated to a key on this node * - * \param ctx The context in which the node resides * \param node The node to retrieve object from * \param key The key to search for * \param result Pointer to location to receive result * \return DOM_NO_ERR. */ -dom_exception dom_node_get_user_data(struct dom_ctx *ctx, - struct dom_node *node, struct dom_string *key, - void **result) +dom_exception dom_node_get_user_data(struct dom_node *node, + struct dom_string *key, void **result) { - UNUSED(ctx); UNUSED(node); UNUSED(key); UNUSED(result); -- cgit v1.2.3