| 6984 | } |
| 6985 | |
| 6986 | void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc) |
| 6987 | { |
| 6988 | if (!a) return; |
| 6989 | |
| 6990 | const char_t* name = a.name(); |
| 6991 | |
| 6992 | // There are no attribute nodes corresponding to attributes that declare namespaces |
| 6993 | // That is, "xmlns:..." or "xmlns" |
| 6994 | if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) return; |
| 6995 | |
| 6996 | switch (_test) |
| 6997 | { |
| 6998 | case nodetest_name: |
| 6999 | if (strequal(name, _data.nodetest)) ns.push_back(xpath_node(a, parent), alloc); |
| 7000 | break; |
| 7001 | |
| 7002 | case nodetest_type_node: |
| 7003 | case nodetest_all: |
| 7004 | ns.push_back(xpath_node(a, parent), alloc); |
| 7005 | break; |
| 7006 | |
| 7007 | case nodetest_all_in_namespace: |
| 7008 | if (starts_with(name, _data.nodetest)) |
| 7009 | ns.push_back(xpath_node(a, parent), alloc); |
| 7010 | break; |
| 7011 | |
| 7012 | default: |
| 7013 | ; |
| 7014 | } |
| 7015 | } |
| 7016 | |
| 7017 | void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc) |
| 7018 | { |
nothing calls this directly
no test coverage detected