Package net.sf.saxon.functions

## Class SuperId

- java.lang.Object
- - net.sf.saxon.functions.AbstractFunction
  - - net.sf.saxon.functions.SystemFunction
    - - net.sf.saxon.functions.SuperId

- All Implemented Interfaces:
    `Callable`, `Function`, `GroundedValue`, `Item`, `Sequence`
  Direct Known Subclasses:
    `SuperId.ElementWithId`, `SuperId.Id`

      public abstract class SuperId
      extends SystemFunction

  The XPath id() or element-with-id() function XPath 2.0 version: accepts any sequence as the first parameter; each item in the sequence is taken as an IDREFS value, that is, a space-separated list of ID values. Also accepts an optional second argument to identify the target document, this defaults to the context node.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `SuperId.ElementWithId` |
    `static class` | `SuperId.Id` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `ELEMENT_WITH_ID` |
    `static int` | `ID` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SuperId()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Sequence` | `call​(XPathContext context, Sequence[] arguments)` | Evaluate the expression
    `static SequenceIterator` | `getIdMultiple​(TreeInfo doc, SequenceIterator idrefs, int operation)` | Get an iterator over the nodes that have an id equal to one of the values is a set of whitespace separated strings
    `static SequenceIterator` | `getIdSingle​(TreeInfo doc, java.lang.String idrefs, int operation)` | Get an iterator over the nodes that have an id equal to one of the values is a whitespace separated string
    `abstract int` | `getOp()` |
    `int` | `getSpecialProperties​(Expression[] arguments)` | Get the static properties of this expression (other than its type).

    - ### Methods inherited from class net.sf.saxon.functions.SystemFunction

      `dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller`

    - ### Methods inherited from class net.sf.saxon.functions.AbstractFunction

      `atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.Function

      `getGenre`

    - ### Methods inherited from interface net.sf.saxon.om.GroundedValue

      `asIterable, concatenate, containsNode, materialize`

    - ### Methods inherited from interface net.sf.saxon.om.Item

      `getLength, head, isStreamed, itemAt, iterate, reduce, subsequence`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `makeRepeatable`

- - ### Field Detail

    - #### ID

          public static final int ID

      See Also:
        Constant Field Values

    - #### ELEMENT_WITH_ID

          public static final int ELEMENT_WITH_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SuperId

          public SuperId()

  - ### Method Detail

    - #### getOp

          public abstract int getOp()

    - #### getSpecialProperties

          public int getSpecialProperties​(Expression[] arguments)

      Get the static properties of this expression (other than its type). The result is bit-signficant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.
      Overrides:
        `getSpecialProperties` in class `SystemFunction`
      Parameters:
        `arguments` - the actual arguments to the call

    - #### getIdSingle

          public static SequenceIterator getIdSingle​(TreeInfo doc,
                                                     java.lang.String idrefs,
                                                     int operation)
                                              throws XPathException

      Get an iterator over the nodes that have an id equal to one of the values is a whitespace separated string
      Parameters:
        `doc` - The document to be searched
        `idrefs` - a string containing zero or more whitespace-separated ID values to be found in the document
        `operation` - either `ID` or `ELEMENT_WITH_ID`
      Returns:
        an iterator over the nodes whose ID is one of the specified values
      Throws:
        `XPathException` - if an error occurs

    - #### getIdMultiple

          public static SequenceIterator getIdMultiple​(TreeInfo doc,
                                                       SequenceIterator idrefs,
                                                       int operation)
                                                throws XPathException

      Get an iterator over the nodes that have an id equal to one of the values is a set of whitespace separated strings
      Parameters:
        `doc` - The document to be searched
        `idrefs` - an iterator over a set of strings each of which is a string containing zero or more whitespace-separated ID values to be found in the document
        `operation` - distinguishes id() and element-with-id()
      Returns:
        an iterator over the nodes whose ID is one of the specified values
      Throws:
        `XPathException` - if an error occurs

    - #### call

          public Sequence call​(XPathContext context,
                               Sequence[] arguments)
                        throws XPathException

      Evaluate the expression
      Parameters:
        `context` - the dynamic evaluation context
        `arguments` - the values of the arguments, supplied as SequenceIterators
      Returns:
        the result of the evaluation, in the form of a SequenceIterator
      Throws:
        `XPathException` - if a dynamic error occurs during the evaluation of the expression