|
|||||||||
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
|
java.util.Set |
importedModules
|
(package private) java.util.List |
moduleImports
|
(package private) java.util.List |
namespacesToBeSealed
|
(package private) java.util.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 java.lang.String |
getLanguage()
Get the current language (XPath or XQuery) |
protected void |
grumble(java.lang.String message,
java.lang.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(java.lang.String token)
Method to make a string literal from a token identified as a string literal. |
XQueryExpression |
makeXQueryExpression(java.lang.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(java.lang.String queryString,
StaticQueryContext env)
Parse a library module. |
protected Expression |
parseTypeswitchExpression()
Parse a Typeswitch Expression. |
protected Expression |
parseValidateExpression()
Parse a Validate Expression. |
Expression |
setDefaultValue(java.lang.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 java.util.Set importedModules
java.util.List namespacesToBeSealed
java.util.List schemaImports
java.util.List moduleImports
Constructor Detail |
---|
protected QueryParser()
Method Detail |
---|
public XQueryExpression makeXQueryExpression(java.lang.String query, StaticQueryContext staticContext, Configuration config) throws XPathException
XPathException
public Executable getExecutable()
public void setExecutable(Executable exec)
public final void parseLibraryModule(java.lang.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 errorprotected void grumble(java.lang.String message, java.lang.String errorCode) throws StaticError
grumble
in class ExpressionParser
message
- the error messageerrorCode
- the error code
StaticError
- always thrown: an exception containing the
supplied messagepublic void applyModuleImport(net.sf.saxon.query.QueryParser.Import mImport) throws StaticError
StaticError
public Expression setDefaultValue(java.lang.String exp)
protected Expression parseForExpression() throws StaticError
parseForExpression
in class ExpressionParser
StaticError
- if any error is encounteredpublic static Expression makeStringJoin(Expression exp, StaticContext env)
protected Expression parseTypeswitchExpression() throws StaticError
parseTypeswitchExpression
in class ExpressionParser
StaticError
protected Expression parseValidateExpression() throws StaticError
parseValidateExpression
in class ExpressionParser
StaticError
protected Expression parseExtensionExpression() throws StaticError
parseExtensionExpression
in class ExpressionParser
StaticError
protected Expression parseConstructor() throws StaticError
parseConstructor
in class ExpressionParser
StaticError
- in the event of a syntax error.protected StringValue makeStringLiteral(java.lang.String token) throws StaticError
makeStringLiteral
in class ExpressionParser
token
-
StaticError
protected java.lang.String getLanguage()
getLanguage
in class ExpressionParser
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |