Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1170

netconf-client-mdsal emits useless namespace in filter

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 3.0.9, 5.0.7, 4.0.8, 6.0.4
    • 7.0.0, 5.0.8, 6.0.5
    • netconf-client-mdsal
    • None

    Description

      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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: