public abstract class UnparsedTextFunction extends SystemFunction
Constructor and Description |
---|
UnparsedTextFunction() |
Modifier and Type | Method and Description |
---|---|
static URI |
getAbsoluteURI(String href,
String baseURI,
XPathContext context) |
protected static String |
getErrorCodePrefix(XPathContext context)
Get the prefix of the error code for dynamic errors: "XTDE" for XSLT 2.0, "FOUT" for XPath 3.0
|
int |
getSpecialProperties(Expression[] arguments)
Determine the special properties of this function.
|
static XPathException |
handleIOError(URI absoluteURI,
IOException ioErr,
XPathContext context) |
static CharSequence |
readFile(IntPredicate checker,
Reader reader,
XPathContext context)
Read the contents of an unparsed text file
|
CharSequence |
readFile(String href,
String baseURI,
String encoding,
XPathContext context)
Supporting routine to load one external file given a URI (href) and a baseURI
|
equals, export, exportAttributes, getArity, getCardinality, 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, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheck
getLength, head, 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 functionprotected static String getErrorCodePrefix(XPathContext context)
context
- the dynamic contextpublic CharSequence readFile(String href, String baseURI, String encoding, XPathContext context) throws XPathException
href
- the relative URIbaseURI
- the base URIencoding
- the character encodingcontext
- the XPath dynamic contextXPathException
- if the file cannot be readpublic static URI getAbsoluteURI(String href, String baseURI, XPathContext context) throws XPathException
XPathException
public static XPathException handleIOError(URI absoluteURI, IOException ioErr, XPathContext context)
public static CharSequence readFile(IntPredicate checker, Reader reader, XPathContext context) throws IOException, XPathException
checker
- predicate for checking whether characters are valid XML charactersreader
- Reader to be used for reading the filecontext
- the XPath dynamic contextIOException
- if a failure occurs reading the fileXPathException
- if the file contains illegal charactersCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.