public abstract class UnparsedTextFunction extends SystemFunction
Constructor and Description |
---|
UnparsedTextFunction() |
Modifier and Type | Method and Description |
---|---|
static java.net.URI |
getAbsoluteURI(java.lang.String href,
java.lang.String baseURI,
XPathContext context) |
int |
getSpecialProperties(Expression[] arguments)
Determine the special properties of this function.
|
static XPathException |
handleIOError(java.net.URI absoluteURI,
java.io.IOException ioErr,
XPathContext context) |
static java.lang.CharSequence |
readFile(IntPredicate checker,
java.io.Reader reader)
Read the contents of an unparsed text file
|
static java.lang.CharSequence |
readFile(java.net.URI absoluteURI,
java.lang.String encoding,
XPathContext context)
Supporting routine to load one external file given a URI (href) and a baseURI
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
getLength, head, isStreamed, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public int getSpecialProperties(Expression[] arguments)
SystemFunction
getSpecialProperties
in class SystemFunction
arguments
- the actual arguments supplied in a call to the functionpublic static java.lang.CharSequence readFile(java.net.URI absoluteURI, java.lang.String encoding, XPathContext context) throws XPathException
absoluteURI
- the absolutized URIencoding
- the character encodingcontext
- the XPath dynamic contextXPathException
- if the file cannot be readpublic static java.net.URI getAbsoluteURI(java.lang.String href, java.lang.String baseURI, XPathContext context) throws XPathException
XPathException
public static XPathException handleIOError(java.net.URI absoluteURI, java.io.IOException ioErr, XPathContext context)
public static java.lang.CharSequence readFile(IntPredicate checker, java.io.Reader reader) throws java.io.IOException, XPathException
checker
- predicate for checking whether characters are valid XML charactersreader
- Reader to be used for reading the filecontext
- the XPath dynamic contextjava.io.IOException
- if a failure occurs reading the fileXPathException
- if the file contains illegal charactersCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.