Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.option.exslt
Class Sets

    java.lang.Object
      net.sf.saxon.option.exslt.Sets

    public abstract class Sets

extends Object

This class implements extension functions in the http://exslt.org/sets namespace.

Method Summary
`static SequenceIterator` | `difference(SequenceIterator p1, SequenceIterator p2)` Return the difference of two node-sets (interpreted as sequences of nodes that must be supplied in document order)
`static boolean` | `hasSameNode(SequenceIterator p1, SequenceIterator p2)` Determine whether two node-sets (interpreted as sequences of nodes that must be supplied in document order) contain at least one node in common
`static SequenceIterator` | `intersection(SequenceIterator p1, SequenceIterator p2)` Return the intersection of two node-sets (interpreted as sequences of nodes that must be supplied in document order)
`static 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 context, SequenceIterator ns1, SequenceIterator ns2)` Find all the nodes in ns1 that are after the first node in ns2.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### intersection

    public static SequenceIterator intersection(SequenceIterator p1,
                                                SequenceIterator p2)
                                         throws XPathException

  Return the intersection of two node-sets (interpreted as sequences of nodes that must be supplied in document order)

  Parameters:
    `p1` - The first node-set
    `p2` - 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 (interpreted as sequences of nodes that must be supplied in document order)

  Parameters:
    `p1` - The first node-set
    `p2` - 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(SequenceIterator p1,
                                      SequenceIterator p2)
                               throws XPathException

  Determine whether two node-sets (interpreted as sequences of nodes that must be supplied in document order) contain at least one node in common

  Parameters:
    `p1` - The first node-set
    `p2` - 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. For this function, Saxon does not assume that the two sequences of nodes are supplied in document order.

  Parameters:
    `ns1` - The first node-set
    `ns2` - The second node-set
  Returns:
    the nodes in the node set passed as the first argument that precede, in document order, the first node in the node set passed as the second argument.
  Throws:
    `XPathException`

### trailing

    public static SequenceIterator trailing(XPathContext context,
                                            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,

  Parameters:
    `ns1` - The first node-set
    `ns2` - The second node-set
  Returns:
    the nodes in the node set passed as the first argument that follow, in document order, the first node in the node set passed as the second argument.
  Throws:
    `XPathException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.