Re: [netmod] Fwd: New Version Notification for draft-lengyel-netmod-yang-instance-data-01.txt

Juergen Schoenwaelder <> Tue, 26 June 2018 15:37 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 71EC413106C for <>; Tue, 26 Jun 2018 08:37:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id V7IwdkL7nNAv for <>; Tue, 26 Jun 2018 08:37:03 -0700 (PDT)
Received: from anna.localdomain ( [IPv6:2001:638:709:5::7]) by (Postfix) with ESMTP id C338713107F for <>; Tue, 26 Jun 2018 08:37:03 -0700 (PDT)
Received: by anna.localdomain (Postfix, from userid 501) id 1860822B4270; Tue, 26 Jun 2018 17:37:02 +0200 (CEST)
Date: Tue, 26 Jun 2018 17:37:02 +0200
From: Juergen Schoenwaelder <>
To: Balazs Lengyel <>
Cc: Robert Wilton <>, "" <>
Message-ID: <>
Reply-To: Juergen Schoenwaelder <>
Mail-Followup-To: Balazs Lengyel <>, Robert Wilton <>, "" <>
References: <> <> <> <> <> <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <>
User-Agent: NeoMutt/20180622
Archived-At: <>
Subject: Re: [netmod] Fwd: New Version Notification for draft-lengyel-netmod-yang-instance-data-01.txt
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 26 Jun 2018 15:37:15 -0000

My plain text email reader fails on the quoting and this is usually
where I drop out of discussions since I can't follow anymore.

On Tue, Jun 26, 2018 at 05:09:56PM +0200, Balazs Lengyel wrote:
>    BALAZS: I did not find anything about leading/trailing whitespace e.g. for
>    an integer in RFC 7950 either. Is it allowed/prohibited?

7.5.7.  XML Encoding Rules


   Any whitespace between the subelements to the container is
   insignificant, i.e., an implementation MAY insert whitespace
   characters between subelements.

7.6.6.  XML Encoding Rules

   The value of the leaf node is encoded to XML according to the type
   and is sent as character data in the element.

Note that there is no text that arbitrary whitespace may be added by a
writer and removed by a reader. Hence, I believe for values contained
in leafs, extra whitespace is not allowed. However, between containers
and leafs whitespace is insignificant. The simple reason is that for
string values, you can't simply strip leading/trailing whitespace and
in order to treat all leafs the same, you do not strip
leading/trailing whitespace in general.

That said, some parsers may (following Postel's principle) accept
<foo> +1</foo> if the YANG definition of foo says it is an int32 but
writers should generate <foo>1</foo> (the canonical format without
added whitespace). Note that if foo is defined to be a string, then
clearly the white space belongs to the string value.

If we define a file serialization format, then the format should be
the natural canonical serialization format (and if the definition of
the serialization formats is not clear enough, then we have to fix
these definitions by filing errata).


Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <>