Hello,
I created an update to rfcstrip in Github.

Revision 1.1balazs - 2020-03-26
added -a option. If it is specified, the file must be an XML2RFC
XML file.
All artworks will be extracted from it if they carry a name attribute.
Artwork unfolding will also be executed.
If the artwork contains the , <CODE BEGIN/END> markers
they are removed.

Regards Balazs

-----Original Message-----
From: Balázs Lengyel <[email protected]> 
Sent: 2020. március 26., csütörtök 11:55
To: Kent Watsen <[email protected]>; Balázs Lengyel <[email protected]>
Cc: [email protected]
Subject: RE: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

Hello Kent,
OK, as you are strongly opposed to it, I will remove <CODE BEGINS> <CODE ENDS> 
in the next version.
That said, I do not really agree with you. If interested see, below.
Regards Balazs

-----Original Message-----
From: netmod <[email protected]> On Behalf Of Kent Watsen
Sent: 2020. március 25., szerda 18:25
To: Balázs Lengyel <[email protected]>
Cc: [email protected]
Subject: Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

Balazs,

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

  - they’ve never been used before, AFIAK  (historical context)
BALAZS: S0 I am a revolutionary :-)  
As I understand validation of examples have always been an issue, so making 
that more simple by automating extraction would be a step in the good direction.
  - they're unneeded, as examples don’t contain copyright (per Lada’s comment)
BALAZS: I agree that copyright is a non-issue for these examples. However <CODE 
BEGINS> is needed for another reason: easy extraction, which would make 
checking the data simpler.
  - they're disallowed by RFC 8407 for example modules (per Benoit comment)
BALAZS: strictly speaking that is about YANG examples not instance data 
examples. I also don't know/understand the reasoning behind it. A separate 
example tag would be nice, but we don't have one.
  - 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. 
BALAZS: As far as I understand sourcecode is only available in XML2RFC v3.  
Name is not handled by rfcstrip or xym. (I don't have time to update the tools 
right now.) It would be nice to have an update to rfcstrip that checks every 
<artwork> and if it has a name attribute, it extracts the content into a file 
called "name".


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 
> <[email protected]> wrote:
> 
> Hello,
> A reply from the rfc-editor on <CODE BEGINS>. It seems it is OK.
> Regards Balazs
> 
> -----Original Message-----
> From: Alice Russo <[email protected]> 
> Sent: 2020. március 24., kedd 16:00
> To: Balázs Lengyel <[email protected]>
> Cc: RFC Editor <[email protected]>
> 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 <[email protected]> 
>> 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 "[email protected]" 
>> 
> 
> 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="[email protected]" 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 [email protected]
> 
> Yes, it is allowed. The markers <CODE BEGINS> and <CODE ENDS> are mentioned 
> in the Trust Legal Provisions [2].
> 
> [1] 
> https://protect2.fireeye.com/v1/url?k=50261255-0cacc750-502652ce-861010bc36ff-8b3716f9fa495535&q=1&e=11f6fa43-0168-4d1f-8f5d-bffd46fff0d3&u=https%3A%2F%2Fwww.rfc-editor.org%2Fmaterials%2FFAQ-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: [email protected]
>> 
>> <draft-ietf-netmod-yang-instance-file-format-11.txt>
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to