## net.sf.saxon.functions
Class Collection

    java.lang.Object
      net.sf.saxon.expr.Expression
          net.sf.saxon.expr.FunctionCall
              net.sf.saxon.functions.SystemFunction
                  net.sf.saxon.functions.Collection

All Implemented Interfaces:
  Serializable, SourceLocator, Container, EvaluableItem, SequenceIterable, InstructionInfoProvider

    public class Collection

extends SystemFunction

Implement the fn:collection() function. This is responsible for calling the registered `CollectionURIResolver`. For the effect of the default system-supplied CollectionURIResolver, see `StandardCollectionURIResolver`

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Constructor Summary
`Collection()`

Method Summary
`void` `checkArguments(StaticContext env)` Method called during static type checking
`static SequenceIterator` `getResolverResults(SequenceIterator iter, String baseURI, XPathContext context, SourceLocator locator)`
`String` `getStaticBaseURI()`
`SequenceIterator` `iterate(XPathContext context)` Iterate over the contents of the collection
`Expression` `preEvaluate(StaticContext env)` preEvaluate: this method suppresses compile-time evaluation by doing nothing

Methods inherited from class net.sf.saxon.functions.SystemFunction
`computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, main, makeSystemFunction, optimize, setDetails`

Methods inherited from class net.sf.saxon.expr.FunctionCall
`getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, typeCheck`

Methods inherited from class net.sf.saxon.expr.Expression

`adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getContainingProcedure, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation`

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

Constructor Detail

### Collection

    public Collection()

Method Detail

### getStaticBaseURI

    public String getStaticBaseURI()

### checkArguments

    public void checkArguments(StaticContext env)
                        throws XPathException

  Description copied from class: `SystemFunction`
  Method called during static type checking

  Overrides:
    `checkArguments` in class `SystemFunction`
  Throws:
    `XPathException`

### preEvaluate

    public Expression preEvaluate(StaticContext env)

  preEvaluate: this method suppresses compile-time evaluation by doing nothing

  Overrides:
    `preEvaluate` in class `FunctionCall`

### iterate

    public SequenceIterator iterate(XPathContext context)
                             throws XPathException

  Iterate over the contents of the collection

  Specified by:
    `iterate` in interface `SequenceIterable`
  Overrides:
    `iterate` in class `Expression`
  Parameters:
    `context` - the dynamic context
  Returns:
    an iterator, whose items will always be nodes (typically but not necessarily document nodes)
  Throws:
    `XPathException`

### getResolverResults

    public static SequenceIterator getResolverResults(SequenceIterator iter,
                                                      String baseURI,
                                                      XPathContext context,
                                                      SourceLocator locator)

Copyright (C) Michael H. Kay. All rights reserved.