Subject: [core] comments on draft-ietf-core-yang-cbor-07.txt

From: Andy Bierman <[email-masked]>
Date: Sun, 16 Sep 2018 11:56:11 -0700

Hi,

I have a few comments on the YANG to CBOR draft.
In general it is very close to being complete.

1) RFC 7951 references

   The following terms are defined in [RFC7951]:

   o  member name

   o  name of an identity

Actually, RFC 7951 does not define these terms. It says RFC 5234 defines
the member-name
syntax,. IMO, this term should really be linked an 'identifier' as defined
in RFC 7950.
Each datadef-stmt has its own specific definition, e.g. container:
https://tools.ietf.org/html/rfc7950#section-7.5

The mapping should be defined directly from YANG to CBOR, as the draft name
suggests.

2) sec 4.5 anydata

The text should mention that SID encoding is not possible since child nodes
of an anydata do not exist in the schema.

The example seems to be wrong. It does not have the member-names
port-name and port-fault in the notation.

3) sec. 4.6 anyxml

The actual usage of anyxml is really as a container, same as anydata,
so the example is confusing. This should be encoded the same as anydata
if possible.

Not sure why the 2nd sentence is there:

sec 4.6, para 1:

   An anyxml schema node is used to serialize an arbitrary CBOR content,
   i.e., its value can be any CBOR binary object. anyxml value MAY
   contain CBOR data items tagged with one of the tag listed in
   Section 8.1, these tags shall be supported.

If this is a binary object then how can it have nested data nodes with data
types?
I suggest that anyxml can be treated as anydata if it does not contain any
mixed-mode content or processing instructions.

NEW:

   An anyxml schema node is used to serialize an arbitrary CBOR content,
   i.e., its value can be any CBOR binary object. If the anyxml instance
   data contains only YANG data nodes, then it MAY be encoded the same
   as an anydata object.

Andy