MCPcopy Create free account
hub / github.com/WheretIB/nullc / step_push

Method step_push

external/pugixml/pugixml.cpp:6986–7015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 7

starts_withFunction · 0.85
strequalFunction · 0.85
xpath_nodeClass · 0.85
assertFunction · 0.85
nameMethod · 0.80
push_backMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected