-
Bug
-
Resolution: Done
-
Medium
-
3.0.9, 5.0.7, 4.0.8, 6.0.4
-
None
When we emit a filter we end up doing this:
<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top xmlns="http://example.com/schema/1.2/config"> <users> </users> </top> </filter>
The problem here is that we emit a namespace declaration to host the 'type' attribute, which is wrong. The interpretation here is that attributes inhering the default namespace, but that is not true: attributes do not inherit the the namespace of the element in which they are declared.
In this particular case "type" should just be a plain attribute, without any prefix:
<filter type="subtree" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top xmlns="http://example.com/schema/1.2/config"> <users> </users> </top> </filter>
and without the ns declaration when we already have it in an ancestor element.