public class SelectionParser extends XPathParser
XPathParser.Accelerator, XPathParser.NestedLocation
allowSaxonExtensions, allowXPath30Syntax, allowXPath30XSLTExtensions, allowXPath31Syntax, catchDepth, charChecker, codeInjector, env, EXTENDED_ITEM_TYPE, language, languageVersion, parserExtension, qNameParser, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN
Constructor and Description |
---|
SelectionParser() |
Modifier and Type | Method and Description |
---|---|
Expression |
getOptimizedExpression()
After parsing a selector, return the optimized version of the XPath expression that was parsed
|
protected Expression |
parseRelativePath()
Parse a relative path (a sequence of steps).
|
Pattern |
parseSelector(java.lang.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, checkHofFeature, checkLanguageVersion30, checkLanguageVersion31, checkMapExtensions, checkSyntaxExtensions, currentTokenDisplay, customizeTokenizer, declareRangeVariable, disallowedAtStartOfRelativePath, expect, findRangeVariable, generateApplyCall, getCodeInjector, getLanguage, getMissingFunctionExplanation, getPlainType, getQNameParser, getRangeVariables, getStaticContext, getTokenizer, grumble, grumble, grumble, grumble, isAllowAbsentExpression, isAllowXPath31Syntax, isKeyword, isNamespaceTestAllowed, isReservedFunctionName30, isReservedFunctionName31, isReservedInQuery, makeCurriedFunction, makeFingerprint, makeLocalNameTest, makeLocation, makeNamespaceTest, makeNameTest, makeNestedLocation, makeNodeName, makeStringLiteral, makeStructuredQName, makeStructuredQNameSilently, makeTracer, nextToken, operatorPrecedence, parse, parseAnnotationsList, parseArrayCurlyConstructor, parseArrayItemType, parseArraySquareConstructor, parseArrowPostfix, parseBasicStep, parseBinaryExpression, parseConstructor, parseDynamicFunctionCall, parseExpression, parseExprSingle, parseExtendedItemType, parseExtendedSequenceType, parseExtensionExpression, parseFLWORExpression, parseFunctionArgument, parseFunctionCall, parseFunctionItemType, parseInlineFunction, parseItemType, parseLookup, parseMapExpression, parseMapItemType, parseNamedFunctionReference, parseNodeTest, parseNumericLiteral, parseParenthesizedExpression, parsePathExpression, parsePredicate, parsePredicate, parseRemainingPath, parseSequenceType, parseSequenceType, parseSimpleMappingExpression, parseStepExpression, parseStringLiteral, parseStringTemplate, parseSwitchExpression, parseTryCatchExpression, parseTypeswitchExpression, parseValidateExpression, parseVariableReference, reportMissingFunction, resolveFunctionName, setAccelerator, setAllowAbsentExpression, setCatchDepth, setCodeInjector, setLanguage, setLocation, setLocation, setLocation, setParserExtension, setQNameParser, setRangeVariables, setRangeVariableStack, setScanOnly, testPermittedAxis, undeclareRangeVariable, unescape, warning, whyDisallowedType
public Pattern parseSelector(java.lang.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" attributegetOptimizedExpression()
.XPathException
- if the expression contains a syntax errorprotected Expression parseUnionExpression() throws XPathException
XPathException
protected Expression parseRelativePath() throws XPathException
XPathParser
parseRelativePath
in class XPathParser
XPathException
- if any error is encounteredprotected Expression parseStepExpression() throws XPathException
XPathException
- if parsing failspublic Expression getOptimizedExpression()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.