public class SelectionParser extends ExpressionParser
ExpressionParser.TemporaryContainer
allowXPath30Syntax, catchDepth, codeInjector, defaultContainer, env, language, languageVersion, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN
Constructor and Description |
---|
SelectionParser() |
Modifier and Type | Method and Description |
---|---|
protected Expression |
parseRelativePath()
Parse a relative path (a sequence of steps).
|
Pattern |
parseSelector(String expression,
StaticContext env,
boolean isField)
Parse a string representing the restricted XPath expression allowed
in an XML Schema selector or field attribute
|
protected Expression |
parseStepExpression()
Override the general XPath parsing of a StepExpression to support the simpler
kind of Step used in XML Schema selectors
|
protected Expression |
parseUnionExpression() |
atStartOfRelativePath, currentTokenDisplay, customizeTokenizer, declareRangeVariable, disallowedAtStartOfRelativePath, expect, findRangeVariable, getCodeInjector, getDefaultContainer, getLanguage, getNameChecker, getRangeVariables, getStaticContext, getTokenizer, grumble, grumble, grumble, grumble, isKeyword, isNamespaceTestAllowed, isReservedInQuery, makeCurriedFunction, makeLocalNameTest, makeNameCode, makeNamespaceTest, makeNameTest, makeNodeName, makeStringLiteral, makeStructuredQName, makeStructuredQNameSilently, makeTracer, nextToken, normalizeEQName, parse, parseAnnotations, parseBasicStep, parseBinaryExpression, parseConstructor, parseDynamicFunctionCall, parseExpression, parseExprSingle, parseExtensionExpression, parseFLWORExpression, parseFunctionArgument, parseFunctionCall, parseFunctionItemType, parseInlineFunction, parseItemType, parseLiteralFunctionItem, parseMapExpression, parseMapItemType, parseNodeTest, parseNumericLiteral, parseParenthesizedItemType, parsePathExpression, parsePredicate, parseRemainingPath, parseSequenceType, parseSequenceType, parseSimpleMappingExpression, parseStepExpression, parseStringLiteral, parseSwitchExpression, parseTryCatchExpression, parseTypePattern, parseTypeswitchExpression, parseValidateExpression, parseVariableReference, reportMissingFunction, resolveFunctionName, setCodeInjector, setDefaultContainer, setLanguage, setLocation, setLocation, setLocation, setRangeVariables, setRangeVariableStack, setScanOnly, testPermittedAxis, undeclareRangeVariable, warning
public Pattern parseSelector(String expression, StaticContext env, boolean isField) throws XPathException
expression
- the expression expressed as a Stringenv
- the static context for the expressionisField
- true if the attribute is a "field" attribute, false if
it is a "selector" attributeXPathException
- if the expression contains a syntax errorprotected Expression parseUnionExpression() throws XPathException
XPathException
protected Expression parseRelativePath() throws XPathException
ExpressionParser
parseRelativePath
in class ExpressionParser
XPathException
- if any error is encounteredprotected Expression parseStepExpression() throws XPathException
XPathException
- if parsing failsCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.