Re: [Cbor] 7049bis: The concept of "optional tagging" is not really used in practice #126

Carsten Bormann <> Mon, 04 November 2019 00:03 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 4E9FA12004F for <>; Sun, 3 Nov 2019 16:03:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id AyDxVNaaB1kv for <>; Sun, 3 Nov 2019 16:03:13 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CDD0A12003E for <>; Sun, 3 Nov 2019 16:03:12 -0800 (PST)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 475tKm60dXzySF; Mon, 4 Nov 2019 01:03:08 +0100 (CET)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Mon, 4 Nov 2019 01:03:10 +0100
Cc: Christophe Lohr <>,
X-Mao-Original-Outgoing-Id: 594518588.141502-c7ea9df27385886642688ba33870ba98
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <>
To: Laurence Lundblade <>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <>
Subject: Re: [Cbor] 7049bis: The concept of "optional tagging" is not really used in practice #126
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 04 Nov 2019 00:03:16 -0000

On Nov 3, 2019, at 17:45, Laurence Lundblade <> wrote:
> It seems like CBOR and JSON say “no schema’” to distance from the horror of XML schemas, but in reality CDDL and prose protocol specs are schemas in spirit.

One of the innovations of XML with respect to SGML was that it allowed schemaless parsing (parsing without a DTD).  In practice, this was marred by having default values in the DTD, so you couldn’t quite use schemaless parsing with a lot of real-world data.  But it still was a major item of progress, and people who got the point started to shun adding defaults to DTDs.

Schemaless parsing means that you can develop a parser independent of the application.
This is a major boon when you consider the fact that it is quite easy to introduce bugs in parsers, and bugs in input parsers are a significant attack vector.
Application considerations don’t enter a schemaless parser, so you can use a hardened, debugged implementation for parsing.

Default value processing is an example of data transformation, from the parsed input to something that an application can use (and back!).  Adding information about more general forms of such a transformation to a data definition language is a major item of interest.  First of all, it needs a data model for what the application can use.  Doing only defaults processing as in a DTD-based XML parser is easy, because the application data model is a simplified version of the interchange data model.  Now if you add something like tag processing (or, more generally, conversions between platform data types and the conventions used for representing them in interchange), the abstractions can get more leaky.

Fortunately, none of this is needed for completing 7049bis.

Grüße, Carsten