| 8358 | } |
| 8359 | |
| 8360 | void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc) |
| 8361 | { |
| 8362 | if (!a) |
| 8363 | return; |
| 8364 | |
| 8365 | const char_t* name = a.name(); |
| 8366 | |
| 8367 | // There are no attribute nodes corresponding to attributes that declare namespaces |
| 8368 | // That is, "xmlns:..." or "xmlns" |
| 8369 | if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) |
| 8370 | return; |
| 8371 | |
| 8372 | switch (_test) |
| 8373 | { |
| 8374 | case nodetest_name: |
| 8375 | if (strequal(name, _data.nodetest)) |
| 8376 | ns.push_back(xpath_node(a, parent), alloc); |
| 8377 | break; |
| 8378 | |
| 8379 | case nodetest_type_node: |
| 8380 | case nodetest_all: ns.push_back(xpath_node(a, parent), alloc); break; |
| 8381 | |
| 8382 | case nodetest_all_in_namespace: |
| 8383 | if (starts_with(name, _data.nodetest)) |
| 8384 | ns.push_back(xpath_node(a, parent), alloc); |
| 8385 | break; |
| 8386 | |
| 8387 | default:; |
| 8388 | } |
| 8389 | } |
| 8390 | |
| 8391 | void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc) |
| 8392 | { |
nothing calls this directly
no test coverage detected