diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-11 02:23:16 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-11 02:23:16 +0000 |
commit | ac59d3ca209e444175d406bc07cf03d0452ebdc5 (patch) | |
tree | 54865872f758e87aa1b14047af41c7d2b877dcea /include/dom/core | |
parent | 55a744d439f54289c6e470e46ec45a75c6d8478b (diff) | |
download | libdom-ac59d3ca209e444175d406bc07cf03d0452ebdc5.tar.gz libdom-ac59d3ca209e444175d406bc07cf03d0452ebdc5.tar.bz2 |
Add Element.
Fix Attr's get_schema_type_info to have the right name.
svn path=/trunk/dom/; revision=3400
Diffstat (limited to 'include/dom/core')
-rw-r--r-- | include/dom/core/attr.h | 2 | ||||
-rw-r--r-- | include/dom/core/element.h | 78 |
2 files changed, 79 insertions, 1 deletions
diff --git a/include/dom/core/attr.h b/include/dom/core/attr.h index 87adfc6..6de0b28 100644 --- a/include/dom/core/attr.h +++ b/include/dom/core/attr.h @@ -27,7 +27,7 @@ dom_exception dom_attr_set_value(struct dom_attr *attr, struct dom_string *value); dom_exception dom_attr_get_owner(struct dom_attr *attr, struct dom_element **result); -dom_exception dom_attr_get_type_info(struct dom_attr *attr, +dom_exception dom_attr_get_schema_type_info(struct dom_attr *attr, struct dom_type_info **result); dom_exception dom_attr_is_id(struct dom_attr *attr, bool *result); diff --git a/include/dom/core/element.h b/include/dom/core/element.h new file mode 100644 index 0000000..6ae8b4d --- /dev/null +++ b/include/dom/core/element.h @@ -0,0 +1,78 @@ +/* + * This file is part of libdom. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#ifndef dom_core_element_h_ +#define dom_core_element_h_ + +#include <stdbool.h> + +#include <dom/core/exceptions.h> + +struct dom_attr; +struct dom_element; +struct dom_nodelist; +struct dom_string; +struct dom_type_info; + +dom_exception dom_element_get_tag_name(struct dom_element *element, + struct dom_string **name); + +dom_exception dom_element_get_attribute(struct dom_element *element, + struct dom_string *name, struct dom_string **value); +dom_exception dom_element_set_attribute(struct dom_element *element, + struct dom_string *name, struct dom_string *value); +dom_exception dom_element_remove_attribute(struct dom_element *element, + struct dom_string *name); + +dom_exception dom_element_get_attribute_node(struct dom_element *element, + struct dom_string *name, struct dom_attr **result); +dom_exception dom_element_set_attribute_node(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); +dom_exception dom_element_remove_attribute_node(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); + +dom_exception dom_element_get_elements_by_tag_name( + struct dom_element *element, struct dom_string *name, + struct dom_nodelist **result); + +dom_exception dom_element_get_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + struct dom_string **value); +dom_exception dom_element_set_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *qname, + struct dom_string *value); +dom_exception dom_element_remove_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname); + +dom_exception dom_element_get_attribute_node_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + struct dom_attr **result); +dom_exception dom_element_set_attribute_node_ns(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); + +dom_exception dom_element_get_elements_by_tag_name_ns( + struct dom_element *element, struct dom_string *namespace, + struct dom_string *localname, struct dom_nodelist **result); + +dom_exception dom_element_has_attribute(struct dom_element *element, + struct dom_string *name, bool *result); +dom_exception dom_element_has_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + bool *result); + +dom_exception dom_element_get_schema_type_info(struct dom_element *element, + struct dom_type_info **result); + +dom_exception dom_element_set_id_attribute(struct dom_element *element, + struct dom_string *name, bool is_id); +dom_exception dom_element_set_id_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + bool is_id); +dom_exception dom_element_set_id_attribute_node(struct dom_element *element, + struct dom_attr *id_attr, bool is_id); + +#endif |