Class Document
java.lang.Object
net.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Document
- All Implemented Interfaces:
Serializable, SourceLocator, Container, Expression, XSLTFunction, InstructionInfoProvider
Implements the XSLT document() function
- See Also:
-
Field Summary
Fields inherited from class SystemFunction
operationFields inherited from class FunctionCall
argumentFields inherited from class ComputedExpression
locationId, staticPropertiesFields inherited from interface Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod called during static type checkingintDetermine the static cardinalityintGet the static properties of this expression (other than its type).iterate(XPathContext context) iterate() handles evaluation of the function: it returns a sequence of Document nodesstatic NodeInfomakeDoc(String href, String baseURL, XPathContext c, SourceLocator locator) Supporting routine to load one external document given a URI (href) and a baseURIpreEvaluate(StaticContext env) preEvaluate: this method suppresses compile-time evaluation by doing nothingstatic voidsendDoc(String href, String baseURL, XPathContext c, SourceLocator locator, Receiver out) Supporting routine to push one external document given a URI (href) and a baseURI to a given Receiver.voidsendDocuments(XPathContext context, Receiver out) Copy the documents identified by this expression to a given Receiver.Methods inherited from class SystemFunction
addContextDocumentArgument, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefaultMethods inherited from class FunctionCall
checkArgumentCount, getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, simplifyArguments, typeCheckMethods inherited from class ComputedExpression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, 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, setParentExpression, suppressValidation, typeError
-
Constructor Details
-
Document
public Document()
-
-
Method Details
-
checkArguments
Description copied from class:SystemFunctionMethod called during static type checking- Overrides:
checkArgumentsin classSystemFunction- Throws:
XPathException
-
computeCardinality
public int computeCardinality()Determine the static cardinality- Overrides:
computeCardinalityin classSystemFunction
-
computeSpecialProperties
public int computeSpecialProperties()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:
computeSpecialPropertiesin classSystemFunction
-
preEvaluate
preEvaluate: this method suppresses compile-time evaluation by doing nothing- Overrides:
preEvaluatein classFunctionCall
-
iterate
iterate() handles evaluation of the function: it returns a sequence of Document nodes- Specified by:
iteratein interfaceExpression- Overrides:
iteratein classComputedExpression- 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
-
makeDoc
public static NodeInfo makeDoc(String href, String baseURL, XPathContext c, SourceLocator locator) throws XPathException Supporting routine to load one external document given a URI (href) and a baseURI- Throws:
XPathException
-
sendDocuments
Copy the documents identified by this expression to a given Receiver. This method is used only when it is known that the documents are being copied, because there is then no problem about node identity.- Throws:
XPathException
-
sendDoc
public static void sendDoc(String href, String baseURL, XPathContext c, SourceLocator locator, Receiver out) throws XPathException Supporting routine to push one external document given a URI (href) and a baseURI to a given Receiver. This method cannot handle fragment identifiers- Throws:
XPathException
-