xml2rfc (version v1)


A handy little tool, xml2rfc, will allow you to take your XML source (using the format defined in RFC 2629 and its unofficial successor) and see how the results look like in the original ASCII look-and-feel or the new modern HTML rendition of that look-and-feel.

NOTE: This page points at the old version v1 of xml2rfc. You may use this version to generate drafts, but after June 30, 2014, XML submitted to the RFC Editor XML must be able to be processed by the v2 version.

Conversion

  1. Download xml2rfc as a zip or tgz file, or
  2. Try your results in this handy converter form:
Convert Your XML Source
 Input file
Output format
Text: plaintext ... unpaginated PDF
Web page: HTML PDF ePub
Other: nroff expanded XML
Options
 Checking Strict Fast
 Output result Use frames to show Warnings & Errors Window File

Living on the edge?

Here is the current development release.

March 2011 release

Version 1.36 is available. Here's the README file.

Major new xml2rfc features include:

  • Generate proper boilerplate for RFC generation (RFC 5741). (Also see the RFC Editor's status-memos page.)
  • Support for the new <rfc> consensus= attribute to help support RFC 5741.
  • Support for the new <?rfc text-list-symbols="o*+-"?> processing instruction. Modify the list of symbols used for list style="symbols". The default is "o*+-", but can be set to any list of characters. For example, specifying "abcde" will cause "a" to be used for 1st level, "b" for the 2nd level, etc, cycling back to the first character "a" at the 6th level. Specifying "o*" will cause the characters "o" and "*" to be alternated for each successive level.

Major new web features include:

  • New options in web form to generate ePub and PDF.
  • New option in web form to show trace and warning messages along with the output, using frames. This is the default.
  • New option in web form to do strict DTD checking.
  • New advanced web form (see bottom of this page) to: generate HTML using Julian Reschke's XSLT, generate Postscript, and generate RTF.
Please note that the current version of xml2rfc produces boilerplate text which is fully compliant with the latest IETF Trust Legal Provisions Document.

To generate the latest boilerplate, please use these settings in your .xml source file:
in the <rfc /> element: use one of these attributes:
  • ipr='trust200902'
    • This is appropriate for most drafts, where the entire content of the draft is written by the draft's authors, or all authors of other material have given explicit permission to use their work.
  • ipr='noModificationTrust200902'
    • This is appropriate for drafts where the authors wish to place the additional condition that if the draft is published as an RFC, it must have no changes other than formatting.  An example might be a document published by another organization that permits copying but not modification.
  • ipr='noDerivativesTrust200902'
    • This is appropriate for drafts not intended to be published as RFCs.
  • ipr='pre5378Trust200902'
    • This is appropriate for drafts that include material submitted to the IETF prior to RFC 5378 (10 Nov 2008), where the authors of that material have not given explicit permission to use their work in this draft.  An example might be a draft using material from an RFC whose author has died or cannot be located, or who thinks your draft is
      stupid.
and use a year= and month= in the <date /> element (which controls the date in the document header) with a date of 2010-04-01 or later.

Citation Libraries

citation
library
retrieve entire directory
as a file
retrieve entire directory using
wget -r -l 1 -A .xml -nd -nc ...
rss
feed

rsync
RFC zip or tgz http://xml.resource.org/public/rfc/bibxml/ rss 1.0 yes
Internet-Draft zip or tgz http://xml.resource.org/public/rfc/bibxml3/ rss 1.0 yes
W3C zip or tgz public/rfc/bibxml4/ rss 1.0 yes
JSF zip or tgz http://www.xmpp.org/extensions/refs/ rss 0.92 no
3GPP zip or tgz http://xml.resource.org/public/rfc/bibxml5/ rss 1.0 yes
Miscellaneous zip or tgz http://xml.resource.org/public/rfc/bibxml2/ no yes

rsync access is available at two independent servers (rsync1.xml.resource.org::xml2rfc.bibxml, and rsync3.xml.resource.org::xml2rfc.bibxml) — after you pick one, you shouldn't switch. 

Helpful Hints

See the xml2rfc FAQ for answers to common questions.

Normative References

If you need to have multiple references sections, try something like this:

    <back>
<references title='Normative References'>
...
</references>
<references title='Informative References'>
...
</references>
</back>

That's right: the <references/> element may occur more than once in the back section, and has an optional 'title' attribute.

Including files

Use the XML external entity mechanism, e.g.,

    <?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [

<!ENTITY rfc2629 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml'>

]>

...

<t>This document was constructed using the <xref target="RFC2629" /> DTD.</t>

...

<references>
...
&rfc2629;
...
</references>

Note that this syntax is rather pedantic, i.e., you declare the entity toward the top of your file and then you invoke it exactly once (using an "&") in the <references/> element to include it.

Take a look at this file, provided by Dan Kohn. In addition to showing a complete example, it also works with the XSL transformation written by Julian Reschke and the DTD. (Depending on the capabilities of your browser, instead of clicking on these links directly, you may want to download these three files using "Save Target As...")

To try out this sample, you'll need to put all three files in the same directory. Also, note that some XSLT processors disable the use of external entities, you may need to check "Preferences" to see if there's an option to enable their use.

Notes for Authors

Templates

The IETF Tools Team maintains a library of templates you can use for different kinds of drafts.

Using your source file

When submitting an Internet-Draft using the IETF Internet-Draft Submission Tool, you can upload the XML source file in addition to the text file. If your draft is approved for publication as an RFC, the RFC Editor will retrieve the XML file from the I-D repository, or you can submit it directly to the RFC Editor.

When published

To improve the quality of the citation library, send a copy of the updated XML file here. Thanks!

Advanced Conversions

This version of the conversion form supports all combinations and output formats that are currently available.
Convert Your XML Source
 Input file
 Output mode Text HTML (via xslt) nroff unpaginated XML
 Output format ASCII PDF ePub RTF PostScript
 Checking Strict Fast
 Output result Use frames to show Warnings & Errors Window File

Questions? Try the mailing list.