public class XQueryParserPE extends XQueryParser
XPathParser.TemporaryContainer
executable, importedModules, queryVersion, XQUERY10, XQUERY30
allowXPath30Syntax, catchDepth, charChecker, codeInjector, defaultContainer, env, language, languageVersion, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN
Constructor and Description |
---|
XQueryParserPE(String queryVersion) |
Modifier and Type | Method and Description |
---|---|
protected LocalBinding |
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 |
isReservedInQuery(String uri) |
protected Expression |
makeCurriedFunction(int offset,
StructuredQName name,
Expression[] args,
IntSet placeMarkers)
Process a function call in which one or more of the argument positions are
represented as "?" placemarkers (indicating partial application or currying)
|
XQueryParser |
newParser()
Create a new parser of the same kind
|
protected Expression |
parseDynamicFunctionCall(Expression functionItem)
Parse a dynamic function call
|
Expression |
parseFunctionArgument()
Parse a function argument.
|
ItemType |
parseFunctionItemType()
Parse the item type used for function items (XQuery 3.0 higher order functions)
Syntax (changed by WG decision on 2009-09-22):
function '(' '*' ') |
function '(' (SeqType (',' SeqType)*)? ')' 'as' SeqType
The "function(" has already been read
|
protected Expression |
parseInlineFunction(Map<StructuredQName,Annotation> annotations)
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 3.0)
Syntax: QName # integer
The QName and # have already been read
|
protected Expression |
parseMapExpression()
Parse a map expression.
|
ItemType |
parseMapItemType()
Parse the item type used for map items (XPath 3.0)
Syntax:
map '(' '*' ') |
map '(' ItemType ',' SeqType ')' 'as' SeqType
The "map(" has already been read
|
applyModuleImport, atStartOfRelativePath, customizeTokenizer, getExecutable, getLanguage, grumble, isStreaming, lookAhead, makeLetExpression, makeSimpleContent, makeStringJoin, makeStringLiteral, makeXQueryExpression, normalizeEQName, parseAnnotations, parseConstructor, parseExtensionExpression, parseFLWORExpression, parseFunctionDeclaration, parseLibraryModule, parseOutputDeclaration, parseRevalidationDeclaration, parseSwitchExpression, parseTryCatchExpression, parseTypeswitchExpression, parseUpdatingFunctionDeclaration, parseValidateExpression, readCollationName, setDisableCycleChecks, setExecutable, setStreaming, stringify, testPermittedAxis, URILiteral
currentTokenDisplay, declareRangeVariable, disallowedAtStartOfRelativePath, expect, getCodeInjector, getDefaultContainer, getMissingFunctionExplanation, getRangeVariables, getStaticContext, getTokenizer, grumble, grumble, grumble, isKeyword, isNamespaceTestAllowed, makeLocalNameTest, makeNameCode, makeNamespaceTest, makeNameTest, makeNodeName, makeStructuredQName, makeStructuredQNameSilently, makeTracer, nextToken, parse, parseBasicStep, parseBinaryExpression, parseExpression, parseExprSingle, parseFunctionCall, parseItemType, parseNodeTest, parseNumericLiteral, parsePathExpression, parsePredicate, parseRelativePath, parseRemainingPath, parseSequenceType, parseSequenceType, parseSimpleMappingExpression, parseStepExpression, parseStringLiteral, parseVariableReference, reportMissingFunction, resolveFunctionName, setCodeInjector, setDefaultContainer, setLanguage, setLocation, setLocation, setLocation, setRangeVariables, setRangeVariableStack, setScanOnly, undeclareRangeVariable, warning
public XQueryParserPE(String queryVersion)
public XQueryParser newParser()
newParser
in class XQueryParser
public int getPermittedFunctions()
getPermittedFunctions
in class XQueryParser
protected boolean isReservedInQuery(String uri)
isReservedInQuery
in class XPathParser
protected Expression parseLiteralFunctionItem() throws XPathException
parseLiteralFunctionItem
in class XPathParser
XPathException
- if a static error is encounteredpublic ItemType parseFunctionItemType() throws XPathException
parseFunctionItemType
in class XPathParser
XPathException
- if a static error occurs (including the case
where XPath 3.0 syntax is not enabled)public Expression parseFunctionArgument() throws XPathException
parseFunctionArgument
in class XPathParser
XPathException
- if the argument expression does not parse correctlypublic ItemType parseMapItemType() throws XPathException
parseMapItemType
in class XPathParser
XPathException
- if a parsing error occurs or if the map syntax
is not availableprotected Expression parseDynamicFunctionCall(Expression functionItem) throws XPathException
parseDynamicFunctionCall
in class XPathParser
functionItem
- the expression that determines the function to be calledXPathException
- if a static error is foundprotected Expression parseInlineFunction(Map<StructuredQName,Annotation> annotations) throws XPathException
parseInlineFunction
in class XPathParser
annotations
- the function annotations, which have already been read, or null if there are noneXPathException
- if a syntax error is foundprotected Expression makeCurriedFunction(int offset, StructuredQName name, Expression[] args, IntSet placeMarkers) throws XPathException
makeCurriedFunction
in class XPathParser
offset
- the location of the expression in the query sourcename
- the function name (as if there were no currying)args
- the arguments (with EmptySequence in the placemarker positions)placeMarkers
- the positions of the placemarkers @return the curried functionXPathException
- if the syntax is incorrectprotected Expression parseMapExpression() throws XPathException
parseMapExpression
in class XPathParser
XPathException
protected LocalBinding findRangeVariable(StructuredQName qName)
findRangeVariable
in class XPathParser
qName
- identifies the name of the range variableCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.