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?
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.
I used rfcfold to unfold the acme-router-modules example and I don’t notice
anything strange.
Regards Balazs
From: Kent Watsen <[email protected]>
Sent: 2020. március 21., szombat 0:01
To: Balázs Lengyel <[email protected]>
Cc: [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 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:
<mailto:[email protected]> [email protected]
_______________________________________________
netmod mailing list
<mailto:[email protected]> [email protected]
<https://www.ietf.org/mailman/listinfo/netmod>
https://www.ietf.org/mailman/listinfo/netmod
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
