net.sf.saxon.functions

Class UnparsedText

public class UnparsedText extends SystemFunction

Field Summary
StringexpressionBaseURI
static intUNPARSED_TEXT
static intUNPARSED_TEXT_AVAILABLE
Method Summary
voidcheckArguments(ExpressionVisitor visitor)
ItemevaluateItem(XPathContext context)
This method handles evaluation of the function: it returns a StringValue in the case of unparsed-text(), or a BooleanValue in the case of unparsed-text-available()
static voidmain(String[] args)
ExpressionpreEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
static CharSequencereadFile(NameChecker checker, Reader reader)
Read the contents of an unparsed text file

Field Detail

expressionBaseURI

String expressionBaseURI

UNPARSED_TEXT

public static final int UNPARSED_TEXT

UNPARSED_TEXT_AVAILABLE

public static final int UNPARSED_TEXT_AVAILABLE

Method Detail

checkArguments

public void checkArguments(ExpressionVisitor visitor)

evaluateItem

public Item evaluateItem(XPathContext context)
This method handles evaluation of the function: it returns a StringValue in the case of unparsed-text(), or a BooleanValue in the case of unparsed-text-available()

main

public static void main(String[] args)

preEvaluate

public Expression preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

Parameters: visitor an expression visitor

readFile

public static CharSequence readFile(NameChecker checker, Reader reader)
Read the contents of an unparsed text file

Parameters: checker NameChecker for checking whether characters are valid XML characters reader Reader to be used for reading the file

Returns: a CharSequence representing the contents of the file

Throws: IOException if a failure occurs reading the file XPathException if the file contains illegal characters