Constructor and Description |
---|
DocumentFn() |
Modifier and Type | Method and Description |
---|---|
Sequence<?> |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static DocumentURI |
computeDocumentKey(java.lang.String href,
java.lang.String baseURI,
PackageData packageData,
javax.xml.transform.URIResolver resolver,
boolean strip)
Compute a document key (an absolute URI that can be used to see if a document is already loaded)
|
protected static DocumentURI |
computeDocumentKey(java.lang.String href,
java.lang.String baseURI,
PackageData packageData,
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(java.lang.String href,
java.lang.String baseURI,
PackageData packageData,
ParseOptions options,
XPathContext c,
Location locator,
boolean silent)
Supporting routine to load one external document given a URI (href) and a baseURI.
|
Expression |
makeFunctionCall(Expression... arguments)
Make an expression that either calls this function, or that is equivalent to a call
on this function
|
static NodeInfo |
preLoadDoc(java.lang.String href,
java.lang.String baseURI,
Configuration config,
javax.xml.transform.SourceLocator locator)
Supporting routine to load one external document given a URI (href) and a baseURI.
|
static javax.xml.transform.Source |
resolveURI(java.lang.String href,
java.lang.String baseURI,
java.lang.String documentKey,
XPathContext context)
Call the URIResolver to resolve a URI
|
static void |
sendDoc(java.lang.String href,
java.lang.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.
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
argumentArray, getGenre
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public int getCardinality(Expression[] arguments)
getCardinality
in class SystemFunction
arguments
- the actual arguments suppliedpublic int getSpecialProperties(Expression[] arguments)
getSpecialProperties
in class SystemFunction
arguments
- the expressions supplied as arguments to the function callpublic Expression makeFunctionCall(Expression... arguments)
SystemFunction
makeFunctionCall
in class SystemFunction
arguments
- the supplied arguments to the function callpublic Sequence<?> call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
call
in interface Function
context
- 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(java.lang.String href, java.lang.String baseURI, PackageData packageData, ParseOptions options, XPathContext c, Location locator, boolean silent) throws XPathException
href
- the relative URIbaseURI
- the base URIpackageData
- the stylesheet (or other) package in which the call appearsoptions
- 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 javax.xml.transform.Source resolveURI(java.lang.String href, java.lang.String baseURI, java.lang.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 contextXPathException
- if the relative URI cannot be resolvedprotected static DocumentURI computeDocumentKey(java.lang.String href, java.lang.String baseURI, PackageData packageData, XPathContext c) throws XPathException
XPathException
public static DocumentURI computeDocumentKey(java.lang.String href, java.lang.String baseURI, PackageData packageData, javax.xml.transform.URIResolver resolver, boolean strip)
href
- the relative URIbaseURI
- the base URIpackageData
- the package in which the call to doc() or document() appears (affects options
such as strip-space)resolver
- the URIResolverstrip
- true if the document is subject to whitespace stripping (typically a source document), false
otherwise (typically a stylesheet module)public static NodeInfo preLoadDoc(java.lang.String href, java.lang.String baseURI, Configuration config, javax.xml.transform.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.XPathException
public static void sendDoc(java.lang.String href, java.lang.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 sentXPathException
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.