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

Re: few quick comments on notification-07



Martin Bjorklund wrote:
Maybe this is getting off topic.

Andy Bierman <ietf@andybierman.com> wrote:
 >....
The actual edit-operation in effect at any node depends on
the operation attribute(s) and the default-operation parameter.
The default is 'merge'.  So a merge on type 'any' can silently
turn into a 'replace' instead?
In the same way as merge "silently turns into a replace" on an
integer:

   <ifMtu nc:operation="merge">1500</ifMtu>

vs.

   <ifMtu nc:operation="replace">1500</ifMtu>



Except 'any' can have child nodes, so the difference is noticeable.

   <foo>
     <a/>
   </foo>

merged with

   <foo>
     <b/>
   </foo>

results in

   <foo>
     <a/>
     <b/>
   </foo>

or

   <foo>
     <b/>
     <a/>
   </foo>


but not

   <foo>
     <b/>
   </foo>

I think I know one implementation where this is the case, if foo is
defined to have a <choice> of a or b as children.



If <foo> is type 'choice' then it isn't type 'any'.
The 'b' result would be correct if <foo> was defined
as a choice of <a> or <b>.

(Merging choices correctly is fairly painful if one or more
of the choices is a 'group' instead of an 'element',
especially when dealing with defaults.)


/martin

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