[rfc-i] draft-iab-xml2rfc-02 - alignment of sourcecode

Carsten Bormann cabo at tzi.org
Thu Feb 4 13:03:21 PST 2016

> Even better would be if we had a way to hide a <sourcecode> block. 

I've needed this already.
(Worked around by providing some cheesy text around it that supplies a
reason for it to be visible.)

> When I wrote one of my books many years ago, I used tricks like this to have code that printed in the book well, but was also extractable and directly compilable. That way every bit of code I had was fully compiled and tested. I’m extrapolating from that experience into xml2rfc.

All hail continuous integration.

(The alternative is of course to provide sophisticated Makefiles around
the actual source text and include generated text in the document.
Worked for me in RFC 7400 or RFC 7049 [which has two errata exactly
where we didn't use this recipe].  See
https://github.com/cose-wg/cose-spec for a current example for how to do
this in XML -- much easier in kramdown of course :-)

Grüße, Carsten

More information about the rfc-interest mailing list