Re: [rfc-i] [xml2rfc] use of sourcecode type

Julian Reschke <julian.reschke@gmx.de> Mon, 27 July 2020 11:33 UTC

Return-Path: <rfc-interest-bounces@rfc-editor.org>
X-Original-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Delivered-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EE8A63A18CF; Mon, 27 Jul 2020 04:33:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, NICE_REPLY_A=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=gmx.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TNZ0BapF1tv2; Mon, 27 Jul 2020 04:33:04 -0700 (PDT)
Received: from rfc-editor.org (rfc-editor.org [4.31.198.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A6533A18CE; Mon, 27 Jul 2020 04:33:04 -0700 (PDT)
Received: from rfcpa.amsl.com (localhost [IPv6:::1]) by rfc-editor.org (Postfix) with ESMTP id C31DBF40755; Mon, 27 Jul 2020 04:32:40 -0700 (PDT)
X-Original-To: rfc-interest@rfc-editor.org
Delivered-To: rfc-interest@rfc-editor.org
Received: from localhost (localhost [127.0.0.1]) by rfc-editor.org (Postfix) with ESMTP id 9DB24F40755 for <rfc-interest@rfc-editor.org>; Mon, 27 Jul 2020 04:32:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at rfc-editor.org
Authentication-Results: rfcpa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
Received: from rfc-editor.org ([127.0.0.1]) by localhost (rfcpa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31YAQvp13RE7 for <rfc-interest@rfc-editor.org>; Mon, 27 Jul 2020 04:32:35 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by rfc-editor.org (Postfix) with ESMTPS id 18297F40753 for <rfc-interest@rfc-editor.org>; Mon, 27 Jul 2020 04:32:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595849576; bh=czyX3O0LiOmxCOoJ2nb75oC9fsZ3HxrNZ+pc85CQrDc=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=c+I7+GsT+ADVw3ajTgmAPhndf8/II0fesnJ0gNdvHVq1dHYzFQ/ozTsIfBY9H0Xa9 38xSiV/pdal9Pf54TbLZ80Ec6/Glw/v18aYHDe4YUpKbIaKgXHJhwnm7TymJCJzk/G IFJj1fBWOWJylVGYKBDkN8KqOuGR1zXnRE+d495o=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.236] ([217.91.35.233]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MSt8Q-1kMb5i2cKE-00UNil for <rfc-interest@rfc-editor.org>; Mon, 27 Jul 2020 13:32:56 +0200
To: rfc-interest@rfc-editor.org
References: <e13ad2a9-e460-58cb-3ffe-88acec803a8a@alum.mit.edu> <748F0BE8-5DDA-4CC1-9306-0C67F906C955@tzi.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <1be09378-acbc-eef9-b4fd-f9b10b35988d@gmx.de>
Date: Mon, 27 Jul 2020 13:32:56 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1
MIME-Version: 1.0
In-Reply-To: <748F0BE8-5DDA-4CC1-9306-0C67F906C955@tzi.org>
X-Provags-ID: V03:K1:udJUMDnUzongZLeUpaCuF1LVsVo3Z7nBxNbLpnLoVJYkRMaVeqe NnSOpgm/topPma+KnmAQT8BJarLZm/8HfnxZyh1IQ8JMaSQHnXl1U3tEpFoEBahkqgnqahg DeyMMhPiCJ3WJJFH2bX6ep8kTEPoLM2aYZ3jhu8H4giooD48MahlCGF6r3sBp6fKfJtIvMg G1xlSmfsf0Fkg79ttDVxw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:k7wfyROw/GM=:iA3CL74nsh5b1uxLAn+L6r ehSyKwKoLftlxAomrYSDabX0QH3RouxaYUWyuqfHYuwsUiJ69MJg1djMVW+NadLlAaARK3bFr Jn/fAUG6np89/rngYVdJtEuEk5Nv38H42pp5XxYjrW3oyyAvqBGFl0ZM0vF3ChzsJZRxNaV8T QlBek19w8GMexsn8Vjn4xP8V/8EKuMOl7tQbZsrcWJaXLJlS542eEonp/1VvenyZGRg643iXy cme09JddBmDoNHFAjdNsnwuP/RMREleJvQaZQocd4C2Z8dtZEirKyTbge4mgrQuynZ5lYcM7K fFHJ7Z+iJznQ67UKcw3EF8AmsEL7slJYacJEf7p6mkOblCJ3CKMIdnBJ6l7fnNunWPsGPAWcV 99Dsd9MTsHeOCfmehCvbaTEvHTqdYkI947jPqJcIkpghBPdoj6u2pvySiBfiOjXko72eXNY0z UCZxA3STTn9qGrpaHvcqATJZg2KCAY/k8LnxUjCasu1rWDRJIBnJh2dPbWh4fYtUUED2Yaxfb ORj8wi/2nqILMKVzl+kdj6//zy1mKv9CjTR8H4wjAE957jS7J0tSlDOF9OSWEVkZJAIsO6t1z /EpHSQYnXvlbCqXle5TE8aN2XiQ/rg2ynJOZm/qQUlmZfE9i5l/75pnalmxN3TpJtYdEhqm06 DTgii6yaW8Xc9xRjiDIyXQLluBH+sA518Nu8ir3PBbw8ZKS7WEkgN2S/JdcceuOwfy1gX/zw1 GtWNl2vYaMEnfMfWa+0Jw4EJ2U0ReWSTQ7iRMdSadSdEU/ArN4appJOAdRcKNrqQwcgKiv4Qk U755BpJvy1EAtsP6Sq2d9+K+hGiFUvQsqXcH4C5gWsp/1txlBBusVsoIQ70PNnwu+6AYsjSpi 51pbOgMHUZOswgtmfcFwyY6vyx4fIBkWZpMclol4KIVi8uDxa+Jjlt0eIbTu8mV27h9PTu2dZ 3Dcxt1QpKYfUQjxnvfbQa5dK9kNPzZ6cdGZoh1ZO2WvCy7mQRPAl2psbo8gEHFHJQm0dIefS1 hFksFDDQWwzh73/tawLLBOO85kE0d357QohWxL5/ndoVtXac0K4Oo62Kxy40qAuoCtfbh3mBu dPE7OTwcJ5WT9lY22QZNs2OXAIptM3iTv0gFaM7fdLwCv+mYLJt1usX5pMmSshFg/Uux6PiYx 10O7jiWgu+UVSHHa1IHtL8Y0GtmWK6CuB4XxgFj3POEXHGvI+BeLF1QiR0uTMTyvInLAVpk4a jq2hpS6haVljdyOLf9yW+Pp4Cr3EtrVCF65eOCA==
Subject: Re: [rfc-i] [xml2rfc] use of sourcecode type
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://www.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <http://www.rfc-editor.org/pipermail/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://www.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: rfc-interest-bounces@rfc-editor.org
Sender: rfc-interest <rfc-interest-bounces@rfc-editor.org>

Am 21.07.2020 um 17:10 schrieb Carsten Bormann:
> A similar problem is giving examples that are intentionally bad in order to demonstrate a kind of error.
>
> I typically tag them with a type that is derived from the one I would give for real code, e.g., “CDDLx” for a bad CDDL example.  I think it would be good to agree on some way to indicate this.
>
> A related problem is that often several code blocks combine to one valid instance of CDDL, for example see Figure 1, 2, 3 in RFC 8428.  There is no way to say that Figure 1 and 2 combine into a valid instance, and so do Figure 1 and 3, but not any other combination.
>
> And, by the way, those type tags are conventionally lower-cased, but this is not made very explicit; you have to infer that from the list in Section 2.48.4 of RFC 7991 or the RFC editor’s updated copy of that list:
>
> https://www.rfc-editor.org/materials/sourcecode-types.txt
>
> (Ha, this doesn’t even have “cddl” in it; I’m not sure how this is updated and whether there shouldn’t really be an IANA registry for these.)
>
> Grüße, Carsten
> ...

Picking a somewhat random message here to reply to... :-)

There are multiple use cases to consider:

1) tagging for the purpose of validation

2) tagging for the purpose of syntax coloring
(<https://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#xml2rfc-ext-html-pretty-print>)

3) hightlighting that something is a "bad" example

(and maybe more)

re 1) it is quite common that ABNF is spread over multiple parts of the
document; each of these is supposed to be syntactically correct, but
would fail validation if that includes checking for undefined rules

re 2) it might be desirable to do syntax coloring even on incorrect input

re 3) might be nice to have some color to indicate that some example is
incorrect/discouraged (and yes, the color would need to be just an
additional hint)

Best regards, Julian
_______________________________________________
rfc-interest mailing list
rfc-interest@rfc-editor.org
https://www.rfc-editor.org/mailman/listinfo/rfc-interest