Subject: RFC Text to XML

From: "Adam W. Montville" <[email-masked]>
Date: Mon, 27 Oct 2014 11:22:42 -0500

Can anyone point me to a tool that converts from RFC text format to XML?

Thanks,

Adam

---

From: Shawn M Emery <[email-masked]>
Date: Mon, 27 Oct 2014 10:35:07 -0600

> Can anyone point me to a tool that converts from RFC text format to XML?

The RFC editor, [email-masked], may have the XML source for 
the RFC.  The last two that I had requested were available in XML and 
the other in nroff.

Shawn.
--

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 27 Oct 2014 17:44:07 +0100

> Can anyone point me to a tool that converts from RFC text format to XML?

What Shawn said.

But if that doesn’t work, RFCs are usually rather close to valid markdown text.

With just a very small amount of massaging, you may be able to get one of the markdown-to-RFC tools to work for you

— pandoc-rfc, documented in RFC 7328
— kramdown-rfc2629, documented at https://github.com/cabo/kramdown-rfc2629

Of course, once the text is valid markdown, you may want to continue working on that and generate the XML only for formatting and submission...

Grüße, Carsten

---

From: Tero Kivinen <[email-masked]>
Date: Mon, 27 Oct 2014 18:55:05 +0200

> Can anyone point me to a tool that converts from RFC text format to

That is not very easy task. If you need just some specific RFC (for
example to make bis document), just ask from the rfc-editor for the
xml file, they might have it (depending on the RFC).

I have done some perl scripts that parses the RFC text files, and
tries to do good ebook conversion out for that, and for that I need to
remove page breaks, line breaks from paragraphs, detect figures and
bullet lists etc, but that can never be perfect as there are so many
exceptions in different RFCs (i.e. they do not follow same rules).

So my ebook conversions (http://tools.ietf.org/ebook/) have conversion
section which describes the process I am using (and if you take the
epub version you can unzip it and get the html version used by the
ebook readers). The scripts I am using are available at
http://svn.tools.ietf.org/svn/tools/ebook/ (most likely the
rfc2html.pl is the one you are interested in).
-- 
[email-masked]

---

From: Tom Taylor <[email-masked]>
Date: Mon, 27 Oct 2014 15:41:10 -0400

I'm an outlier here, but I use a piece of software called Notetab Lite 
(Fookes Software, www.notetab.com) along with some macros I've written 
to insert XML2RFC markup. I'm happy to pass over the macros if you want 
to get the software.

Tom Taylor

---

From: "Susan Hares" <[email-masked]>
Date: Mon, 27 Oct 2014 15:52:09 -0400

Tom:

Please send me the macros.  

Sue 

-----Original Message-----
From: WGChairs [mailto:[email-masked]] On Behalf Of Tom Taylor
Sent: Monday, October 27, 2014 3:41 PM
To: [email-masked]
Subject: Re: RFC Text to XML

I'm an outlier here, but I use a piece of software called Notetab Lite
(Fookes Software, www.notetab.com) along with some macros I've written to
insert XML2RFC markup. I'm happy to pass over the macros if you want to get
the software.

Tom Taylor

---

From: Tomek Mrugalski <[email-masked]>
Date: Mon, 27 Oct 2014 21:07:39 +0100

> Can anyone point me to a tool that converts from RFC text format to XML?
I needed to convert one of the 10 years old RFCs (3315) back into xml.
Apparently, at that time xml format was not in wide-spread use. RFC
Editor and original authors only had nroff files. If I understand the
process correctly, RFC editor does the final editing steps in nroff, so
they should have nroff file for almost every RFC published (probably
except the every early ones). So I wrote this piece of code:

https://github.com/tomaszmrugalski/nroff2xml

It's not a complete solution, but it got me sufficiently close to xml
format that was almost accepted by xml2rfc. I managed to generate the
section structures, text and external references. It somewhat mangled
the figures and required manual update of the header (authors, date, name).

I got one report that it was used by someone to convert a different RFC
successfully. Please keep in mind that I'm no longer developing it. Feel
free to take over the code if you want to. Unicast me if you want write
access to this repo.

Tomek

---

From: Michael Richardson <[email-masked]>
Date: Mon, 27 Oct 2014 16:38:10 -0400

> Can anyone point me to a tool that converts from RFC text format to

I have successfully used

to convert from RFC3779 to http://datatracker.ietf.org/doc/draft-richardson-6tisch-idevid-cert/.
Tomasz created this for RFC3315bis, on which I also worked, and the result
was very useable.  We had to fix up some tables and inline ascii art, but
that was all.

To do this, you need to get the nroff from the RFC-editor, which they
have for everything.

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-

---

From: Suresh Krishnan <[email-masked]>
Date: Mon, 27 Oct 2014 21:02:50 +0000

Hi Adam,
   The closest one I know is the one Ian Chakeres did a few years ago. 
It is pretty limited, but is better than doing it by hand :-).

http://sourceforge.net/projects/rfc2xml/

Thanks
Suresh

---

From: "Acee Lindem (acee)" <[email-masked]>
Date: Tue, 28 Oct 2014 01:13:10 +0000

Hi Suresh, Adam, 
I¹ve used rfc2xml for BIS drafts as well. If you do you use it, I¹d
recommend starting with a skeleton of your new draft and only copying in
portions of the output that format correctly. It does a fair job on text
and lists - less so on more complicated constructs like figures.
Thanks,
Acee