[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: namespaces in subtree filtering
Phil Shafer wrote:
Andy Bierman writes:
The corner-case that would not match is if the <c> node
did not include a namespace:
<a:a>
<b:b>
<c/>
</b:b>
</a:a>
In this case, nothing will be returned because <c> is not defined in the
'b' namespace.
But it should match. Anything that doesn't fail a match explicitly
in the filter should be returned.
<a:a>
<b:b/>
</a:a>
should be equivalent to the xpath expression:
a:a/b:b
which should match the entire contents of anything under a b:b node
that is under a c:c node. If this isn't true, life gets ugly.
But there is a namespace in affect for <c>.
What if the filter is given this way:
<a:a xmlns:a="blah">
<b xmlns="foo">
<c/>
</b>
</a:a>
The namespace does not have to be explicit, but
there is usually a namespace in effect, since our <rpc> method
node is in a namespace, and the content is in a different namespace.
If you had this corner case, then <c> would be returned:
<a:a xmlns:a="blah" xmlns="">
<b:b xmlns:b="foo">
<c/>
</b:b>
</a:a>
If we agree on a 'clarification' for the protocol spec,
I would glad to change my code to work the way you are suggesting,
but it will require hacks to check for explicit 'xmlns' directives
instead of relying on the effective namespace derived by the parser.
Thanks,
Phil
Andy
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>