core-wg / yang-cbor

Internet-Draft for CBOR representation of YANG data
5 stars 10 forks source link

Make sure that tag 47 is explained in a cohesive way (RW) #137

Closed cabo closed 2 years ago

cabo commented 2 years ago

From https://mailarchive.ietf.org/arch/msg/core/TGn6ihu3iFvqJCjwiAMwfMaYt5s:

(1) Section 3.2:

                                                Where absolute SIDs are 
       desired in map key positions where a bare integer implies a delta,   
       they may be encoded using CBOR tag 47 (as defined in Section 9.3).

Just to check, is may rather than MUST correct here?  I.e., if you want to use an absolute SID where a delta is expected then it must use CBOR tag 47, or otherwise the receiver would not know it is an absolute SID?

My reply:

Yes, the use of absolute SIDs as map keys requires the use of tag 47. This was intended as text leading in to a cross-reference, not a normative statement. However, that statement isn’t in Section 9.3, which just defines the CBOR tag, but somewhat smeared over 4.2.1 and the example in 4.5.1 (of all places). So I agree that some surgery is required here, making sure that the definition how to use tag 47 and an example for that is in a form that can be referenced here (and, to reduce may/MAY confusion, we probably should substitute “can”).