Package net.sf.saxon.expr.parser
Class ParserExtension
java.lang.Object
net.sf.saxon.expr.parser.ParserExtension
- Direct Known Subclasses:
SaxonSyntaxExtension
Dummy Parser extension for syntax in XPath that is accepted only in particular product variants.
Originally, this meant XPath 3.0 syntax associated with higher-order functions. It now covers
Saxon syntax extensions and XQuery Update.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlookupStar(Expression lhs, SequenceType type, boolean allow40) Supporting code for lookup expressions (A?B) where B is the wildcard "*"voidneedExtension(XPathParser p, String what) protected ExpressionParse an ItemType within a SequenceTypevoidParse a type alias declaration.voidParse the "declare revalidation" declaration.Parse an extended XSLT pattern in the form ~itemType (predicate)*voidParse an updating function declaration (allowed in XQuery Update only)voidprocessSchemaImports(QueryModule module, List<XQueryParser.Import> schemaImports)
-
Constructor Details
-
ParserExtension
public ParserExtension()
-
-
Method Details
-
lookupStar
Supporting code for lookup expressions (A?B) where B is the wildcard "*"- Parameters:
lhs- the LHS operand of the lookup expressionallow40-- Returns:
- the result of parsing the expression
-
needExtension
- Throws:
XPathException
-
handleExternalFunctionDeclaration
public void handleExternalFunctionDeclaration(XQueryParser p, XQueryFunction func) throws XPathException - Throws:
XPathException
-
parseExtendedItemType
Parse an ItemType within a SequenceType- Parameters:
p- the XPath parser- Returns:
- the ItemType after parsing
- Throws:
XPathException- if a static error is found
-
parseTypePattern
Parse an extended XSLT pattern in the form ~itemType (predicate)*- Parameters:
p- the XPath parser- Returns:
- the equivalent expression in the form .[. instance of type] (predicate)*
- Throws:
XPathException- if a static error is found
-
parseItemTypeDeclaration
Parse a type alias declaration. Allowed only in Saxon-PE and higher- Parameters:
p- the XPath parser- Throws:
XPathException- if parsing fails
-
parseRevalidationDeclaration
Parse the "declare revalidation" declaration. Syntax: not allowed unless XQuery update is in use- Parameters:
p- the XPath parser- Throws:
XPathException- if the syntax is incorrect, or is not allowed in this XQuery processor
-
parseUpdatingFunctionDeclaration
Parse an updating function declaration (allowed in XQuery Update only)- Parameters:
p- the XPath parser- Throws:
XPathException- if parsing fails PathMapor if updating functions are not allowed
-
parseExtendedExprSingle
- Throws:
XPathException
-
processSchemaImports
public void processSchemaImports(QueryModule module, List<XQueryParser.Import> schemaImports) throws XPathException - Throws:
XPathException
-
parseDeepUpdateExpression
- Throws:
XPathException
-