From 5c4f19d1459f71dda7df2496bef1689ccffd1a53 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 24 Mar 2012 21:20:08 +0000 Subject: Only get value for elements with class. svn path=/trunk/libdom/; revision=13627 --- src/core/element.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/element.c b/src/core/element.c index 8b4a7a8..b8e454e 100644 --- a/src/core/element.c +++ b/src/core/element.c @@ -315,6 +315,8 @@ static dom_attr_list * _dom_element_attr_list_node_create(dom_attr *attr, dom_element *ele, dom_string *name, dom_string *namespace) { dom_attr_list *new_list_node; + dom_node_internal *a; + dom_document *doc; if (attr == NULL || name == NULL) return NULL; @@ -329,7 +331,10 @@ static dom_attr_list * _dom_element_attr_list_node_create(dom_attr *attr, new_list_node->name = name; new_list_node->namespace = namespace; - if (namespace == NULL) { + a = (dom_node_internal *) attr; + doc = a->owner; + if (namespace == NULL && + dom_string_isequal(name, doc->class_string)) { dom_string *value; if (DOM_NO_ERR != _dom_attr_get_value(attr, &value)) { -- cgit v1.2.3