Class UpdateParser


  • public class UpdateParser
    extends java.lang.Object
    Parser utility methods for the XQuery Update extensions
    • 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