XML2RFC(1)
β¨ NAME β¨
xml2rfc β bestie, this is the tool that formats RFCs using XML markup π (also it lives in section 1 of the User Commands manual, iykyk)
π DESCRIPTION π
okay so here's the whole vibe. The usage goes like this:
usage: xml2rfc [OPTIONS] SOURCE [OPTIONS]...
and for real, here's an example straight up:
xml2rfc draft.xml -b draft-foo-19 --text --html
πΈ Positional arguments:
sourceβ the Input XML file you want rendered into one or more of the available formats. no source, no slay.
π Documentation options:
Some options to generate built-in documentation. (yes, the docs document the docs, main character energy)
-h,--helpβ show a help message and exit π«Ά--docfileβ generate a documentation XML file ready for formatting--manpageβ show paged text documentation--country-helpβ show the recognized<country>strings π--pdf-helpβ show pdf generation requirements--template-dir TEMPLATE_DIRβ directory to pull thedoc.xmlanddoc.yamltemplates from. The default is the"templates"directory of the xml2rfc package--valuesβ show option values and from where they come-V,--versionβ display the version number and exit--warn-bare-unicodeβ Warn use of bare Unicode in tags where bare use of Unicode should be closely inspected π
π¦ Format selection:
One or more of the following output formats may be specified. The default is --text. The destination filename will be based on the input filename, unless --out=FILE or --basename=BASE is used.
--textβ outputs formatted text to file, with proper page breaks--htmlβ outputs formatted HTML to file--nroffβ outputs formatted nroff to file (only v2 input)--pdfβ (unavailable due to missing external library) π the pdf dream is on hold--rawβ outputs formatted text to file, unpaginated (only v2 input)--expandβ outputs XML to file with all references expanded--use-bibβ update all datatracker references with bib.ietf.org--v2v3β convert vocabulary version 2 XML to version 3--preptoolβ run preptool on the input--unprepβ reduce prepped xml to unprepped--infoβ generate a JSON file with anchor to section lookup information
β‘ Generic Switch Options:
-C,--clear-cacheβ purge the cache and exit π§Ή--debugβ Show debugging output-n,--no-dtdβ disable DTD validation step-N,--no-networkβ don't use the network to resolve references-O,--no-org-infoβ don't show author organization info on page one (legacy only)-q,--quietβ don't print anything while working π€«--skip-config-filesβ ignore config file settings--allow-local-file-accessβ Allow local file system references-r,--remove-pisβ Remove XML processing instructions-u,--utf8β generate utf8 output-v,--verboseβ print extra information
π Generic Options with Values:
-b,--basename NAMEβ specify the base name for output files-c,--cache PATHβ specify a primary cache directory to write to; default: try[ /var/cache/xml2rfc, ~/.cache/xml2rfc ]--config-file FILEβ specify a configuration file-d,--dtd DTDFILEβ specify an alternate dtd file-D,--date DATEβ run as if the date is DATE (format:yyyy-mm-dd). Default: Today's date π-f,--filename FILEβ Deprecated. The same as-oπ (it's giving legacy, use-obestie)-i,--indent INDENTβ With some v3 formatters: Indentation to use when pretty-printing XML-o,--out FILEβ specify an explicit output filename-p,--path PATHβ specify the directory path for output files-s,--silence STRINGβ Silence any warning beginning with the given string
π Generic Format Options:
--v3β with--textand--html: use the v3 formatter, rather than the legacy one--legacy,--v2β with--textand--html: use the legacy output formatters, rather than the v3 ones--id-is-work-in-progressβ in references, refer to Internet-Drafts as "Work in Progress"
π Text Format Options:
--no-headersβ calculate page breaks, and emit form feeds and page top spacing, but omit headers and footers from the paginated format--legacy-list-symbolsβ use the legacy list bullet symbols, rather than the new ones--legacy-date-formatβ use the legacy date format, rather than the new one--no-legacy-date-formatβ don't use the legacy date format--list-symbols 4*CHARβ use the characters given as list bullet symbols--bom,--BOMβ Add a BOM (unicode byte order mark) to the start of text files--paginate,--paginationβ do pagination-P,--no-paginationβ don't do pagination of v3 draft text format--table-hyphen-breaksβ More easily do line breaks after hyphens in table cells to give a more compact table--table-borders {full,light,minimal,min}β The style of table borders to use for text output; one offull/light/minimal--rfc-html-archive-url RFC_HTML_ARCHIVE_URLβ URL for HTML file archive of RFCs--id-html-archive-url ID_HTML_ARCHIVE_URLβ URL for HTML file archive Internet-Drafts
β¨ Html Format Options:
--css FILEβ Use the given CSS file instead of the builtin--external-cssβ place css in external files--no-external-cssβ don't place css in external files--external-jsβ place js in external files--no-external-jsβ don't place js in external files--rfc-base-url RFC_BASE_URLβ Base URL for RFC links--id-base-url ID_BASE_URLβ Base URL for Internet-Draft links--rfc-reference-base-url RFC_REFERENCE_BASE_URLβ Base URL for RFC reference targets, replacing thetarget="..."value given in the reference entry--id-reference-base-url ID_REFERENCE_BASE_URLβ Base URL for I-D reference targets--metadata-js-url METADATA_JS_URLβ URL for the metadata script--no-rfc-localβ Do not link torfc-local.css
π§ V2-V3 Converter Options:
--add-xincludeβ replace reference elements with RFC and Internet-Draft seriesInfo with the appropriate XInclude element--draft-revisions,--draft-revsβ Reference explicit draft revisions when inserting XIncludes for draft references--strictβ be strict about stripping some deprecated attributes
π Preptool Options:
--accept-preppedβ accept already prepped input
π okay that's literally the whole page bestie, every flag accounted for, no notes, ate and left no crumbs
This lil manual page is xml2rfc 3.30.2, dated September 2025 β and that's the official source/version + date sign-off, periodt π β¨
π¦ where this page comes from
- ubuntu resolute: xml2rfc 3.30.2-1 Β· BSD-3-Clause
- ubuntu stonking: xml2rfc 3.30.2-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms