public class DocumentFn extends SystemFunction implements Callable
| Constructor and Description |
|---|
DocumentFn() |
| Modifier and Type | Method and Description |
|---|---|
Sequence |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static DocumentURI |
computeDocumentKey(String href,
String baseURI,
URIResolver resolver)
Compute a document key (an absolute URI that can be used to see if a document is already loaded)
|
protected static DocumentURI |
computeDocumentKey(String href,
String baseURI,
XPathContext c)
Compute a document key
|
int |
getCardinality(Expression[] arguments)
Determine the static cardinality
|
int |
getSpecialProperties(Expression[] arguments)
Get the static properties of this expression (other than its type).
|
static NodeInfo |
makeDoc(String href,
String baseURI,
ParseOptions options,
XPathContext c,
Location locator,
boolean silent)
Supporting routine to load one external document given a URI (href) and a baseURI.
|
static NodeInfo |
preLoadDoc(String href,
String baseURI,
Configuration config,
SourceLocator locator)
Supporting routine to load one external document given a URI (href) and a baseURI.
|
static Source |
resolveURI(String href,
String baseURI,
String documentKey,
XPathContext context)
Call the URIResolver to resolve a URI
|
static void |
sendDoc(String href,
String baseURL,
XPathContext c,
Location locator,
Receiver out,
ParseOptions parseOptions)
Supporting routine to push one external document given a URI (href) and a baseURI to a given Receiver.
|
void |
sendDocuments(XPathContext context,
Expression[] args,
Receiver out)
Copy the documents identified by this expression to a given Receiver.
|
equals, export, exportAttributes, getArity, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getExpressionCompiler, getFunctionItemType, getFunctionName, getIntegerBounds, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, getStreamingAdjunct, importAttributes, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCalleratomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheckgetLength, head, itemAt, iterate, reduce, subsequenceclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLength, head, itemAt, reduce, subsequencepublic int getCardinality(Expression[] arguments)
getCardinality in class SystemFunctionarguments - the actual arguments suppliedpublic int getSpecialProperties(Expression[] arguments)
getSpecialProperties in class SystemFunctionarguments - public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
call in interface Callablecall in interface Functioncontext - the dynamic evaluation contextarguments - the values of the arguments, supplied as SequenceIteratorsXPathException - if a dynamic error occurs during the evaluation of the expressionpublic static NodeInfo makeDoc(String href, String baseURI, ParseOptions options, XPathContext c, Location locator, boolean silent) throws XPathException
href - the relative URIbaseURI - the base URIoptions - parse options to be used. May be null.c - the dynamic XPath contextlocator - used to identify the location of the instruction in event of errorsilent - if true, errors should not be notified to the ErrorListener @return the root of the constructed document, or the selected element within the document
if a fragment identifier was suppliedXPathException - if reading or parsing the document failspublic static Source resolveURI(String href, String baseURI, String documentKey, XPathContext context) throws XPathException
href - the supplied relative URI, stripped of any fragment identifierbaseURI - the base URIdocumentKey - the absolute URI if already available, or null otherwisecontext - the dynamic contextXPathExceptionprotected static DocumentURI computeDocumentKey(String href, String baseURI, XPathContext c) throws XPathException
XPathExceptionpublic static DocumentURI computeDocumentKey(String href, String baseURI, URIResolver resolver) throws XPathException
href - the relative URIbaseURI - the base URIresolver - the URIResolverXPathExceptionpublic static NodeInfo preLoadDoc(String href, String baseURI, Configuration config, SourceLocator locator) throws XPathException
href - the relative URI. This must not contain a fragment identifierbaseURI - the base URIconfig - the Saxon configurationlocator - used to identify the location of the instruction in event of error. May be null.XPathExceptionpublic void sendDocuments(XPathContext context, Expression[] args, Receiver out) throws XPathException
context - the XPath dynamic contextargs - the arguments to the document() functionout - the destination to which the documents will be sentXPathExceptionpublic static void sendDoc(String href, String baseURL, XPathContext c, Location locator, Receiver out, ParseOptions parseOptions) throws XPathException
href - the relative URIbaseURL - the base URIc - the XPath dynamic contextlocator - used to identify the lcoation of the instruction in case of errorout - the destination where the document is to be sentXPathExceptionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.