Package net.sf.saxon.expr.parser
Class ParserExtension
- java.lang.Object
-
- net.sf.saxon.expr.parser.ParserExtension
-
public class ParserExtension extends java.lang.ObjectDummy 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 Modifier and Type Class Description static classParserExtension.TemporaryXSLTVariableBinding
-
Constructor Summary
Constructors Constructor Description ParserExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleExternalFunctionDeclaration(XQueryParser p, XQueryFunction func)voidneedExtension(XPathParser p, java.lang.String what)protected ExpressionparseExtendedExprSingle(XPathParser p)ItemTypeparseExtendedItemType(XPathParser p)Parse an ItemType within a SequenceTypevoidparseRevalidationDeclaration(XQueryParser p)Parse the "declare revalidation" declaration.voidparseTypeAliasDeclaration(XQueryParser p)Parse a type alias declaration.ExpressionparseTypePattern(XPathParser p)Parse an extended XSLT pattern in the form ~itemType (predicate)*voidparseUpdatingFunctionDeclaration(XQueryParser p)Parse an updating function declaration (allowed in XQuery Update only)
-
-
-
Method Detail
-
needExtension
public void needExtension(XPathParser p, java.lang.String what) throws XPathException
- Throws:
XPathException
-
handleExternalFunctionDeclaration
public void handleExternalFunctionDeclaration(XQueryParser p, XQueryFunction func) throws XPathException
- Throws:
XPathException
-
parseExtendedItemType
public ItemType parseExtendedItemType(XPathParser p) throws XPathException
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
public Expression parseTypePattern(XPathParser p) throws XPathException
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
-
parseTypeAliasDeclaration
public void parseTypeAliasDeclaration(XQueryParser p) throws XPathException
Parse a type alias declaration. Allowed only in Saxon-PE and higher- Parameters:
p- the XPath parser- Throws:
XPathException- if parsing fails
-
parseRevalidationDeclaration
public void parseRevalidationDeclaration(XQueryParser p) throws XPathException
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
public void parseUpdatingFunctionDeclaration(XQueryParser p) throws XPathException
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
protected Expression parseExtendedExprSingle(XPathParser p) throws XPathException
- Throws:
XPathException
-
-