|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.query.QueryReader
This class contains static methods used to read a query as a byte stream, infer the encoding if necessary, and return the text of the query as a string; also methods to import functions and variables from one module into another, and check their consistency.
Method Summary | |
static void |
importModuleContents(StaticQueryContext importedModule,
StaticQueryContext thisModule)
Check the types used in the functions and variables in an imported module |
static java.lang.String |
readEncoding(java.io.InputStream is)
Read an input stream non-destructively to determine the encoding from the Query Prolog |
static java.lang.String |
readInputStream(java.io.InputStream is,
java.lang.String encoding,
NameChecker nameChecker)
Read a query from an InputStream. |
static java.lang.String |
readSourceQuery(javax.xml.transform.stream.StreamSource ss,
NameChecker nameChecker)
Read a query module given a StreamSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String readSourceQuery(javax.xml.transform.stream.StreamSource ss, NameChecker nameChecker) throws StaticError
ss
- the supplied StreamSource. This must contain a non-null systemID which defines the base
URI of the query module, and either an InputStream or a Reader containing the query text. In the
case of an InputStream the method attempts to infer the encoding; in the case of a Reader, this has
already been done, and the encoding specified within the query itself is ignored.
StaticError
public static java.lang.String readEncoding(java.io.InputStream is) throws StaticError
is
- the input stream: this must satisfy the precondition is.markSupported() = true.
StaticError
- if the input stream cannot be readpublic static java.lang.String readInputStream(java.io.InputStream is, java.lang.String encoding, NameChecker nameChecker) throws StaticError
is
- the input streamencoding
- the encoding, or null if the encoding is unknownnameChecker
- the nameChecker to be used for checking characters
StaticError
public static void importModuleContents(StaticQueryContext importedModule, StaticQueryContext thisModule) throws StaticError
importedModule
- the imported modulethisModule
- thus module
StaticError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |