[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML Namespace usage in NETCONF



Phil Shafer wrote:
Andy Bierman writes:
The problem is that the <rpc> and <get> parent elements
are defined in a target namespace, so namespaces are being used.

Sure, since you haven't changed the namespace.  You can encode
this to but <top> in the default namespace as follows:



Ok -  the text in the subtree filter section about presence or
absence of xmlns directives is misleading (I guess I am reading it
too literally).  It should be interpreted in the general sense.
Your example obviously shows it doesn't matter where the xmlns
directives are in the PDU.  All that matters is normal XML processing
rules are followed to determine the requested namepsace.


<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <top xmlns=""/>
    </filter>
  </get>
</rpc>


This does not work.
Although extremely stupid, empty strings and whitespace-only strings
are valid namespace names.  (I wonder how many agents handle an empty
NS string correctly?)


or:

<nc:rpc message-id="101" xmlns:nc="urn:very:long">
  <nc:get>
    <nc:filter type="subtree">
      <top/>
    </nc:filter>
  </nc:get>
</nc:rpc>


This works.
I forgot about this variant in my original mail,
but it is obviously the most correct one to be used here.



These are different encoding for the same infoset.

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/>