| 8736 | } |
| 8737 | |
| 8738 | bool step_push(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* parent, xpath_allocator* alloc) |
| 8739 | { |
| 8740 | assert(a); |
| 8741 | |
| 8742 | const char_t* name = a->name ? a->name : PUGIXML_TEXT(""); |
| 8743 | |
| 8744 | switch (_test) |
| 8745 | { |
| 8746 | case nodetest_name: |
| 8747 | if (strequal(name, _data.nodetest) && is_xpath_attribute(name)) |
| 8748 | { |
| 8749 | ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc); |
| 8750 | return true; |
| 8751 | } |
| 8752 | break; |
| 8753 | |
| 8754 | case nodetest_type_node: |
| 8755 | case nodetest_all: |
| 8756 | if (is_xpath_attribute(name)) |
| 8757 | { |
| 8758 | ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc); |
| 8759 | return true; |
| 8760 | } |
| 8761 | break; |
| 8762 | |
| 8763 | case nodetest_all_in_namespace: |
| 8764 | if (starts_with(name, _data.nodetest) && is_xpath_attribute(name)) |
| 8765 | { |
| 8766 | ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc); |
| 8767 | return true; |
| 8768 | } |
| 8769 | break; |
| 8770 | |
| 8771 | default: |
| 8772 | ; |
| 8773 | } |
| 8774 | |
| 8775 | return false; |
| 8776 | } |
| 8777 | |
| 8778 | bool step_push(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc) |
| 8779 | { |
nothing calls this directly
no test coverage detected