Subject: [netmod] anyxml-list

From: Andy Bierman <[email-masked]>
Date: Fri, 08 Jan 2010 16:29:10 -0800

Hi,

I'm not saying the draft needs to change...
I'm just saying that when we changed anyxml
from a type to its own object type, we lost
the ability to define a leaf-list of type anyxml.

I'm working on on a YANG module now where I needed that.
The hack workaround is to define a list with no key
and make the anyxml a child node.  It's not very elegant.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Sat, 09 Jan 2010 14:41:02 +0100 (CET)

> the ability to define a leaf-list of type anyxml.

I don't mind changing:

  An anyxml node exists in zero or one instances in the data tree.

to:

  An anyxml node exists in zero or more instances in the data tree.

Since it's an unknown chunk of XML, it doesn't really matter how many
instances there are.

> and make the anyxml a child node.  It's not very elegant.

As an alternative, maybe you can make the top-level anyxml a
container, and stick your leafs underneath it:

   anyxml foo;

  <foo>
    <bar>1</bar>
    <bar>...</bar>
    ...
  </foo>

/martin

---

From: Andy Bierman <[email-masked]>
Date: Sat, 09 Jan 2010 06:09:47 -0800

>   An anyxml node exists in zero or more instances in the data tree.

No -- I am worried that there is other text
that will be affected by this change, not to
mention code.

I also like the symmetry of the YANG definitions:

           0 or 1            0 or more

simple     leaf              leaf-list

complex    container         list

The terminology is not consistent, but the control is there.

(Personally, I like the instance control
stuff in RelaxNG better than YANG (*,+,?),
but that battle was lost a long time ago ;-)

Andy