How can the context node point to an XPath object?
Forum topic: Submitted by tim.hallwyl on 22. November 2007 - 8:11.
It is not clear to me, how to make the context node point to an XPath
object, like Boolean for example.
XPath 1.0 only accept a single node as the "context node", and it does not support XML Schema types, thus, any node value is an XPath string object.
Section 8.2.6:
"When XPath 1.0 is used as Query Language [...] If the type is a simple type, the context node MUST point to the XPath object specified in section 8.2.2"
Section 8.2.2:
"WS-BPEL simple type variables MUST be manifested directly as either an XPath string, Boolean or float object."
Thanks.
XPath 1.0 only accept a single node as the "context node", and it does not support XML Schema types, thus, any node value is an XPath string object.
Section 8.2.6:
"When XPath 1.0 is used as Query Language [...] If the type is a simple type, the context node MUST point to the XPath object specified in section 8.2.2"
Section 8.2.2:
"WS-BPEL simple type variables MUST be manifested directly as either an XPath string, Boolean or float object."
Thanks.
I think the spec is pretty clear in this case.
For example, the ActiveBPEL implementation uses jaxen for XPath execution. The jaxen API allows you to pass a java.lang.Object as the context node. This must be a DOM node, Boolean, Number, or String. If query is running against a simple type variable then this variable has its value converted to the appropriate xpath type and passed in as the context.
The XPath spcification does not allow an object
Yes, I agree that the WS-BPEL specification is clear, and I do fully understand the intentions. But acording to the XPath 1.0 specification, the context node is a node, not an object.
Thus, the XPath 1.0 specification does not allow an object to be the context node, as I understand it.
Does WS-BPEL tweak the XPath specification, but setting up these requirements? It this deliberate? ...or is my understanding of the XPath 1.0 specification simply too square?