public abstract class UnparsedTextFunction extends SystemFunctionCall implements Callable
operation
argument
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD
Constructor and Description |
---|
UnparsedTextFunction() |
Modifier and Type | Method and Description |
---|---|
void |
checkArguments(ExpressionVisitor visitor)
Method called during static type checking
|
int |
computeSpecialProperties()
Determine the special properties of this expression.
|
static java.net.URI |
getAbsoluteURI(java.lang.String href,
java.lang.String baseURI,
XPathContext context) |
protected static java.lang.String |
getErrorCodePrefix(XPathContext context)
Get the prefix of the error code for dynamic errors: "XTDE" for XSLT 2.0, "FOUT" for XPath 3.0
|
java.lang.String |
getExpressionBaseURI()
getExpressionBaseURI: this method returns the expression base URI
|
static XPathException |
handleIOError(java.net.URI absoluteURI,
java.io.IOException ioErr,
XPathContext context) |
Expression |
preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
|
static java.lang.CharSequence |
readFile(IntPredicate checker,
java.io.Reader reader,
XPathContext context)
Read the contents of an unparsed text file
|
java.lang.CharSequence |
readFile(java.lang.String href,
java.lang.String baseURI,
java.lang.String encoding,
XPathContext context)
Supporting routine to load one external file given a URI (href) and a baseURI
|
addContextDocumentArgument, addDocToPathMap, bindStaticContext, computeCardinality, copy, equalOrNull, equals, getContextNode, getConvertingCallable, getDefaultArgumentNode, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getImplementationMethod, getItemType, getOperation, getOriginalArity, getRequiredType, makeSystemFunction, operands, optimize, setDetails, setOriginalArity, toShortString, useContextItemAsDefault
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, promote, replaceOperand, setArguments, setFunctionName, simplifyArguments, toString, typeCheck
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getConfiguration, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExpressionCompiler, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLocationId, getObjectName, getPosture, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, setPostureAndSweep, simplify, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeError, unordered
public void checkArguments(ExpressionVisitor visitor) throws XPathException
SystemFunctionCall
checkArguments
in class SystemFunctionCall
visitor
- the expression visitorXPathException
- if the arguments are incorrectpublic java.lang.String getExpressionBaseURI()
public Expression preEvaluate(ExpressionVisitor visitor)
preEvaluate
in class FunctionCall
visitor
- an expression visitorpublic int computeSpecialProperties()
SystemFunctionCall
computeSpecialProperties
in class SystemFunctionCall
protected static java.lang.String getErrorCodePrefix(XPathContext context)
context
- the dynamic contextpublic java.lang.CharSequence readFile(java.lang.String href, java.lang.String baseURI, java.lang.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 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, XPathContext context) 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-2014 Saxonica Limited. All rights reserved.