Package com.saxonica.ee.update
Class UpdateParser
- java.lang.Object
-
- com.saxonica.ee.update.UpdateParser
-
public class UpdateParser extends java.lang.Object
Parser utility methods for the XQuery Update extensions
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Expression
parseDeleteExpression(XPathParser p)
Parse a delete expression.static Expression
parseInsertExpression(XPathParser p)
Parse the insert expression Syntax: insert_node Expr choice Expr choice: "as first into" | "as last into" | "into" | "after" | "before"static Expression
parseRenameExpression(XPathParser p)
Parse a "rename" expression.static Expression
parseReplaceNodeExpression(XPathParser p)
Parse a "replace node" expression.static Expression
parseReplaceValueExpression(XPathParser p)
Parse a "replace value" expression.static Expression
parseTransformExpression(XPathParser p)
Parse the "transform" (that is, copy/modify/return) expression Syntax: "copy" "$" VarName ":=" ExprSingle ("," "$" VarName ":=" ExprSingle)* "modify" ExprSingle "return" ExprSingle
-
-
-
Method Detail
-
parseTransformExpression
public static Expression parseTransformExpression(XPathParser p) throws XPathException
Parse the "transform" (that is, copy/modify/return) expression Syntax: "copy" "$" VarName ":=" ExprSingle ("," "$" VarName ":=" ExprSingle)* "modify" ExprSingle "return" ExprSingle- Parameters:
p
- the calling expression parser- Returns:
- the resulting expression
- Throws:
XPathException
- in the event of a syntax error
-
parseInsertExpression
public static Expression parseInsertExpression(XPathParser p) throws XPathException
Parse the insert expression Syntax: insert_node Expr choice Expr choice: "as first into" | "as last into" | "into" | "after" | "before"- Parameters:
p
- the calling expression parser- Returns:
- the InsertExpression
- Throws:
XPathException
- in the event of a syntax error
-
parseDeleteExpression
public static Expression parseDeleteExpression(XPathParser p) throws XPathException
Parse a delete expression. Syntax: delete_node TargetExpr- Parameters:
p
- the calling expression parser- Returns:
- the expression
- Throws:
XPathException
- in the event of a syntax error
-
parseReplaceNodeExpression
public static Expression parseReplaceNodeExpression(XPathParser p) throws XPathException
Parse a "replace node" expression. Syntax: replace_node TargetExpr with ExprSingle- Parameters:
p
- the calling expression parser- Returns:
- the expression
- Throws:
XPathException
- in the event of a syntax error
-
parseReplaceValueExpression
public static Expression parseReplaceValueExpression(XPathParser p) throws XPathException
Parse a "replace value" expression. Syntax: replace_value "of" "node" TargetExpr with ExprSingle- Parameters:
p
- the calling expression parser- Returns:
- the expression
- Throws:
XPathException
- in the event of a syntax error
-
parseRenameExpression
public static Expression parseRenameExpression(XPathParser p) throws XPathException
Parse a "rename" expression. Syntax: rename_node TargetExpr as ExprSingle- Parameters:
p
- the calling expression parser- Returns:
- the expression
- Throws:
XPathException
- in the event of a syntax error
-
-