This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8323 - Eventing: context node for XPath filter dialect ambiguous
Summary: Eventing: context node for XPath filter dialect ambiguous
Status: CLOSED WONTFIX
Alias: None
Product: WS-Resource Access
Classification: Unclassified
Component: Eventing (show other bugs)
Version: FPWD
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: notifications mailing list for WS Resource Access
QA Contact: notifications mailing list for WS Resource Access
URL: http://lists.w3.org/Archives/Public/p...
Whiteboard:
Keywords: externalComments
Depends on:
Blocks:
 
Reported: 2009-11-17 12:19 UTC by Robert Freund
Modified: 2009-12-09 05:58 UTC (History)
1 user (show)

See Also:


Attachments

Description Robert Freund 2009-11-17 12:19:15 UTC
Reading the latest draft of WS-Eventing, I was wondering what the context
node for an Xpath 1.0 filter really is. The specification says that the
context node is "the root of the event XML". Maybe its just me but does this
mean the root node of the document where the event XML is contained or the
top element of the event XML (which one could also call 'root of the event
XML'). 

Suppose I have got the following event XML:

<swes:SWESEvent xmlns:swes="http://www.opengis.net/swes/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <swes:identifier
codeSpace="http://www.example.org">a87s9c76s</swes:identifier>
  <swes:code>CAPABILITIES_CHANGED</swes:code>
  <swes:service>
    <wsa:Address>http://my.swe-service.com/path</wsa:Address>
  </swes:service>
</swes:SWESEvent>

Now I want to filter via Xpath to get all events with codeSpace
"http://www.opengis.net/swes/1.0#EventCode" and value "CAPBILITIES_CHANGED".

Let us consider the following Xpath expressions:

1. swes:SWESEvent/swes:code='CAPABILITIES_CHANGED' 
2. /swes:SWESEvent/swes:code='CAPABILITIES_CHANGED'
3. swes:code='CAPABILITIES_CHANGED'

I evaluated the expressions with different choice of context node:
- with context node root node: 1+2 are true ... 3 is false
- with context node swes:SWESEvent: 1 is false ... 2+3 are true

-----------

What would happen if the event XML is somehow wrapped already before the
Xpath is applied - or is that not allowed / considered?

Example:

<abc:Wrapper xmlns:swes="http://www.opengis.net/swes/1.0"
xmlns:abc="http://www.example.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
  <abc:someProperty>
    <swes:SWESEvent>
      <swes:identifier
codeSpace="http://www.example.org">a87s9c76s</swes:identifier>
      <swes:code>CAPABILITIES_CHANGED</swes:code>
      <swes:service>
        <wsa:Address>http://my.swe-service.com/path</wsa:Address>
      </swes:service>
    </swes:SWESEvent>
  </abc:someProperty>
</abc:Wrapper>

Again, I evaluated the expressions with different choice of context node:
- with context node root node: 1+2+3 are false
- with context node abc:someProperty: 1 is true ... 2+3 are false
- with context node swes:SWESEvent: 1+2 are false ... 3 is true

What do you think? 

Best regards,
Johannes Echterhoff