Package net.sf.saxon.exslt
Class Sets
java.lang.Object
net.sf.saxon.exslt.Sets
This class implements extension functions in the
http://exslt.org/sets namespace.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SequenceIterator
Return the difference of two node-setsstatic boolean
Determine whether two node-sets contain at least one node in commonstatic SequenceIterator
Return the intersection of two node-setsstatic SequenceIterator
leading
(XPathContext context, SequenceIterator ns1, SequenceIterator ns2) Find all the nodes in ns1 that are before the first node in ns2.static SequenceIterator
trailing
(XPathContext c, SequenceIterator ns1, SequenceIterator ns2) Find all the nodes in ns1 that are after the first node in ns2.
-
Method Details
-
intersection
public static SequenceIterator intersection(SequenceIterator p1, SequenceIterator p2) throws XPathException Return the intersection of two node-sets- Parameters:
p1
- The first node-setp2
- The second node-set- Returns:
- A node-set containing all nodes that are in both p1 and p2
- Throws:
XPathException
-
difference
public static SequenceIterator difference(SequenceIterator p1, SequenceIterator p2) throws XPathException Return the difference of two node-sets- Parameters:
p1
- The first node-setp2
- The second node-set- Returns:
- A node-set containing all nodes that are in p1 and not in p2
- Throws:
XPathException
-
hasSameNode
Determine whether two node-sets contain at least one node in common- Parameters:
p1
- The first node-setp2
- The second node-set- Returns:
- true if p1 and p2 contain at least one node in common (i.e. if the intersection is not empty)
- Throws:
XPathException
-
leading
public static SequenceIterator leading(XPathContext context, SequenceIterator ns1, SequenceIterator ns2) throws XPathException Find all the nodes in ns1 that are before the first node in ns2. Return empty set if ns2 is empty,- Throws:
XPathException
-
trailing
public static SequenceIterator trailing(XPathContext c, SequenceIterator ns1, SequenceIterator ns2) throws XPathException Find all the nodes in ns1 that are after the first node in ns2. Return empty set if ns2 is empty,- Throws:
XPathException
-