Package com.saxonica.expr
Class SaxonSyntaxExtension
- java.lang.Object
-
- net.sf.saxon.expr.parser.ParserExtension
-
- com.saxonica.expr.SaxonSyntaxExtension
-
- Direct Known Subclasses:
XQueryParserExtensionPE
public class SaxonSyntaxExtension extends ParserExtension
Parser extension for syntax in XPath that is accepted only in Saxon-PE and -EE. This means Saxon-defined syntax extensions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SaxonSyntaxExtension.UnderscoreFunctionDetails
-
Nested classes/interfaces inherited from class net.sf.saxon.expr.parser.ParserExtension
ParserExtension.InlineFunctionDetails, ParserExtension.TemporaryXSLTVariableBinding
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.expr.parser.ParserExtension
inlineFunctionStack
-
-
Constructor Summary
Constructors Constructor Description SaxonSyntaxExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
bindNumericParameterReference(XPathParser p)
void
handleExternalFunctionDeclaration(XQueryParser p, XQueryFunction func)
Expression
parseDotFunction(XPathParser p)
ItemType
parseExtendedItemType(XPathParser p)
Parse an ItemType within a SequenceTypeprotected Expression
parseForMemberExpression(XPathParser p)
Parse a for-member expression (Saxon extension): for member $x in expr return exprExpression
parseTypePattern(XPathParser p)
Parse an extended XSLT pattern in the form item-type (predicate)* (but excluding the predicates)Expression
parseUnderscoreFunction(XPathParser p)
Saxon extension: inline functions of the form_{$1 + $2}
ItemType
parseUnionType(XPathParser p)
Parse a union type (Saxon 9.8 extension).-
Methods inherited from class net.sf.saxon.expr.parser.ParserExtension
createDynamicCurriedFunction, curryFunction, findOuterRangeVariable, findOuterRangeVariable, makeArgumentPlaceMarker, makeCurriedFunction, makeInlineFunctionValue, parseExtendedExprSingle, parseFunctionItemType, parseInlineFunction, parseNamedFunctionReference, parseRevalidationDeclaration, parseTypeAliasDeclaration, parseUpdatingFunctionDeclaration
-
-
-
-
Method Detail
-
parseExtendedItemType
public ItemType parseExtendedItemType(XPathParser p) throws XPathException
Parse an ItemType within a SequenceType- Overrides:
parseExtendedItemType
in classParserExtension
- Returns:
- the ItemType after parsing
- Throws:
XPathException
- if a static error is found
-
parseTypePattern
public Expression parseTypePattern(XPathParser p) throws XPathException
Parse an extended XSLT pattern in the form item-type (predicate)* (but excluding the predicates)- Overrides:
parseTypePattern
in classParserExtension
- Returns:
- the equivalent expression in the form .[. instance of type] (predicate)*
- Throws:
XPathException
-
parseUnionType
public ItemType parseUnionType(XPathParser p) throws XPathException
Parse a union type (Saxon 9.8 extension). Syntax: "union" "(" qname ("," qname)* ")"- Throws:
XPathException
-
parseDotFunction
public Expression parseDotFunction(XPathParser p) throws XPathException
- Overrides:
parseDotFunction
in classParserExtension
- Throws:
XPathException
-
parseUnderscoreFunction
public Expression parseUnderscoreFunction(XPathParser p) throws XPathException
Saxon extension: inline functions of the form_{$1 + $2}
- Overrides:
parseUnderscoreFunction
in classParserExtension
- Parameters:
p
- the XPath parser- Returns:
- the compiled expression
- Throws:
XPathException
- if syntax is incorrect
-
bindNumericParameterReference
public Expression bindNumericParameterReference(XPathParser p) throws XPathException
- Overrides:
bindNumericParameterReference
in classParserExtension
- Throws:
XPathException
-
handleExternalFunctionDeclaration
public void handleExternalFunctionDeclaration(XQueryParser p, XQueryFunction func) throws XPathException
- Overrides:
handleExternalFunctionDeclaration
in classParserExtension
- Throws:
XPathException
-
parseForMemberExpression
protected Expression parseForMemberExpression(XPathParser p) throws XPathException
Parse a for-member expression (Saxon extension): for member $x in expr return expr- Overrides:
parseForMemberExpression
in classParserExtension
- Returns:
- the resulting subexpression
- Throws:
XPathException
- if any error is encountered
-
-