MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPathLeading

Function xmlXPathLeading

ThirdParty/libxml2/vtklibxml2/xpath.c:3770–3780  ·  view source on GitHub ↗

* xmlXPathLeading: * @nodes1: a node-set * @nodes2: a node-set * * Implements the EXSLT - Sets leading() function: * node-set set:leading (node-set, node-set) * @nodes1 and @nodes2 are sorted by document order, then * #exslSetsLeadingSorted is called. * * Returns the nodes in @nodes1 that precede the first node in @nodes2 * in document order, @nodes1 if @nodes2 is NULL or em

Source from the content-addressed store, hash-verified

3768 * an empty node-set if @nodes1 doesn't contain @nodes2
3769 */
3770xmlNodeSetPtr
3771xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
3772 if (xmlXPathNodeSetIsEmpty(nodes2))
3773 return(nodes1);
3774 if (xmlXPathNodeSetIsEmpty(nodes1))
3775 return(xmlXPathNodeSetCreate(NULL));
3776 xmlXPathNodeSetSort(nodes1);
3777 xmlXPathNodeSetSort(nodes2);
3778 return(xmlXPathNodeLeadingSorted(nodes1,
3779 xmlXPathNodeSetItem(nodes2, 1)));
3780}
3781
3782/**
3783 * xmlXPathNodeTrailingSorted:

Callers

nothing calls this directly

Calls 3

xmlXPathNodeSetCreateFunction · 0.85
xmlXPathNodeSetSortFunction · 0.85

Tested by

no test coverage detected