net.sf.saxon.functions
Class Collection
java.lang.Object
net.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Collection
- All Implemented Interfaces:
- Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator
- public class Collection
- extends SystemFunction
Implement the fn:collection() function. The Saxon implementation loads an XML
document called the collection catalogue, which acts as an index of the collection.
The structure of this index is:
<collection>
<doc href="doc1.xml">
<doc href="doc2.xml">
<doc href="doc3.xml">
</collection>
The document URIs are resolved relative to the base URI of the doc element
in the catalogue document.
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.functions.SystemFunction |
addContextDocumentArgument, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault |
Methods inherited from class net.sf.saxon.expr.FunctionCall |
checkArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, setArguments, setFunctionNameCode, simplify, simplifyArguments, typeCheck |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, suppressValidation, typeError, typeError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Collection
public Collection()
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
- Description copied from class:
ComputedExpression
- Return an Iterator to iterate over the values of a sequence. The value of every
expression can be regarded as a sequence, so this method is supported for all
expressions. This default implementation handles iteration for expressions that
return singleton values: for non-singleton expressions, the subclass must
provide its own implementation.
- Specified by:
iterate
in interface Expression
- Overrides:
iterate
in class ComputedExpression
- Parameters:
context
- supplies the context for evaluation
- Returns:
- a SequenceIterator that can be used to iterate over the result
of the expression
- Throws:
XPathException
- if any dynamic error occurs evaluating the
expression