Package com.icl.saxon.exslt
Class Sets
java.lang.Object
com.icl.saxon.exslt.Sets
This class implements extension functions in the
http://exslt.org/sets namespace.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeEnumeration
difference
(Context c, NodeEnumeration p1, NodeEnumeration p2) Return the difference of two node-setsstatic NodeEnumeration
distinct
(Context c, NodeEnumeration in) Given a node-set, return a subset that includes only nodes with distinct string-valuesstatic boolean
hasSameNode
(Context c, NodeEnumeration p1, NodeEnumeration p2) Determine whether two node-sets contain at least one node in commonstatic NodeEnumeration
intersection
(Context c, NodeEnumeration p1, NodeEnumeration p2) Return the intersection of two node-setsstatic NodeSetValue
leading
(Context c, NodeEnumeration ns1, NodeEnumeration ns2) Find all the nodes in ns1 that are before the first node in ns2.static NodeSetValue
trailing
(Context c, NodeEnumeration ns1, NodeEnumeration ns2) Find all the nodes in ns1 that are after the first node in ns2.
-
Constructor Details
-
Sets
public Sets()
-
-
Method Details
-
intersection
public static NodeEnumeration intersection(Context c, NodeEnumeration p1, NodeEnumeration 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 NodeEnumeration difference(Context c, NodeEnumeration p1, NodeEnumeration 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
public static boolean hasSameNode(Context c, NodeEnumeration p1, NodeEnumeration p2) throws XPathException 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
-
distinct
Given a node-set, return a subset that includes only nodes with distinct string-values- Throws:
XPathException
-
leading
public static NodeSetValue leading(Context c, NodeEnumeration ns1, NodeEnumeration 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 NodeSetValue trailing(Context c, NodeEnumeration ns1, NodeEnumeration 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
-