Subject: [netmod] [Editorial Errata Reported] RFC7950 (5698)

From: RFC Errata System <[email-masked]>
Date: Thu, 18 Apr 2019 14:14:04 -0700 (PDT)

The following errata report has been submitted for RFC7950,
"The YANG 1.1 Data Modeling Language".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata/eid5698

--------------------------------------
Type: Editorial
Reported by: Andy Bierman <[email-masked]>

Section: 7.5.4.3

Original Text
-------------
     container interface {
       leaf ifType {
         type enumeration {
           enum ethernet;
           enum atm;
         }
       }
       leaf ifMTU {
         type uint32;
       }
       must 'ifType != "ethernet" or ifMTU = 1500' {
         error-message "An Ethernet MTU must be 1500";
       }
       must 'ifType != "atm" or'
          + ' (ifMTU <= 17966 and ifMTU >= 64)' {
         error-message "An ATM MTU must be 64 .. 17966";
       }
     }

Corrected Text
--------------
     container interface {
       leaf ifType {
         type enumeration {
           enum ethernet;
           enum atm;
         }
       }
       leaf ifMTU {
         type uint32;
       }
       must 'string(ifType) != "ethernet" or ifMTU = 1500' {
         error-message "An Ethernet MTU must be 1500";
       }
       must 'string(ifType) != "atm" or'
          + ' (ifMTU <= 17966 and ifMTU >= 64)' {
         error-message "An ATM MTU must be 64 .. 17966";
       }
     }

Notes
-----
The intent of the example is for each must-stmt to be false if the ifType leaf does not exist.
However the XPath is incorrect.

>From the XPath 1.0 spec, section 3.4, para 5

If one object to be compared is a node-set and the other is a string, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the string-value of the node and the other string is true. 

The empty node-set is not implicitly converted to an empty string for a = or != comparison.
Instead the string() function must explicitly convert the node-set to a string

Instructions:
-------------
This erratum is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party  
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC7950 (draft-ietf-netmod-rfc6020bis-14)
--------------------------------------
Title               : The YANG 1.1 Data Modeling Language
Publication Date    : August 2016
Author(s)           : M. Bjorklund, Ed.
Category            : PROPOSED STANDARD
Source              : Network Modeling
Area                : Operations and Management
Stream              : IETF
Verifying Party     : IESG

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 24 Apr 2019 12:06:33 +0200 (CEST)

Hi,

This errata is correct and should be accepted.

/martin

---

From: Ignas Bagdonas <[email-masked]>
Date: Wed, 24 Apr 2019 12:20:22 +0100

Hi,

Errata verified. Thank you.

On Wed, Apr 24, 2019 at 11:06 AM Martin Bjorklund <[email-masked]> wrote:

> > If one object to be compared is a node-set and the other is a string,
> then the comparison will be true if and only if there is a node in the
> node-set such that the result of performing the comparison on the
> string-value of the node and the other string is true.
> >