Some models seem to place a single list of things inside a container also named after the items in the list, e.g.,

+--ro modulename
  +--rw ribs
+--rw rib* [name] +--rw name I don't see the purpose of these containers. It seems to me that one can model and query the exact same data without the outer container. That is,

+--ro modulename
+--rw rib* [name] +--rw name Is there something useful about these containers that I've missed, as it's a fairly common pattern in the models I've been looking at. Example comparisons below..
Thanks,
Chris.


w/ container: <modulename> <ribs> <rib> <name>foo</name> </rib> <rib> <name>bar</name> </rib> ... </ribs> </modulename> w/o container:
   <modulename>
<rib> <name>foo</name> </rib> <rib> <name>bar</name> </rib> ... </modulename>
Likewise if you want to fetch all ribs you can either way:

   <filter>
     <modulename>
       <ribs/>
     </modulename>
</filter>
or

   <filter>
     <modulename>
       <rib/>
     </modulename>
</filter>
Or a particular rib

   <filter>
     <modulename>
<ribs> <rib> <name>foo</name> </rib> </ribs>
     </modulename>
</filter>
or

   <filter>
<modulename> <rib> <name>foo</name>
       </rib>
     </modulename>
</filter>
Using xpath:

/modulename/ribs/rib[name='foo']
or

   /modulename/rib[name='foo']

Attachment: signature.asc
Description: PGP signature

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to