| 7602 | } |
| 7603 | |
| 7604 | void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc) |
| 7605 | { |
| 7606 | if (!a) return; |
| 7607 | |
| 7608 | const char_t* name = a.name(); |
| 7609 | |
| 7610 | // There are no attribute nodes corresponding to attributes that declare namespaces |
| 7611 | // That is, "xmlns:..." or "xmlns" |
| 7612 | if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) return; |
| 7613 | |
| 7614 | switch (_test) |
| 7615 | { |
| 7616 | case nodetest_name: |
| 7617 | if (strequal(name, _data.nodetest)) ns.push_back(xpath_node(a, parent), alloc); |
| 7618 | break; |
| 7619 | |
| 7620 | case nodetest_type_node: |
| 7621 | case nodetest_all: |
| 7622 | ns.push_back(xpath_node(a, parent), alloc); |
| 7623 | break; |
| 7624 | |
| 7625 | case nodetest_all_in_namespace: |
| 7626 | if (starts_with(name, _data.nodetest)) |
| 7627 | ns.push_back(xpath_node(a, parent), alloc); |
| 7628 | break; |
| 7629 | |
| 7630 | default: |
| 7631 | ; |
| 7632 | } |
| 7633 | } |
| 7634 | |
| 7635 | void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc) |
| 7636 | { |
nothing calls this directly
no test coverage detected