Re: [netmod] CODE BEGINS ENDS for examples ?

Kent Watsen <kent@watsen.net> Fri, 20 March 2020 23:01 UTC

Return-Path: =?utf-8?q?=3C01000170fa2db5c9-960b7cf9-6e75-4cb4-a974-93703b852?= =?utf-8?q?ab7-000000=40amazonses=2Ewatsen=2Enet=3E?=
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5F71D3A0F2D for <netmod@ietfa.amsl.com>; Fri, 20 Mar 2020 16:01:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
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 qDv1ZIhmGSRe for <netmod@ietfa.amsl.com>; Fri, 20 Mar 2020 16:01:06 -0700 (PDT)
Received: from a8-33.smtp-out.amazonses.com (a8-33.smtp-out.amazonses.com [54.240.8.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 204763A0F31 for <netmod@ietf.org>; Fri, 20 Mar 2020 16:01:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1584745264; =?utf-8?q?h=3DFrom=3AMessage-Id=3AContent-Type=3AMime-Version=3ASubject=3AD?= =?utf-8?q?ate=3AIn-Reply-To=3ACc=3ATo=3AReferences=3AFeedback-ID=3B?= bh=78gTo3trWJi5GmSdOJ7gYau7XzQKih2UqLlEIMx4GHI=; b=axo3hDSM8NFhVbDl/pcn3xvAQoaaL20doRj9u7Syi2KQcx80tfPvTx55Cvid09Xx 1M9XrW/Bn5DFGq9MRJpH9i4kTuEWDYkV7/jJGMyXSi2mhFvjrH/Vbske26+8Yb9qt98 r6z51ovwees5gMdObYSuOvPGXF8CB1FecVWXG52M=
From: Kent Watsen <kent@watsen.net>
Message-ID: =?utf-8?q?=3C01000170fa2db5c9-960b7cf9-6e75-4cb4-a974-93703b852a?= =?utf-8?q?b7-000000=40email=2Eamazonses=2Ecom=3E?=
Content-Type: multipart/alternative; boundary="Apple-Mail=_BBD44851-260B-4912-B0C2-A970327CBF94"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Fri, 20 Mar 2020 23:01:04 +0000
In-Reply-To: =?utf-8?q?=3CDB7PR07MB401126C42CF7ECA417BC82B5F0F50=40DB7PR07MB?= =?utf-8?q?4011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
Cc: "netmod@ietf.org" <netmod@ietf.org>
To: =?utf-8?Q?Bal=C3=A1zs_Lengyel?= <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
References: =?utf-8?q?=3CDB7PR07MB401126C42CF7ECA417BC82B5F0F50=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2020.03.20-54.240.8.33
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/_AHrVo1maKBwS0qENcGnhQgbWCw>
Subject: Re: [netmod] CODE BEGINS ENDS for examples ?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Mar 2020 23:01:09 -0000

Hi Balazs,

As I understand it, the <CODE BEGIN> <CODE END> blocks are not appropriate for examples. 

Examples are easily extracted from XML via `xmllint` with the “—xpath” parameter, after which the `rfcfold` script can be run.  Strongly recommend setting the “name” attribute on the <sourcecode> or <artwork> element in the XML draft.  It’s good to see that you want to do it this way, as I noticed you hand-folded the examples and I’m pretty sure I spotted what looked like might result in an undesirable unfolding artifact...

FWIW, https://pypi.org/project/xiax attempts to do all this, but I suspended that effort getting distracted with other things...

Kent // contributor



> On Mar 20, 2020, at 1:02 PM, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org> wrote:
> 
> Hello,
> Is it allowed/recommended to use <CODE BEGINS> <CODE ENDS> around examples. In my case it would be examples of XML and JSON instance data. I would find it rather useful.
>  
> As a second step if someone could combine rfcstrip with artwork-unfolding that would be even better.
> Regards Balazs
>  
> -- 
> Balazs Lengyel                    Senior Specialist                       Ericsson Hungary Ltd. 
> Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com <mailto:Balazs.Lengyel@ericsson.com>
>  
> _______________________________________________
> netmod mailing list
> netmod@ietf.org <mailto:netmod@ietf.org>
> https://www.ietf.org/mailman/listinfo/netmod <https://www.ietf.org/mailman/listinfo/netmod>