[Bug 12051] New: WS-E: Problem with Filter XPath suggestion

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12051

           Summary: WS-E: Problem with Filter XPath suggestion
           Product: WS-Resource Access
           Version: CR
          Platform: All
               URL: http://www.w3.org/2002/ws/ra/snapshots/cr/wseventing.h
                    tml
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Eventing
        AssignedTo: public-ws-resource-access-notifications@w3.org
        ReportedBy: lli5@avaya.com
         QAContact: public-ws-resource-access-notifications@w3.org


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.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

Received on Sunday, 13 February 2011 01:49:22 UTC