[email protected] (Dale R. Worley) wrote:
> Martin Bjorklund <[email protected]> writes:
> > Hmm, "*" was choosen b/c people are used to read it as
> > "zero or more". So for example:
> >
> > +---c server* [name]
> > +--c name string
> > ...
> >
> > means zero or more "server" elements. Each indexed by "name".
>
> From RFC 7223:
>
> module ietf-interfaces {
> ...
> container interfaces {
> ...
> list interface {
> key "name";
>
> leaf name {
> type string;
> }
>
> leaf description {
> type string;
> }
> ...
>
> There is a top-level container node "interfaces", which contains a list
> node "interface", which contains a sequence of list elements which
> consist of groups of (a leaf "name", a leaf "description", etc.), which
> elements are indexed by the value of the "name" leaf.
Aha, ok. This description is not a correct description of the YANG
data tree (in which XPath expressions etc are evaluated). There is
not a single "list node" called "interfaces". Look at an example of
an XML instance document:
<interfaces>
<interface>
<name>eth0</name>
...
</interface>
<interface>
<name>eth1</name>
...
</interface>
</interfaces>
This also reflects the data tree.
/martin
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod