net.sf.saxon.query
class QueryParser extends ExpressionParser
Field Summary | |
---|---|
protected Executable | executable |
Set | importedModules |
List | moduleImports |
List | namespacesToBeSealed |
List | schemaImports |
Constructor Summary | |
---|---|
protected | QueryParser()
Protected Constructor: this class should be instantiated via the StaticQueryContext |
Method Summary | |
---|---|
void | applyModuleImport(QueryParser.Import mImport) |
Executable | getExecutable()
Get the executable containing this expression. |
protected String | getLanguage()
Get the current language (XPath or XQuery) |
protected void | grumble(String message, String errorCode)
Report a static error
|
static Expression | makeStringJoin(Expression exp, StaticContext env)
Make a string-join expression that concatenates the string-values of items in
a sequence with intervening spaces. |
protected StringValue | makeStringLiteral(String token)
Method to make a string literal from a token identified as a string
literal. |
XQueryExpression | makeXQueryExpression(String query, StaticQueryContext staticContext, Configuration config)
Create an XQueryExpression |
protected Expression | parseConstructor()
Parse a node constructor. |
protected Expression | parseExtensionExpression()
Parse an Extension Expression.
|
protected Expression | parseForExpression()
Parse a FLWOR expression. |
void | parseLibraryModule(String queryString, StaticQueryContext env)
Parse a library module.
|
protected Expression | parseTypeswitchExpression()
Parse a Typeswitch Expression.
|
protected Expression | parseValidateExpression()
Parse a Validate Expression.
|
Expression | setDefaultValue(String exp)
Parse the expression (inside a string literal) used to define default values
for external variables. |
void | setExecutable(Executable exec)
Set the executable used for this query expression |
Parameters: message the error message
Throws: net.sf.saxon.trans.StaticError always thrown: an exception containing the supplied message
Parameters: token
Returns: The string value of the string literal, after dereferencing entity and character references
Returns: an Expression for evaluating the parsed constructor
Throws: net.sf.saxon.trans.StaticError in the event of a syntax error.
Returns: the resulting subexpression
Throws: net.sf.saxon.trans.StaticError if any error is encountered
Parameters: queryString The text of the library module. env The static context. The result of parsing a library module is that the static context is populated with a set of function declarations and variable declarations. Each library module must have its own static context objext.
Throws: net.sf.saxon.trans.StaticError if the expression contains a syntax error