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 12051 - WS-E: Problem with Filter XPath suggestion
Summary: WS-E: Problem with Filter XPath suggestion
Status: CLOSED REMIND
Alias: None
Product: WS-Resource Access
Classification: Unclassified
Component: Eventing (show other bugs)
Version: CR
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: notifications mailing list for WS Resource Access
QA Contact: notifications mailing list for WS Resource Access
URL: http://www.w3.org/2002/ws/ra/snapshot...
Whiteboard:
Keywords: hasProposal
Depends on:
Blocks:
 
Reported: 2011-02-13 01:49 UTC by Li Li
Modified: 2011-09-13 21:35 UTC (History)
1 user (show)

See Also:


Attachments

Description Li Li 2011-02-13 01:49:21 UTC
WS-Eventing Section 4.1 states that:
Clients that wish to isolate expressions from the effects of any changes to the namespace prefixes in the containing SOAP message are advised to construct expressions in a manner that avoids the use of namespace prefixes. For example, use an expression such as "/a[namespace-uri()='http://www.example.com']" not "/ns1:a". 

This paragraph implies that xpath expression:
/a[namespace-uri()='http://www.example.com']   

is equivalent to:
/ns1:a

However, it is not. The first expression will evaluate false on XML:
<ns1:a xmlns:ns1="http://www.example.com" />

whereas the second one is true (given the proper namespace context).

The XPath expression equivalent to the second one is:
/*[local-name()='a' and namespace-uri()='http://www.example.com']

Proposal:
Use the equivalent XPath expression instead.
Comment 1 Doug Davis 2011-02-15 17:50:42 UTC
Enum needs this fix too
Comment 2 Robert Freund 2011-02-15 17:52:39 UTC
resolved as proposed and also to be applied to enum