Subject: [netmod] YANG boolean not the same as XSD boolean

From: Andy Bierman <[email-masked]>
Date: Wed, 15 May 2013 18:15:14 -0700

Hi,

I just noticed that YANG boolean does not allow "0" or "1" like XSD.
Is this intentional?

9.5.1.  Lexical Representation

   The lexical representation of a boolean value is a string with a
   value of "true" or "false".  These values MUST be in lowercase.

>From http://www.w3.org/TR/xmlschema-2/#boolean:

3.2.2 boolean

[Definition:]  boolean has the ·value space· required to support the
mathematical concept of binary-valued logic: {true, false}.

3.2.2.1 Lexical representation

An instance of a datatype that is defined as ·boolean· can have the
following legal literals {true, false, 1, 0}.

3.2.2.2 Canonical representation

The canonical representation for boolean is the set of literals {true,
false}.

Andy