|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.query.StaticQueryContext com.saxonica.extra.StaticQueryContextEE
public class StaticQueryContextEE
A version of StaticQueryContext for Saxon-EE, that extends the capability by allowing compilation of library modules.
Constructor Summary | |
---|---|
StaticQueryContextEE(Configuration config)
Create a StaticQueryContext using a given Configuration. |
Method Summary | |
---|---|
QueryLibrary |
compileLibrary(InputStream source,
String encoding)
Prepare an XQuery library module for subsequent evaluation. |
QueryLibrary |
compileLibrary(Reader source)
Prepare an XQuery library module for subsequent evaluation. |
QueryLibrary |
compileLibrary(String query)
Compile an XQuery library module for subsequent evaluation. |
protected QueryParser |
newQueryParser(boolean updating,
String languageVersion)
Get a new QueryParser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticQueryContextEE(Configuration config)
config
- the Saxon ConfigurationMethod Detail |
---|
protected QueryParser newQueryParser(boolean updating, String languageVersion)
newQueryParser
in class StaticQueryContext
updating
- indicates whether or not XQuery update syntax may be used.languageVersion
-
public QueryLibrary compileLibrary(String query) throws XPathException
Note that this interface makes the caller responsible for decoding the query and presenting it as a string of characters. This means it is likely that any encoding specified in the query prolog will be ignored.
compileLibrary
in class StaticQueryContext
query
- The XQuery library module to be compiled, supplied as a string.
XPathException
- if the syntax of the expression is wrong,
or if it references namespaces, variables, or functions that have not been declared,
or contains other static errors.public QueryLibrary compileLibrary(Reader source) throws XPathException, IOException
Note that this interface makes the Reader responsible for decoding the query and presenting it as a stream of characters. This means it is likely that any encoding specified in the query prolog will be ignored. Also, some implementations of Reader cannot handle a byte order mark.
compileLibrary
in class StaticQueryContext
source
- A Reader giving access to the text of the XQuery query to be compiled.
XPathException
- if the syntax of the expression is wrong, or if it references namespaces,
variables, or functions that have not been declared, or any other static error is reported.
IOException
- if a failure occurs reading the supplied input.public QueryLibrary compileLibrary(InputStream source, String encoding) throws XPathException, IOException
compileLibrary
in class StaticQueryContext
source
- An InputStream giving access to the text of the XQuery query to be compiled, as a stream
of octetsencoding
- The encoding used to translate characters to octets in the query source. The parameter
may be null: in this case the query parser attempts to infer the encoding by inspecting the source,
and if that fails, it assumes UTF-8 encoding
XPathException
- if the syntax of the expression is wrong, or if it references namespaces,
variables, or functions that have not been declared, or any other static error is reported.
IOException
- if a failure occurs reading the supplied input.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |