Implementation of the XPathModel interface using Apache's JXPath.
JXPath does not validate function arguments, i.e., whether the
number of arguments is correct, so we may have to do that validation
ourselves or wait for a later version.
We also implement extensions to handle
expressions in BPEL4WS.
author: Enrico Lelina version:
Gets the axis.
Parameters: code - the axis code the axis type or -1 if invalid
getCoreFunctionCode
int getCoreFunctionCode(CoreFunction coreFunction)(Code)
Gets the core function code
Parameters: coreFunction - the core function the function code or -1 if invalid throws: XPathException - invalid operation
getCoreOperationCode
int getCoreOperationCode(CoreOperation coreOperation)(Code)
Gets the core operation code.
Parameters: coreOperation - the core operation the operation code or -1 if invalid throws: XPathException - invalid operation
Determines if a function name is valid. Assumes the function name is
not one of the core functions.
Parameters: functionName - the name of the function true if the function name is valid, false otherwise
Parses an XPath expression.
Parameters: expression - the XPath expression to parse an instance of XPathExpression throws: XPathException - for any parsing errors
Processes a CoreFunction expression. Converts the CoreFunction into an
XPathExpression and then adds it into the list of values. Then each
argument of the CoreFunction is processed.
Parameters: coreFunction - the core function the core function expression throws: XPathException - for any errors
Processes a CoreOperation expression. Converts the CoreOperation into an
XPathExpression and then adds it into the list of values. Then each
argument of the CoreOperation is processed.
Parameters: coreOperation - the core operation the core operation expression throws: XPathException - for any errors
Processes the parsed expression to build an XPathExpression.
Parameters: expression - the parsed expression an instance of XPathExpression throws: XPathException - for any errors
Processes a ExpressionPath expression. Converts the ExpressionPath into a
TreePath whose components are nodes in the given schema model. Adds the
TreePath into the list of values. Each step in the location path is
equivalent to a TreePath component. TO DO: handle predicates! TO DO:
special handling for relative paths!
Parameters: expressionPath - the location path the expression path expression throws: XPathException - for any errors
Processes an ExtensionFunction expression. Converts the ExtensionFunction
into an XPathExpression and then adds it into the list of values. Then
each argument of the ExtensionFunction is processed.
Parameters: extensionFunction - the extension function the extension function expression throws: XPathException - for any errors
Processes a LocationPath expression. Converts the LocationPath into a
TreePath whose components are nodes in the given schema model. Adds the
TreePath into the list of values. Each step in the location path is
equivalent to a TreePath component. TO DO: handle predicates! TO DO:
special handling for relative paths!
Parameters: locationPath - the location path the location path expression throws: XPathException - for any errors