* 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
| 3876 | * an empty node-set if @nodes1 doesn't contain @nodes2 |
| 3877 | */ |
| 3878 | xmlNodeSetPtr |
| 3879 | xmlXPathTrailing (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 | * * |
nothing calls this directly
no test coverage detected