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

## org.apache.xalan.lib
Class ExsltSets

    java.lang.Object
      |
      +--org.apache.xalan.lib.ExsltSets

public class ExsltSets
extends java.lang.Object

This class contains EXSLT set extension functions. It is accessed by specifying a namespace URI as follows:

        xmlns:set="http://exslt.org/sets"

The documentation for each function has been copied from the relevant EXSLT Implementer page.

See Also:
  EXSLT

Constructor Summary
`ExsltSets()`

Method Summary
`static NodeSet` | `difference(NodeIterator ni1, NodeIterator ni2)` The set:difference function returns the difference between two node sets - those nodes that are in the node set passed as the first argument that are not in the node set passed as the second argument.
`static NodeSet` | `distinct(ExpressionContext myContext, NodeIterator ni)` The set:distinct function returns a subset of the nodes contained in the node-set NS passed as the first argument.
`static boolean` | `hasSameNode(NodeIterator ni1, NodeIterator ni2)` The set:has-same-node function returns true if the node set passed as the first argument shares any nodes with the node set passed as the second argument.
`static NodeSet` | `intersection(NodeIterator ni1, NodeIterator ni2)` The set:intersection function returns a node set comprising the nodes that are within both the node sets passed as arguments to it.
`static NodeSet` | `leading(NodeIterator ni1, NodeIterator ni2)` The set:leading function 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.
`static NodeSet` | `trailing(NodeIterator ni1, NodeIterator ni2)` The set:trailing function 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.

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

Constructor Detail

### ExsltSets

    public ExsltSets()

Method Detail

### leading

    public static NodeSet leading(NodeIterator ni1,
                                  NodeIterator ni2)

  The set:leading function 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. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned.
  Parameters:
    `ni1` - NodeIterator for first node-set.
    `ni2` - NodeIterator for second node-set.
  Returns:
    a node-set containing the nodes in ni1 that precede in document order the first node in ni2; an empty node-set if the first node in ni2 is not in ni1; all of ni1 if n12 is empty.
  See Also:
    EXSLT

### trailing

    public static NodeSet trailing(NodeIterator ni1,
                                   NodeIterator ni2)

  The set:trailing function 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. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned.
  Parameters:
    `ni1` - NodeIterator for first node-set.
    `ni2` - NodeIterator for second node-set.
  Returns:
    a node-set containing the nodes in ni1 that follow in document order the first node in ni2; an empty node-set if the first node in ni2 is not in ni1; all of ni1 if ni2 is empty.
  See Also:
    EXSLT

### intersection

    public static NodeSet intersection(NodeIterator ni1,
                                       NodeIterator ni2)
                                throws TransformerException

  The set:intersection function returns a node set comprising the nodes that are within both the node sets passed as arguments to it.
  Parameters:
    `ni1` - NodeIterator for first node-set.
    `ni2` - NodeIterator for second node-set.
  Returns:
    a NodeSet containing the nodes in ni1 that are also in ni2. Note: Already implemented in the xalan namespace.
  See Also:
    EXSLT

### difference

    public static NodeSet difference(NodeIterator ni1,
                                     NodeIterator ni2)
                              throws TransformerException

  The set:difference function returns the difference between two node sets - those nodes that are in the node set passed as the first argument that are not in the node set passed as the second argument.
  Parameters:
    `ni1` - NodeIterator for first node-set.
    `ni2` - NodeIterator for second node-set.
  Returns:
    a NodeSet containing the nodes in ni1 that are not in ni2. Note: Already implemented in the xalan namespace.
  See Also:
    EXSLT

### distinct

    public static NodeSet distinct(ExpressionContext myContext,
                                   NodeIterator ni)
                            throws TransformerException

  The set:distinct function returns a subset of the nodes contained in the node-set NS passed as the first argument. Specifically, it selects a node N if there is no node in NS that has the same string value as N, and that precedes N in document order.
  Parameters:
    `myContext` - Passed in by Xalan extension processor.
    `ni` - NodeIterator for node-set.
  Returns:
    a NodeSet with nodes from ni containing distinct string values. In other words, if more than one node in ni contains the same string value, only include the first such node found. Note: Already implemented in the xalan namespace.
  See Also:
    EXSLT

### hasSameNode

    public static boolean hasSameNode(NodeIterator ni1,
                                      NodeIterator ni2)

  The set:has-same-node function returns true if the node set passed as the first argument shares any nodes with the node set passed as the second argument. If there are no nodes that are in both node sets, then it returns false. The Xalan extensions MethodResolver converts 'has-same-node' to 'hasSameNode'. Note: Not to be confused with hasSameNodes in the Xalan namespace, which returns true if the two node sets contain the exactly the same nodes (perhaps in a different order), otherwise false.
  See Also:
    EXSLT

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

Copyright © 2002 Apache XML Project. All Rights Reserved.