|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.ExpressionParser net.sf.saxon.query.QueryParser com.saxonica.query11.Query11Parser
public class Query11Parser
Parser extension for new syntax in XQuery 1.1. Note this cannot currently be used at the same time as the XQuery Update extensions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.saxon.query.QueryParser |
---|
QueryParser.LetClause |
Nested classes/interfaces inherited from class net.sf.saxon.expr.ExpressionParser |
---|
ExpressionParser.FLWORClause, ExpressionParser.ForClause, ExpressionParser.TemporaryContainer |
Field Summary |
---|
Fields inherited from class net.sf.saxon.query.QueryParser |
---|
executable, importedModules, queryVersion |
Fields inherited from class net.sf.saxon.expr.ExpressionParser |
---|
compileWithTracing, defaultContainer, env, language, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN |
Constructor Summary | |
---|---|
Query11Parser()
|
Method Summary | |
---|---|
protected Binding |
findRangeVariable(StructuredQName qName)
Locate a range variable with a given name. |
int |
getPermittedFunctions()
Get the permitted set of standard functions in this environment |
protected boolean |
isNamespaceTestAllowed()
Ask whether the syntax namespace-node() is allowed in a node kind test. |
QueryParser |
newParser()
Create a new parser of the same kind |
protected void |
parseContextItemDeclaration()
Parse a context item declaration. |
protected void |
parseDecimalFormatDeclaration()
Parse a named decimal format declaration. |
protected void |
parseDefaultDecimalFormat()
Parse a default decimal format declaration "declare" "default" "decimal-format" (property "=" string-literal)* |
protected Expression |
parseDynamicFunctionCall(Expression functionItem)
Parse a dynamic function call |
ItemType |
parseFunctionItemType()
Parse the item type used for function items (XQuery 1.1 higher order functions) Syntax: function '(' (SeqType (',' SeqType)*)? ')' ('as' SeqType)? |
protected void |
parseGroupByClause(List clauseList)
Parse a Group By clause. |
protected Expression |
parseInlineFunction()
Parse an inline function "function" "(" ParamList? ")" ("as" SequenceType)? EnclosedExpr On entry, "function (" has already been read |
protected Expression |
parseLiteralFunctionItem()
Parse a literal function item (introduced in XQuery 1.1) Syntax: QName # integer The QName and # have already been read |
protected Expression |
parseNamedNamespaceConstructor(int offset)
Parse a namespace node constructor of the form namespace name { expr } |
protected Expression |
parseNamespaceConstructor(int offset)
Parse a computed namespace constructor of the form namespace {expr}{expr} |
protected void |
parseOuterForClause(List clauseList)
Parse an Outer ForClause. |
protected ItemType |
parseParenthesizedItemType()
Parse a parenthesized item type (allowed in XQuery 1.1 only) |
protected Expression |
parseTryCatchExpression()
Parse a Try/Catch Expression. |
protected Expression |
processGroupingExpression(List<ExpressionParser.FLWORClause> clauseList,
Expression action)
Process a grouping expression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Query11Parser()
Method Detail |
---|
public QueryParser newParser()
newParser
in class QueryParser
public int getPermittedFunctions()
getPermittedFunctions
in class QueryParser
protected Expression parseLiteralFunctionItem() throws XPathException
parseLiteralFunctionItem
in class ExpressionParser
XPathException
public ItemType parseFunctionItemType() throws XPathException
parseFunctionItemType
in class ExpressionParser
XPathException
protected ItemType parseParenthesizedItemType() throws XPathException
parseParenthesizedItemType
in class ExpressionParser
XPathException
protected Expression parseDynamicFunctionCall(Expression functionItem) throws XPathException
parseDynamicFunctionCall
in class ExpressionParser
XPathException
protected Expression parseInlineFunction() throws XPathException
parseInlineFunction
in class ExpressionParser
XPathException
- if a syntax error is foundprotected Binding findRangeVariable(StructuredQName qName)
findRangeVariable
in class ExpressionParser
qName
- identifies the name of the range variable
protected Expression parseTryCatchExpression() throws XPathException
parseTryCatchExpression
in class ExpressionParser
XPathException
protected void parseGroupByClause(List clauseList) throws XPathException
There are also constraints on the structure of a FLWOR expression that contains a group-by clause, but these are imposed at a different level. For the moment, we just parse the clause as it comes.
parseGroupByClause
in class QueryParser
XPathException
protected Expression processGroupingExpression(List<ExpressionParser.FLWORClause> clauseList, Expression action) throws XPathException
processGroupingExpression
in class QueryParser
clauseList
- the list of clauses (for, let, group by)action
- the return clause, optionally wrapped with if-then-else to reflect the where clause
XPathException
protected void parseOuterForClause(List clauseList) throws XPathException
parseOuterForClause
in class QueryParser
clauseList
- - the components of the parsed ForClause are appended to the
supplied list
XPathException
protected Expression parseNamespaceConstructor(int offset) throws XPathException
parseNamespaceConstructor
in class QueryParser
offset
-
XPathException
protected Expression parseNamedNamespaceConstructor(int offset) throws XPathException
parseNamedNamespaceConstructor
in class QueryParser
offset
-
XPathException
protected boolean isNamespaceTestAllowed()
isNamespaceTestAllowed
in class ExpressionParser
protected void parseContextItemDeclaration() throws XPathException
parseContextItemDeclaration
in class QueryParser
XPathException
protected void parseDecimalFormatDeclaration() throws XPathException
parseDecimalFormatDeclaration
in class QueryParser
XPathException
protected void parseDefaultDecimalFormat() throws XPathException
parseDefaultDecimalFormat
in class QueryParser
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |