Hi,

if we want to make YANG less NETCONF- and XML-centric, it is
necessary to have a sound definition of the data tree, which we IMO
currently don't have.

Two issues to start with:

1. Consider

   container top {
       leaf-list a {
           type uint8;
       }
       leaf b {
           type uint8;
       }
   }

   Is a data tree corresponding to this fragment more alike to the XML/XPath 
model, i.e.

   top
     a: 1
     a: 2
     b: 3

   or rather JSON-like?

   top
     a: [1,2]
     b: 3

   The definition of leaf-list seems to indicate it is the latter ("array").

2. Ordering of container's children - it is defined only in sec. 7.5.7
   (XML Mapping Rules): "If the container defines RPC input or output
   parameters, these subelements are encoded in the same order as they
   are defined within the "container" statement.  Otherwise, the
   subelements are encoded in any order."

   I assume this is true for the data tree as well. But in the first
   variant above we could have (if "top" is a non-RPC container) 

   top
     a: 1
     b: 3
     a: 2 

   while this interleaving isn't possible with the second variant.

Lada

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to