XML2RFC(1)

πŸ“¦
version 3.30.2 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

✨ 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 the doc.xml and doc.yaml templates 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 -o bestie)
  • -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 --text and --html: use the v3 formatter, rather than the legacy one
  • --legacy, --v2 β€” with --text and --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 of full/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 the target="..." 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 to rfc-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