Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

Kent Watsen <kent@watsen.net> Wed, 25 March 2020 17:25 UTC

Return-Path: <0100017112b9fbb5-e808f29f-e38a-4ff4-bd61-ac93b02057a3-000000@amazonses.watsen.net>
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 74DDB3A0C2A for <netmod@ietfa.amsl.com>; Wed, 25 Mar 2020 10:25:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 2574KY8Ogz6d for <netmod@ietfa.amsl.com>; Wed, 25 Mar 2020 10:25:13 -0700 (PDT)
Received: from a48-94.smtp-out.amazonses.com (a48-94.smtp-out.amazonses.com [54.240.48.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 981913A0D11 for <netmod@ietf.org>; Wed, 25 Mar 2020 10:25:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1585157111; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=85yJ0JHAoRZjO6r2MNM7UY7j+OmNT0kTSBHl5vEcPug=; b=B3/N+V+knnocjGcSdf/dO3ooGtSY2A8/IjVR8JEVRsMYciJXEKRq++fE3tptMv+e UgrFxI8HCpVuNLB2AnKGIVgCVM8J3n1F9EyeDQT9PmSdU1rPZiDja6bxE42LQF6Pa3E WtiXQ4BYMdUduFjCHWcUfrE05qrR3mSxvUfFRDQI=
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Kent Watsen <kent@watsen.net>
In-Reply-To: <DB7PR07MB40115DC070AD529CB9CFB69FF0F10@DB7PR07MB4011.eurprd07.prod.outlook.com>
Date: Wed, 25 Mar 2020 17:25:10 +0000
Cc: "netmod@ietf.org" <netmod@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100017112b9fbb5-e808f29f-e38a-4ff4-bd61-ac93b02057a3-000000@email.amazonses.com>
References: <DB7PR07MB4011310A5327543D14FD9C19F0F20@DB7PR07MB4011.eurprd07.prod.outlook.com> <DA8180AD-7DDC-45DE-9733-A7AAFB6A2781@amsl.com> <DB7PR07MB40115DC070AD529CB9CFB69FF0F10@DB7PR07MB4011.eurprd07.prod.outlook.com>
To: =?utf-8?Q?Bal=C3=A1zs_Lengyel?= <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2020.03.25-54.240.48.94
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/FzeQUo4Vr9I1qXDiQflLdUokR98>
Subject: Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?
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: Wed, 25 Mar 2020 17:25:25 -0000

Balazs,

While possible to use the markers for instance examples...

  - they’ve never been used before, AFIAK  (historical context)
  - they're unneeded, as examples don’t contain copyright (per Lada’s comment)
  - they're disallowed by RFC 8407 for example modules (per Benoit comment)
  - as a contributor, I don’t wish to birth a new convention of using the markers for examples.  

In order to support programmatic extraction of examples from drafts, please just set the “name” attribute on the <sourcecode> or <artwork> element in the XML draft. 

2.48.2.  "name" Attribute

   A filename suitable for the contents (such as for extraction to a
   local file).  This attribute can be helpful for other kinds of tools
   (such as automated syntax checkers, which work by extracting the
   source code).  Note that the "name" attribute does not need to be
   unique for <artwork> elements in a document.  If multiple
   <sourcecode> elements have the same "name" attribute, a formatter
   might assume that the elements are all fragments of a single file,
   and such a formatter can collect those fragments for later
   processing.


Kent




> On Mar 24, 2020, at 11:33 AM, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org> wrote:
> 
> Hello,
> A reply from the rfc-editor on <CODE BEGINS>. It seems it is OK.
> Regards Balazs
> 
> -----Original Message-----
> From: Alice Russo <arusso@amsl.com> 
> Sent: 2020. március 24., kedd 16:00
> To: Balázs Lengyel <balazs.lengyel@ericsson.com>
> Cc: RFC Editor <rfc-editor@rfc-editor.org>
> Subject: Re: Where can I use <CODE BEGINS> <CODE ENDS> ?
> 
> Greetings,
> 
> Please see below.
> 
>> On Mar 21, 2020, at 8:30 AM, Balázs Lengyel <balazs.lengyel@ericsson.com> wrote:
>> 
>> Hello,
>> Sorry if I am sending this question to the wrong person. 
>> We have a discussion in the NETMOD workgroup about when is it appropriate/allowed to use the <CODE BEGINS> <CODE ENDS> markings in drafts and RFCs.
>> We regularly use it to bracket the YANG modules defined. 
>> e.g.    <CODE BEGINS> file "ietf-yang-instance-data@2020-03-19.yang" 
>> 
> 
> Just FYI, if you are using the new XML vocabulary [1], the markers can be created automatically by using markers="true"
> -- for example --
> <sourcecode name="ietf-yang-instance-data@2020-03-19.yang" type="yang" markers="true">
> 
>> However is it allowed to use it to bracket XML or json examples in drafts/rfcs? 
>> e.g.    <CODE BEGINS> file read-only-acm-rules@2020-03-19.xml
> 
> Yes, it is allowed. The markers <CODE BEGINS> and <CODE ENDS> are mentioned in the Trust Legal Provisions [2].
> 
> [1] https://www.rfc-editor.org/materials/FAQ-xml2rfcv3.html
> [2] https://trustee.ietf.org/license-info/IETF-TLP-5.htm (item 4d)
> 
> Thank you.
> RFC Editor/ar
> 
>> 
>> It is very handy that the rfcstrip tool can extract the CODE sections from a draft which facilitates checking these by external tools like yanglint. The checking is needed both for the YANG modules and the examples.
>> If you as an rfc-editor could give guidance on the issue it would be appreciated. I attached a planned draft.
>> Best regards Balazs Lengyel 
>> 
>> -- 
>> Balazs Lengyel                    Senior Specialist                       Ericsson Hungary Ltd. 
>> Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com
>> 
>> <draft-ietf-netmod-yang-instance-file-format-11.txt>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod