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

Function xmlXPathTrailing

ThirdParty/libxml2/vtklibxml2/xpath.c:3878–3888  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3876 * an empty node-set if @nodes1 doesn't contain @nodes2
3877 */
3878xmlNodeSetPtr
3879xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
3880 if (xmlXPathNodeSetIsEmpty(nodes2))
3881 return(nodes1);
3882 if (xmlXPathNodeSetIsEmpty(nodes1))
3883 return(xmlXPathNodeSetCreate(NULL));
3884 xmlXPathNodeSetSort(nodes1);
3885 xmlXPathNodeSetSort(nodes2);
3886 return(xmlXPathNodeTrailingSorted(nodes1,
3887 xmlXPathNodeSetItem(nodes2, 0)));
3888}
3889
3890/************************************************************************
3891 * *

Callers

nothing calls this directly

Calls 3

xmlXPathNodeSetCreateFunction · 0.85
xmlXPathNodeSetSortFunction · 0.85

Tested by

no test coverage detected