| java.lang.Object net.sf.saxon.query.QueryReader
QueryReader | public class QueryReader (Code) | | 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.
|
checkSchemaNamespaceImported | static void checkSchemaNamespaceImported(StaticQueryContext env, int fingerprint, Declaration declaration) throws StaticError(Code) | | Check that the namespace of a given name is the namespace of an imported schema
|
readEncoding | public static String readEncoding(InputStream is) throws StaticError(Code) | | Read an input stream non-destructively to determine the encoding from the Query Prolog
Parameters: is - the input stream: this must satisfy the precondition is.markSupported() = true. the encoding to be used: defaults to UTF-8 if no encoding was specified explicitlyin the query prolog throws: StaticError - if the input stream cannot be read |
readInputStream | public static String readInputStream(InputStream is, String encoding, NameChecker nameChecker) throws StaticError(Code) | | Read a query from an InputStream. The method checks that all characters are valid XML
characters, and also performs normalization of line endings.
Parameters: is - the input stream Parameters: encoding - the encoding, or null if the encoding is unknown Parameters: nameChecker - the nameChecker to be used for checking characters the content of the InputStream as a string |
readSourceQuery | public static String readSourceQuery(StreamSource ss, NameChecker nameChecker) throws StaticError(Code) | | Read a query module given a StreamSource
Parameters: ss - the supplied StreamSource. This must contain a non-null systemID which defines the baseURI of the query module, and either an InputStream or a Reader containing the query text. In thecase of an InputStream the method attempts to infer the encoding; in the case of a Reader, this hasalready been done, and the encoding specified within the query itself is ignored. |
|
|