|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.ExpressionParser
net.sf.saxon.query.QueryParser
class QueryParser
This class defines extensions to the XPath parser to handle the additional syntax supported in XQuery
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.saxon.expr.ExpressionParser |
|---|
ExpressionParser.ForClause, ExpressionParser.TemporaryContainer |
| Field Summary | |
|---|---|
protected Executable |
executable
|
Set |
importedModules
|
(package private) List |
moduleImports
|
(package private) List |
namespacesToBeSealed
|
(package private) List |
schemaImports
|
| Fields inherited from class net.sf.saxon.expr.ExpressionParser |
|---|
env, language, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN |
| Constructor Summary | |
|---|---|
protected |
QueryParser()
Protected Constructor: this class should be instantiated via the StaticQueryContext |
| Method Summary | |
|---|---|
void |
applyModuleImport(net.sf.saxon.query.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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Executable executable
public Set importedModules
List namespacesToBeSealed
List schemaImports
List moduleImports
| Constructor Detail |
|---|
protected QueryParser()
| Method Detail |
|---|
public XQueryExpression makeXQueryExpression(String query,
StaticQueryContext staticContext,
Configuration config)
throws XPathException
XPathExceptionpublic Executable getExecutable()
public void setExecutable(Executable exec)
public final void parseLibraryModule(String queryString,
StaticQueryContext env)
throws StaticError
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.
StaticError - if the expression contains a syntax error
protected void grumble(String message,
String errorCode)
throws StaticError
grumble in class ExpressionParsermessage - the error messageerrorCode - the error code
StaticError - always thrown: an exception containing the
supplied message
public void applyModuleImport(net.sf.saxon.query.QueryParser.Import mImport)
throws StaticError
StaticErrorpublic Expression setDefaultValue(String exp)
protected Expression parseForExpression()
throws StaticError
parseForExpression in class ExpressionParserStaticError - if any error is encountered
public static Expression makeStringJoin(Expression exp,
StaticContext env)
protected Expression parseTypeswitchExpression()
throws StaticError
parseTypeswitchExpression in class ExpressionParserStaticError
protected Expression parseValidateExpression()
throws StaticError
parseValidateExpression in class ExpressionParserStaticError
protected Expression parseExtensionExpression()
throws StaticError
parseExtensionExpression in class ExpressionParserStaticError
protected Expression parseConstructor()
throws StaticError
parseConstructor in class ExpressionParserStaticError - in the event of a syntax error.
protected StringValue makeStringLiteral(String token)
throws StaticError
makeStringLiteral in class ExpressionParsertoken -
StaticErrorprotected String getLanguage()
getLanguage in class ExpressionParser
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||