[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sca-policy] Suggested resolution to issue 87
Hi Ashok,
I have a different opinion on the XPath-ness of appliesTo="sca:binding.ws". I'm going to assert that it's perfectly valid, and even better it is precisely correct. I ran this by my XPath expert and he has come to the same conclusion as I have. I'll try to explain:
Your line numbers don't match up with my cd02-rev4 pdf, but I think I know which text you're referring to. We're interested in section 3.4 PolicySets, following the example (lines 383 - 399).
The way I read the current text is that the XPath expression is supposed to be evaluated with service, reference and component elements (lines 393 - 395) as the root context. This statement establishes the XPath context before an XPath processor evaluates the appliesTo expression. As a means for playing with examples, I used the XPath expression test bed here: http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm
a) click the "Define context set" check box
b) enter "//child" in the Context Set entry field.....without the quotes.
c) enter "grandchild" in the XPatch Expression window.....without the quotes.
d) click evaluate
The result is 4 grandchild elements. No preceding slashes are necessary because of the use of a root context for expression evaluation.
//grandchild also works; BUT
1) '//' is more expensive at runtime because it searches the whole document, thus I don't want to force users down this path (pun intended).
2) '//' ignores the context we've defined. We don't want the expression to return anything but elements that can potentially be configured by a policySet, but the use of '//' opens up the possibility that other stuff might get dragged into the result set.
The test bed tool allows you to feed in your own XML document instances if you want to play with some more examples.
WRT your question on @attachTo, section 4.4.1 "The Form of the @attachTo Attribute" clearly says that the root of XPath evaluation is the "InfoSet for External Attachment" and then goes on to explain in some detail. In these cases, @attachTo="//someElment" would seem to be equivalent to "someElement" since evaluation always starts at the root of the infoset, which BTW is not a composite document.
In conclusion, I think we can close ISSUE-87 with no action.
Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093 or 8-295-6093
e-mail:booz@us.ibm.com
ashok malhotra ---09/03/2009 10:26:45 AM---On line 427 on CD02 Rev 4 Change appliesTo="sca:binding.ws"
From: | ashok malhotra <ashok.malhotra@oracle.com> |
To: | oasis policy <sca-policy@lists.oasis-open.org> |
Date: | 09/03/2009 10:26 AM |
Subject: | [sca-policy] Suggested resolution to issue 87 |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]