public class UnparsedTextLines extends UnparsedTextFunction implements Callable
Constructor and Description |
---|
UnparsedTextLines() |
Modifier and Type | Method and Description |
---|---|
Sequence |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static URI |
getAbsoluteURI(String href,
String baseURI) |
static XPathException |
handleIOError(URI absoluteURI,
IOException ioErr) |
static void |
main(String[] args) |
static CharSequence |
readFile(IntPredicate checker,
Reader reader)
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
|
getAbsoluteURI, getErrorCodePrefix, getSpecialProperties, handleIOError, readFile
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 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 CharSequence readFile(String href, String baseURI, String encoding, XPathContext context) throws XPathException
readFile
in class UnparsedTextFunction
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) throws XPathException
XPathException
public static XPathException handleIOError(URI absoluteURI, IOException ioErr)
public static CharSequence readFile(IntPredicate checker, Reader reader) throws IOException, XPathException
checker
- NameChecker for checking whether characters are valid XML charactersreader
- Reader to be used for reading the fileIOException
- if a failure occurs reading the fileXPathException
- if the file contains illegal charactersCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.