summaryrefslogtreecommitdiff
path: root/src/core/node.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-26 23:55:36 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-26 23:55:36 +0000
commit6a274638b1458f1c98a228255c7058f32d400199 (patch)
tree4fbbf2458c260e4e097f23484d12f10fcadf6a0b /src/core/node.h
parent1dd1a95d56b2c927f7889cda030a4696e31ba232 (diff)
downloadlibdom-6a274638b1458f1c98a228255c7058f32d400199.tar.gz
libdom-6a274638b1458f1c98a228255c7058f32d400199.tar.bz2
Begin to cater for XML namespaces.
The localname member of Node has been removed. The name member already caters for this. Fix NodeList to cope with this and add some pointer vs NULL comparisons for sanity. Replace implementation of dom_element_get_tag_name() with a simple call to dom_node_get_node_name(), which is where the gory details lie. Add the QName building stuff to dom_node_get_node_name() (as per previous implementation of dom_element_get_tag_name()). Implement dom_node_set_prefix(). Ensure dom_node_get_local_name() returns NULL for nodes created by non-namespace-aware methods (nodes must also be Elements or Attributes) svn path=/trunk/dom/; revision=3596
Diffstat (limited to 'src/core/node.h')
-rw-r--r--src/core/node.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/node.h b/src/core/node.h
index 2297ca5..fd23625 100644
--- a/src/core/node.h
+++ b/src/core/node.h
@@ -32,7 +32,9 @@ struct dom_user_data {
* DOM nodes are reference counted
*/
struct dom_node {
- struct dom_string *name; /**< Node name */
+ struct dom_string *name; /**< Node name (this is the local part
+ * of a QName in the cases where a
+ * namespace exists) */
struct dom_string *value; /**< Node value */
dom_node_type type; /**< Node type */
struct dom_node *parent; /**< Parent node */
@@ -45,7 +47,6 @@ struct dom_node {
struct dom_string *namespace; /**< Namespace URI */
struct dom_string *prefix; /**< Namespace prefix */
- struct dom_string *localname; /**< Local part of qualified name */
struct dom_user_data *user_data; /**< User data list */