Hi Balazs,

> Hello Kent,
> First <CODE BEGIN> <CODE END> is very handy and easier to use then xmllint.
> Also some people (not me) are writing RFCs without XML. SO if it acceptable 
> to you, the RFC editor to whoever I will use <CODE...> for the examples. Is 
> that acceptable?

Rarely do people need to extract examples from drafts.  Those wishing to 
copy/paste a snippet will likely do so via the HTML version that has its own 
(and better) way of framing examples.  Those wishing to programmatically 
process/validate the contents of the drafts (e.g., shepherd, RFC Editor, etc.) 
prefer working off the source XML.


> Folding:
> Rfcfold folds the line at a fixed 69 character length. This produces some not 
> so nice results:
> Rfcfold:
>     <inline-schema>
>       <modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-li\
> brary">
>         <module>
> Manual folding:
>     <inline-schema>
>       <modules-state \
>           xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
>         <module>
> The manual folding can keep a nice tabulation and fold the line at a word or 
> element boundary. I know such editorial niceties are very hard to program in 
> a script; but this is one reason to do manual folding.

Agreed, the artwork-folding draft says this as well.


> I used rfcfold to unfold the acme-router-modules example and I don’t notice 
> anything strange.

I remind my comment. I originally thought a couple space characters were 
missing (e.g., “foo\” should be “foo \”) but scanning again, I don’t see any 
issues now.


Thanks,
Kent



> Regards Balazs
>  
> From: Kent Watsen <[email protected] <mailto:[email protected]>> 
> Sent: 2020. március 21., szombat 0:01
> To: Balázs Lengyel <[email protected] 
> <mailto:[email protected]>>
> Cc: [email protected] <mailto:[email protected]>
> Subject: Re: [netmod] CODE BEGINS ENDS for examples ?
>  
> 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 <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 
> <[email protected] 
> <mailto:[email protected]>> 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: [email protected] 
> <mailto:[email protected]>
>  
> _______________________________________________
> netmod mailing list
> [email protected] <mailto:[email protected]>
> https://www.ietf.org/mailman/listinfo/netmod 
> <https://www.ietf.org/mailman/listinfo/netmod>
>  
> _______________________________________________
> netmod mailing list
> [email protected] <mailto:[email protected]>
> https://www.ietf.org/mailman/listinfo/netmod 
> <https://www.ietf.org/mailman/listinfo/netmod>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to