XPath filter gets Namespaces from NotificationMessage
-----------------------------------------------------

                 Key: MUSE-293
                 URL: https://issues.apache.org/jira/browse/MUSE-293
             Project: Muse
          Issue Type: Bug
          Components: Utilities - General, QName, and XML
    Affects Versions: 2.2.0
            Reporter: Matthes Rieke
            Assignee: Dan Jemiolo
            Priority: Minor


I have stumbled across a problem when trying to filter a NotificationMessage 
with an XPath expression containing namespace declarations (e.G. 
//om:Observation/om:procedure - where om is "http://www.opengis.net/om/1.0";).
Perhaps I made some mistake while subscribing with this filter, but to me it 
seems, that the MessagePatternFilter just invokes XPathUtils.isMatch(). isMatch 
itself invokes XPathAPI.eval(context, xpath) [from apache xalan api] and that 
method has no parameter for the namespaceNode. This has the result that the 
XPath expression takes its namespaces from the NotificationMessage, which of 
course may differ from the ones specified in my subscribe request.

Also I noticed that namespaces in a MessagePatternFilter xml file (see below) 
just get erased when parsing the xml with the FilterFactory.

Filter to parse:
<wsnt:Filter xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
    <wsnt:MessageContent Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116";
        xmlns:om="http://www.opengis.net/om/1.0";>
        
//om:Observation/om:procedure/@xlink:href='urn:ogc:object:procedure:CITE:WeatherService:LGA'
    </wsnt:MessageContent>
</wsnt:Filter>


this gets parsed in the subscribe operation of NotificationProducer (I assume 
this is done before in the FilterFactory):
<wsnt:Filter xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
<wsnt:MessageContent 
Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116";>//om:Observation/om:procedure/@xlink:href='urn:ogc:object:procedure:CITE:WeatherService:LGA'</wsnt:MessageContent>
</wsnt:Filter>


As you can see the namespace "om:...." is removed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to