`, corrected capitalisation using the 'capfirst' filter.
- Updated hastext() and iscomment() to do the right thing if given content with embedded xml processing instructions.
- Tweaked the handling of default values for --date, so as to give better documentation of the option, and also tweaked the help text for --table-borders.
- Added a class utility method to get any current PI related to a given setting, and fixed another case of template path default value, related to [c51345a](https://github.com/ietf-tools/xml2rfc/commit/c51345ae3a908a7e6bed382f213412ca311b6ac0).
- Added PI support for text table borders setting, and improved the text table output for transitions between `` and ` ` rows for 'light' and 'minimal' borders.
- Added makefile support for testing of the --manpage and --docfile switches. Added silencing of one unavoidable warning in the test of --unprep.
## [2.46.0] - 2020-06-23
- Added ` ` and ` ` entries in additional places, as a workaround for WeasyPrint's eagerness to break between `` and ` `. Fixes issue [#529](https://github.com/ietf-tools/xml2rfc/issues/529).
- Tweaked the rendering of `` inside table cells in text mode to not use double quotes to distinguish the `` content from surrounding text when the only cell content is the `` element.
- Modified the text rendering of table cells. `` and ` ` now implies no special rendering (earlier, they caused a change in table border on transition) while `` now always renders with distinct borders compared with ` `. Also added 'light', and 'minimal' table renderings, with different table border settings when compared to the previous rendering, which now is available as 'full'. The 'light' rendering is closer to the v2 formatter table rendering, but does not permit table cells with colspan or rowspan different from 1 to be properly distinguished. The changes in ` ` rendering fixes issue [#527](https://github.com/ietf-tools/xml2rfc/issues/527).
- Added a --table-borders option with possible values 'full', 'light', 'minimal', to control the table rendering of the text renderer. The current default value is 'full', but 'light' is closer to the v2 text renderer's output.
- Added a new internal join/indent setting to the Joiner nametuple to control outdenting. Used the outdenting setting to enable outdenting for artwork wider than 69 characters in the v3 text renderer. Fixes issue [#518](https://github.com/ietf-tools/xml2rfc/issues/518).
- Added missing support for @indent for `` in the HTML renderer, and tweaked the same for ``. Fixes issue [#528](https://github.com/ietf-tools/xml2rfc/issues/528).
- Corrected is_htmlblock() to not count ``, ` `, and `` as block elements as they cannot be wrapped in ``.
- Updated and refined the div-wrapping used to introduce additional IDs to deal better with anchors on `
`, ` `, and ``. Fixes issue [#530](https://github.com/ietf-tools/xml2rfc/issues/530).
- Made the CSS setting of background colour on `` and `` more selective in order not to interfere with background colour in tables, for instance.
- Removed CSS that made URLs in references not break across lines -- the drawbacks turn out to be more of a bother than the original reason not to let these wrap.
- Did some HTML cleanup to make the w3.org validator happy.
- Fixed a few places in the HTML renderer where an empty tag could cause an exception.
- Added test cases for empty and double email addresses, and added support for multiple email addresses within an author's address block. Fixes issue [#522](https://github.com/ietf-tools/xml2rfc/issues/522).
## [2.45.3] - 2020-06-08
- Fixed an issue with rendering empty ` ` elements.
## [2.45.2] - 2020-06-02
- Fixed the HTML styling of `` lists, which wasn't really compact.
## [2.45.1] - 2020-05-30
- Changed the handling of hyphens in table cells, so as to introduce line breaks on hyphens if necessary to keep a table from becoming too wide (but not otherwise). The --table-hyphen-breaks switch can be used to permit line breaks on hyphens in table cells also for tables that would not otherwise become too wide.
- Added a switch --table-hyphen-breaks that will make the text renderer more eager to break on hyphens in table cells.
- Using a pilcrow on an otherwise empty element added unwanted vertical space in the HTML output; avoid this. Related to issue [#508](https://github.com/ietf-tools/xml2rfc/issues/508).
- Added a parameter to TextSplitter to control whether text is split on hyphens or not.
## [2.45.0] - 2020-05-27
- Fixed the html rendering of `` with display=false. Fixes issue [#516](https://github.com/ietf-tools/xml2rfc/issues/516).
- Fixed the text rendering of `` with display=false. Fixes issue [#515](https://github.com/ietf-tools/xml2rfc/issues/515).
- Fixed an error in postal address rendering for Sweden. Fixes issue [#520](https://github.com/ietf-tools/xml2rfc/issues/520).
- Changed the internals of the text formatter to retain ` ` information for longer internally, in order to make ` ` have effect in for instance `` and `` element text. Fixes issues [#508](https://github.com/ietf-tools/xml2rfc/issues/508) and [#513](https://github.com/ietf-tools/xml2rfc/issues/513).
- Fixed erroneous indentation of first line of second and following paragraphs of multi-paragraph `` elements, and changed code to retain ` ` in filled text.
- Added a font-family setting for @page in PDF mode, and added code to warn about missing Roboto Mono fonts if the python-fontconfig package is available
- Added instructions for RobotoMono to the installation help for the --pdf switch.
## [2.44.0] - 2020-04-22
- Added an '--unprep' switch and formatter to undo changes made by '--prep' which make a file unsuitable for continued editing. This will help the RPC when the .xml file received from draft authors for an upcoming RFC is in 'prepped' format.
- Updated the v3 --expand formatter to expand external sourcecode and artwork, in addition to handling XIncludes. This should make it possible to produce single consolidated .xml files without using the --prep workaround.
- Did some refactoring, moving the dispatch method that calls processing methods based on XPath expressions, and some other generic methods, into the V3 formatter base class.
- Moved slugify() function, used in several writers, from v2v3 to utils.py.
- Did a minor CSS tweak to improve orphan/widow handling of `` elements.
## [2.43.0] - 2020-04-14
- Added a workaround for weasyprint's extreme unwillingness to break between `` and ` `, which looks like a bug. Fixes issue [#514](https://github.com/ietf-tools/xml2rfc/issues/514).
- Fixed a discrepancy in address handling between text and html output. Fixes issue [#509](https://github.com/ietf-tools/xml2rfc/issues/509)
- Added more flexible text formatter handling of orphans and widows, and changed the default orphans/widows setting to 2 (matching the default CSS setting).
- Changed the CSS to not page break before the ToC, support keepWithPrevious, and deal better with how some artwork, figures and tables break across pages. Fixes issue [#511](https://github.com/ietf-tools/xml2rfc/issues/511).
- Changed the keepWithNext handling for the generated ToC to group the first 3 lines together, to avoid one-line orphans when page-breaking the ToC. Also fixed some pyflakes issues with regex strings.
- Added text formatter support for 'keepWithPrevious', even if the preptool generally converts 'keepWithPrevious' to 'keepWithNext' on the previous element.
- Added setting '.keepWithPrevious' on html elements when set on the precursor xml element.
- Added v2v3 converter code to set 'keepWithNext' and 'keepWithPrevious' when converting `` and `` elements to `` elements, to keep the grouping.
- Added code to the command-line runner to set some option default values that don't have matchinb command-line switches.
- Added default settings for orphans and widows during text rendering.
- Reduced the CSS font-family for body to only Noto Serif. Addresses issue [#500](https://github.com/ietf-tools/xml2rfc/issues/500).
## [2.42.0] - 2020-04-02
- Changed the minimum whitespace distance between Updates/Obsoletes/etc. and Author/Organization in the document header in text rendering back to the value used in the v2 renderer (4 spaces) instead of the value used recently (3 spaces).
- Added a guard against trying to normalize whitespace text that is None.
- Added a guard against trying to create `` entries for reference content, avoiding a later exception. Fixes issue [#501](https://github.com/ietf-tools/xml2rfc/issues/501).
- Changed the approach to avoiding page breaks inside artwork etc., and added styling to prevent page breaks between `` and ` ` in a ``. Fixes issues [#461](https://github.com/ietf-tools/xml2rfc/issues/461), [#463](https://github.com/ietf-tools/xml2rfc/issues/463), and [#491](https://github.com/ietf-tools/xml2rfc/issues/491)
- Did a variable name change and removed a 'del', to deal with a pyflakes issue under 2.7. Fixes issue [#504](https://github.com/ietf-tools/xml2rfc/issues/504).
- Added missing keepWithNext support for PDF output.
- Added a `--v2` switch with the same meaning as `--legacy`.
## [2.41.0] - 2020-03-20
- Added `` to the tags that may have bare unicode content. Fixes issue [#499](https://github.com/ietf-tools/xml2rfc/issues/499).
- Tweaked the CSS for dl.olPercent dd. Fixes issue [#458](https://github.com/ietf-tools/xml2rfc/issues/458).
- Fixed an issue with rendering `` entries without trailing text or whitespace.
- Fixed an issue in the v2v3 converter that could occur if no `` element is present.
- Fixed an issue with using Latin content in ``, also addressing the same issue for other `` sub-elements. Related to issue [#493](https://github.com/ietf-tools/xml2rfc/issues/493).
- Fixed an issue with the formatting of a warning message.
- Fixed a Py2/3 issue with the `--country-help` output.
## [2.40.1] - 2020-02-27
- Applied patch from mt@lowentropy.net to simplify javascript and handle more page width responsiveness in CSS.
- Made table and row borders the same for print and HTML on request from the RPC, and increased the contrast between borders and odd row background colour slightly. Fixes issue [#494](https://github.com/ietf-tools/xml2rfc/issues/494).
## [2.40.0] - 2020-02-18
- Worked around weasyprint's failure to honour `` type attributes by using the appropriate CSS list-style-type to control the list style. Fixes issue [#489](https://github.com/ietf-tools/xml2rfc/issues/489).
- Added ` ` to the v3 grammar. Fixes issue [#492](https://github.com/ietf-tools/xml2rfc/issues/492).
- Fixed an issue where comments inside ascii-art artwork would cause following artwork not to be rendered.
- Fixed an issue where use of .splitlines() instead of .split('\n') caused unexpected removal of blank lines at the beginning or end of artwork.
- Allowed Latin script content in `` without requiring an ascii attribute, to match the treatment of author and contact names. Fixes issue [#493](https://github.com/ietf-tools/xml2rfc/issues/493)
- Added additional error information when text content is found where the schema does not allow it.
- Fixed an issue where trailing whitespace in artwork can trigger bad rendering, by removing whitespace at the end of lines in `` and ``. Fixes issue [#490](https://github.com/ietf-tools/xml2rfc/issues/490)
- Changed the plain text URL for the trust license-info in TLP boilerplate to an `` also for IAB documents. Fixes issue [#456](https://github.com/ietf-tools/xml2rfc/issues/456).
- Removed indentation from lists rendered in table cells.
- Fixed an incorrect attribute grouping in the v3 schema
- Fixed two off-by-one errors in the calculation of the length of Updates/Obsoletes lists. Addresses issue [#472](https://github.com/ietf-tools/xml2rfc/issues/472)
## [2.39.0] - 2020-01-31
- Provided a rendering for `` with reference targets which are part of a `` and don't have a reference tag.
- Added a --pdf-help command-like option, and tweaked the order of some command-line options in the --help output.
- Added a new filter for pdf-gneration library warnings, to avoid it appearing on every xml2rfc invocation.
- Added a v2v3 converter for dates with non-numeric years.
- Added an error for attempting to insert a missing XInclude namespace prefix when 'xi' is already defined as something else.
- Fixed a bug introduced with the refactoring in [c01225d](https://github.com/ietf-tools/xml2rfc/commit/c01225d06afa7390217c743af2a271e649e2626e).
## [2.38.2] - 2020-01-27
- Provided a rendering for `` with reference targets which are part of a `` and don't have a reference tag.
- Added a --pdf-help command-line option, and tweaked the order of some command-line options in the --help output.
- Added a new filter for pdf-gneration library warnings, to avoid it appearing on every xml2rfc invocation.
- Added a v2v3 converter for dates with non-numeric years.
- Added an error for attempting to insert a missing XInclude namespace prefix when 'xi' is already defined as something else.
- Fixed a bug introduced with the refactoring in [c01225d](https://github.com/ietf-tools/xml2rfc/commit/c01225d06afa7390217c743af2a271e649e2626e).
## [2.38.1] - 2020-01-20
- Added a preptool check for numbered sections occurring after or under unnumbered sections, and changed the code for Reference sections to not emit section numbers if the previous section was unnumbered. Fixes issue [#433](https://github.com/ietf-tools/xml2rfc/issues/433)
- Refactored the code for reference anchor to display string mapping, locating it in a base class method. Updated it to honour the symRefs setting. Fixes issue [#476](https://github.com/ietf-tools/xml2rfc/issues/476).
- Added installation of Python 3.8 to Dockerfile, and updated the minor version numbers for the other Python installation stanzas.
- Fixed a problem rendering multiple authors with organization `showOnFrontPage='false` Further addresses issue [#483](https://github.com/ietf-tools/xml2rfc/issues/483).
- Added a switch `--no-external-js`, and some other `--no-*` switches to invert boolean settings. Fixes issue [#486](https://github.com/ietf-tools/xml2rfc/issues/486).
- Added an early return from `cache()` when repeated attempts to fetch an URL fails.
## [2.38.0] - 2020-01-14
- Tweaked the preptool handling of `` in ``. Further addresses issue [#466](https://github.com/ietf-tools/xml2rfc/issues/466), fixing an issue that could occur if a section used for instance `` or ``.
- Fixed an off-by-one error in list indexing during text wrapping of first page header content. Fixes issue [#483](https://github.com/ietf-tools/xml2rfc/issues/483).
- Tweaked the output for `` when refering to Reference entries.
- Fixed a Py2/Py3 code compatibility issue
- Tweaked the handling of `` to insert '(Artwork only available as ...)' text also for text content which is only whitespace.
- Changed utils.isblock() to use a list of element tags derived from the schema instead of a static list, to avoid discrepancies between schema and code.
- Changed the parser's handling of inter-element blank text to keep instead of remove, in order to not drop intentional blank space between for instance `` instances.
- Reverted the silencing of warnings related to postal address input. Addresses issue [#437](https://github.com/ietf-tools/xml2rfc/issues/437).
- Added code to deal better with `` as a direct child of ``. Fixes issue [#479](https://github.com/ietf-tools/xml2rfc/issues/479).
- Fixed a bug where text after `` was lost by the text formatter. Fixes issue [#480](https://github.com/ietf-tools/xml2rfc/issues/480)
- Added an option to list recognised country names for use with ``, and changed the note() emitted for unrecognized countries to a warning. Added some new alternative country strings.
- Updated test masters
- Fixed a problem with `` entries with only `` information. Fixes issue [#424](https://github.com/ietf-tools/xml2rfc/issues/424).
- Added a minimum width setting for tables, in order to avoid table captions rendering in very narrow space when the table itself is narrow. Fixes issue [#482](https://github.com/ietf-tools/xml2rfc/issues/482).
- Avoid double space after initial when `` is rendered inline. Fixes issue [#478](https://github.com/ietf-tools/xml2rfc/issues/478).
- Added code to recognise another case of inconsistent table row cell counts and report the issue.
- Added 'P.R. China' as a recognized country name.
- From Python 3.2 and later, cgi.encode() is deprecated. Changed to use html.encode() instead.
## [2.37.3] - 2019-12-22
- Undid margin-left: 0 for `` from the original supplied CSS, which caused nested lists to not have any distinction between levels. Fixes issue [#458](https://github.com/ietf-tools/xml2rfc/issues/458).
- Tweaked the margin of block elements within ``. Fixes issue [#469](https://github.com/ietf-tools/xml2rfc/issues/469).
- Added `` and `` to list of block elements. Fixes issue [#453](https://github.com/ietf-tools/xml2rfc/issues/453).
- Treated pilcrows on sourcecode within figure the same way as artwork within figure (don't add a pilcrow, since the figure title already provides an anchor). Fixes issue [#475](https://github.com/ietf-tools/xml2rfc/issues/475).
- Don't use both @seriesNo and `` to emit series number. Fixes issue [#477](https://github.com/ietf-tools/xml2rfc/issues/477).
- Added code to adapt the line break position for long Updates: and Obsoletes: entries for long right-column entries. Fixes issue [#472](https://github.com/ietf-tools/xml2rfc/issues/472).
- Added normalization before the comparison that determines if `` text content is different from derivedContent or not, and should be emitted in addition to the derivedContent. Fixes issue [#466](https://github.com/ietf-tools/xml2rfc/issues/466).
- Fixed a case where simple derivedContent was used instead of fully rendered explicit `` text content where available. Fixes issue [#474](https://github.com/ietf-tools/xml2rfc/issues/474).
## [2.37.2] - 2019-12-17
- Refined the non-ascii punctuation (smart-quotes, etc.) downcoding, and eliminated a couple of bugs that could lead to infinite looping or crash. Fixes issue [#473](https://github.com/ietf-tools/xml2rfc/issues/473).
- Made the xref labels used for different @section values work for additional value types.
- Fixed a couple of preptool bugs found during debugging of issue [#473](https://github.com/ietf-tools/xml2rfc/issues/473).
## [2.37.1] - 2019-12-12
- Fixed a bug in the text formatter pagination code where it incorrectly tried to annotate Comment and PI nodes with page number information.
- Updated the v2v3 converter to do essentially what it did before v2.37 with respect to unicode downcoding, but with more explicit calls.
- Added a base writer method to downcode reference punctuation.
- Moved the list of (tag, attr) combinations that permit unicode values into util.unicode. Rewrote docwncode_punctuation() to only touch punctuation.
- Restored lost trailing text after `` in `` context for text output.
## [2.37.0] - 2019-12-10
- Added a new element `` with the same attributes and child elements as ``, except for @role. As a child element of `` it will create a name and address block, as for authors in the Authors' Addresses section; as a child of `` it will create an inline name entry, similar to `` in citations.
- Changed the handling of block elements within table cells to re-wrap for better column fit. Fixes issue [#454](https://github.com/ietf-tools/xml2rfc/issues/454).
- Added an error for references without anchor (in v2; in v3 this will be caught by the schema validation step). Fixes issue [#412](https://github.com/ietf-tools/xml2rfc/issues/412).
- Changed error handling in a couple of places so as to result in non-zero command-line exit values on errors. Fixes issue [#464](https://github.com/ietf-tools/xml2rfc/issues/464).
- Tweaked the `` text renderer to not apply `` paragraph filling to the `` content. Fixes an issue raised by resnick@episteme.net.
- Changed layout of multiple instances of `` and ```` to show on separate lines instead of one line, comma-separated. Changed one notice message to warning.
- Added an option to silence warnings and notices starting with given strings.
- Changed the HTML renderer to not emit email information in both primary and alternative author address blocks.
- Added a test case using the new `` element, and added a couple of email addresses for increased coverage of email address placement when non-ascii address information is present.
- Updated the handling of non-latin address information in the text format to follow RFC7997 and the HTML output more closely.
- Added generation of v3.rng from v3.rnc to the Makefile, and fixed a schema error in the .rng file
- Changed the default content downcoding done for things like 'smart quotes' to only apply to text content, not to XML element attributes.
## [2.36.0] - 2019-12-02
- Improved support for internal xref to ``, giving 'Section X, Paragraph Y, Item Z'. Tweaked the output for xrefs to ` ` with format='counter' to not include trailing period.
- Stripped away some cases of leading punctuation on incomplete postal address lines.
- Fixed an issue with multi-part `` lists with the same group setting.
- Added support for tables in list items, on request from the RPC, in order to match the needs of a couple of recent RFCs-to-be.
- Improved output format handling of postal addresses for countries with non-latin scripts where the XML address content is ASCII, rather than the expected native script.
- Fixed the isempty() utility function to correctly return False for elements containing comments with trailing text. Fixes issue [#455](https://github.com/ietf-tools/xml2rfc/issues/455).
- Added some cases of normalization of postal code during v2v3 conversion.
- Added bottom margin space for artwork in print output, to match that for sourcecode.
## [2.35.0] - 2019-11-12
- Changed the pn numbers for ToC entries to use 'section-toc.1-...' instead of 'section-boilerplate.3-...'.
- Fixed schema and code so as to correctly show `` entries with superscript (and more) in the ToC.
- Added code to clean out instances of ` ` and other special characters when rendering ToC, title, xref and reference.
- Eliminated postal address lines with only template content, i.e., no `` content, from output renderings.
- Fixed a typo in the v2v3 converter which caused conversion of the tocdepth PI to fail.
- Added handling of `` name attributes which were too long to fit on the same line as the marker, and added a specific indentation setting for `` within ``, to avoid extra indentation.
- For source code with markers and file name, only emit file name if actually set. Fixes an issue with the HTML renderer.
- Added the same in-figure indent for sourcecode as for artwork, to avoid extra indentation.
- Removed an extraneous leading comma in reference rendering for references without author information.
- Added CSS for bottom margin after `` rendering in print.
- Added a missing conversion of attribute value 'no' to 'false' in the v2v3 converter.
- Tweaked the text width when folding hang text.
- Changed the location and method of checking and catching non-ascii characters in XML input declared with encoding='us-ascii'.
- Added warnings for tabs in artwork and sourcecode.
- Added a warning for long lines in v3 text ouput.
- Added a new metadata.js file from the RPC, with copyright and license information and a code tweak.
- Refactored extract_date() into one extraction function and one augmentation function, in order to render references with missing date info correctly. Also updated renderers to handle this case appropriately.
- Fixed an inconsistency in requiring the ascii attribute for Latin script non-ascii names.
- Corrected a buggy format string. Fixes issue [#449](https://github.com/ietf-tools/xml2rfc/issues/449).
- Added an error if pn numbers are present in a file which is not marked with prepTime.
- Corrected the indentation for `` in table cells.
- Fixed an issue with duplicate pn numbers for `` in table cells.
## [2.34.0] - 2019-10-23
- Made preptool reference sorting honour the sortRefs `` attribute when symRefs is true.
- Fixed an issue with v2v3 conversion of PIs to `` attributes, where PIs occuring before `` would not be processed.
- Fixed the v3 text output for authors with no organization to output blank lines, as for v2.
- Changed the rendering of `` with section reference and text content, based on input from the RPC.
- Fixed an issue with ` ` in section headers not being handled properly by PDF viewers, by using plain space instead of non-breaking space.
- Fixed an issue with sizing of SVG artwork in PDF renderings.
- Fixed a validation problem for an empty boilerplate element for ipr='none'.
- Added a `` entry in ````, and moved table of contents XML from `` to ``.
- Fixed an issue with the use of seriesInfo for top first page of v3 text output.
- Added support for a new attribute 'brackets { "none" | "angle" }? for ``, on request from the RPC.
- Changed the rendering of ``` ` so as to insert a newline if the ` ` entry extends too close to the right-hand margin.
- Tweaked the removal of PIs during the preptool phase to occur before writing prepped content out to file, rather than earlier, in order to preserve PIs when prep() is used by xml2rfc internally.
- Added a warning for SVG content that won't scale.
- Added 'dd' to is_htmlblock(). One effect of this is to let ` ` to be link targets for `` when generating HTML output.
- Changed the schema for `` to a workable but less precise expression because the RFC7991bis generation scripts don't support the RNG `` construct.
## [2.33.0] - 2019-10-16
- Added an error message for a case that would otherwise break text table generation.
- Added whitespace normalization for postal address tags, bcp14, and similar.
- Fixed an issue with some special names like S/MIME in artwork.
- Removed conditional insertion of `` width= and height=, leaving that up to the author.
- Removed a page break restriction that could cause unwanted page breaks after reference section titles.
- Fixed issues with added or omitted spaces in line-broken URLs and other items.
- Updated metadata.js to a new version received from the RPC
- Added conversion of some unicode code points to XML entities to the v2v3 converter, in order to make later editing easier.
## [2.32.0] - 2019-10-04
- Adjusted print font sizes, which were in some cases overly large.
- Added CSS page-break settings to avoid PDF page breaks inside tables and references.
- Tweaked the styling of `` to be more aligned with the W3C description of the element.
- Added support for the --legacy-date-format when generating the boilerplate expiry date.
- Fixed an issue with the text width in `` text rendering.
- Improved the handling of U+2028 in text output, and fixed a bug in the handling of U+2028 in the HTML output.
- Changed default value for --id-is-work-in-progress to True
- Fixed an issue with incorrect section links to appendices.
- Fixed a misspelling of "don't". Fixes issue [#434](https://github.com/ietf-tools/xml2rfc/issues/434).
- Added styling to make HTML `` rendering of XML `` more like the HTML `` and `` rendering.
## [2.31.0] - 2019-09-25
This release adds a feature to help with conditional line breaking inside table cells, and tweaks the layout of text in cells slightly. It also fixes an incorrect line-break point and second-line indentation for long section titles in the v3 text formatter. From the commit log:
- Fixed an issue with leading and trailing space padding in table cells, and refined it to consider the alignment setting.
- Modified the text formatter to accept `&zwsp;` as a potential line-break point.
- Included zwsp in allowed special characters (in addition to nbsp, nbhy, word-joiner and line-separator).
- Fixed the line-breaking and second-line indentation of section titles in v3 text output.
- The start of an emacs nXML mode schema which explicitly mentions xinclud in a couple of places.
- Removed code left in pdf.py by mistake, and set options.pdf=True when in the PdfWriter.
## [2.30.0] - 2019-09-19
- Added logging configuration for weasyprint. This controls the logging level based on the --quiet and --verbose flags, and should make weasyprint logging ouput more consistent across systems.
- Weasyprint reports ERROR if a CSS ` ` URL isn't available, so we won't insert a ` ` for "rfc-local.css" when generating PDF if the file doesn't exist.
- Tweaked the Makefile to use --add-include in some cases, for regression testing.
- Corrected the `` links produced during v2v3 conversion with the --add-xinclude switch,
- Changed the code to not retain declarations after v2v3 conversion.
- Changed BaseV3Writer.die() to raise an exception, rather than exit on the spot, in order to do the right thing when called as a library.
- Tweaked the command-line messages when a fatal error is raised in a writer.
## [2.29.1] - 2019-09-18
- Fixed an issue with pagination that could occur if a table (or other block) longer than a page ended on the last page.
## [2.29.0] - 2019-09-17
- Adjusted the handling of ASCII, Latin, and non-Latin names and abbreviation in the v3 text formatter to act the same way as the v3 HTML formatter.
- Added RFC #### to the HTML rendered document title (for RFCs).
- Added `` in the schema in two places that were missed when first introducing it.
- Changed the metadata json URL to avoid CORS issues due to redirects. Added a missing JS 'var' keyword and fixed a typo.
- Handled a file open mode deprecation issue. Fixes issue [#427](https://github.com/ietf-tools/xml2rfc/issues/427).
- Added 'table' to the internal list of block-level elements.
- Added the traditional default 'Network Working Group' to the top of HTML output for drafts.
## [2.28.0] - 2019-09-15
- Fixed the handling of empty `` entries when writing HTML, and added handling for multiple `` entries for text output. Fixes issue [#425](https://github.com/ietf-tools/xml2rfc/issues/425).
- Fixed an inconsistency in the handling of non-ASCII author initials.
- Added some XML cleanup before writing prepped output.
- Fixed a case where for instance 'Section b.2' would be emitted instead of the correct 'Appendix B.2'
- Changed the restricted right margin for `` terms.
- Added a check for conflicting schema information for v3 input files, and fixed a failure to heed the presence of preptool errors when genreating v3 format outputs.
- Adjusted the library call default value for --legacy-date-format to match the command line setting.
- Added a script to minify javascript (through an external service), and added a javascript minification step to the Makefile.
- Added a html `` for external metadata, and updated metadata.js to look for online metadata also for documents served from disk.
- Fixed a problem with authors without any name, with only organization information present.
## [2.27.1] - 2019-09-10
- Refined the preptool code that inserts reference target URLs to use an more appropriate guess at the extension, depending on the base URL.
- Corrected a mismatch between the default value for a switch in run.py and base.py.
- Changed the code for the --id-is-work-in-progress to avoid duplicate `
` insertion.
## [2.27.0] - 2019-09-09
- Added a test for handling of `&wj;` and ` ` during text linebreaking.
- Corrected the line break handling for &wj; and &zwsp; and changed to using a unicode private use code for internal "don't break" handling, in order to make use of &wj; possible in the XML source input.
- Added country name aliases for South Korea.
- In text renderer: Reverted 'Internet Draft' to 'Internet-Draft' for series name rendering. Stripped empty parts from Updates: and Obsoletes: lists. Added removal of U+2060 (word joiner) before emitting rendered text.
- Adjusted the preptool inserted reference target value for Internet-Drafts to include a trailing '.txt' to avoid 404s
- Added U+2060 (word joiner) to the list of code points that should not trigger non-ASCII warnings
- Added an --id-is-work-in-progress switch to let the RPC automatically add a `` element indicating "Work in Progress" for Internet-Drafts.
- In HTML output, removed blank items from Updates and Obsoletes lists, and reverted 'Internet Draft' in reference rendering to 'Internet-Draft'.
- Added entity definitions for &wj; and &zwsp;
- Fixed pyflakes issue; a variable name mismatch.
- Updated the installation instructions emitted when --pdf is specified without having the necessary libraries in place to also include instructions for Noto font installation.
- Fixed an issue with the ToC generation where sections without numbers might still be rendered with the whitespace intended to go between number and section title.
- Fixed an issue with the HTML ToC where sections without numbers might still be rendered with the whitespace intended to go between number and section title.
- Removed pilcrows from print layout to avoid spurious extra lines for paragraphs where the pilcrow would not fit at the end of the last line.
- Fixed an insufficient test for URL vs. local file when handling the --metadata-js-url switch.
- Tweaked the CSS for print to avoid reference entries beginning on a new line, below the reference tag.
## [2.26.0] - 2019-09-03
- Fixed a broken rendering of Obsoletes: and Updates:, broken in different ways in v3 HTML and v3 text output. Fixes issue [#423](https://github.com/ietf-tools/xml2rfc/issues/423).
- Added an alternative style sheet from Martin Thomson (reachable with --css=mt) and rewrote the code to read in alternative style sheets to look in more places. Also added a mt.js file to go with the mt.css file, and tweaked the html renderer to load an alternative .js file if an alternative .css file is set and a matching .js exists.
- Fixed an issue with nested `` with emtpy="true".
- Added a test, with error exit, for duplicate `` replacement terms. Fixes issue [#421](https://github.com/ietf-tools/xml2rfc/issues/421).
- Changed the rendering of Internet-Draft references to follow draft-flanagan-7322bis-03 (RFC Style Guide bis) more closely.
- Made the address pane for authors' addresses wider, to accomodate very long email addresses. Changed the bottom margin for some styles used by figures in order to get the same caption placement for figures and tables.
- Removed the computed `` text mode indentation, and replaced it with a fixed indentation of 3.
- Added an example section using `` to element.xml. Updated the `` examples that use the section attribute.
- Updated the prepping and rendering of `` with section settings to better handle sectionFormat="bare", and changed the handlin of the metadata.js script in HTML output.
- Added a minified version of the metadata.js script, updated the help text for the --external-css switch, and changed the default for the --metadata-js-url switch to use the minified metadata.js file, and changed the metadata_js_url setting for invocation of xml2rfc renderers as library modules to use the minified metadata.js
- Updated metadata.js with a new copy received from the RFC Editor staff.
- Added a warning for mismatch between `` and ``.
- Modified the v2v3 conversion code to deal correctly with multiple instances of `` within an unlabelled Figure. Modified the converter to avoid some lxml-related issues under python 3.x.
- Updated `XmlRfc.__init__()` with a new keyword argument to set source file, needed when using the v2v3 converter as a library function (such as from id2xml in v3 mode).
- Incorporated a new updated copy of the original CSS stylesheet received from the original contractor.
## [2.25.0] - 2019-08-26
This rounds up the remaining known issues raised by the RFC Editor staff. Commit log excerpt:
- Rolled back an earlier requirements change, and added a restriction on pycountry due to a buggy release.
- Fixed a number of issues with the xml generated for ToC and Index. This makes the ToC output from prepped files the same as from unprepped files, which was not the case earlier.
- Fixed an log() argument error.
- Modified test input files to silence known issues with legacy rfc xml test files, in order to more easily be able to see newly appearing errors.
- Fixed a string formatting error. Fixes issue [#417](https://github.com/ietf-tools/xml2rfc/issues/417).
- Changed processing progress messages to more consistently obey --quiet, and to be visually distinct from errors and warnings.
- Modified the PI stripping so as to be able to silence warnings during preptool processing.
- Added indentation handling for variations of `` on request from the rfc-editor staff.
- Moved the check for appropriate `` content from the text renderer to the preptool, and tweaked it to permit ` `, e.g., `MUST NOT`.
- Added a base_url setting to avoid an error message during pdf generation.
- Added an option --id-reference-base-url to set base url for rendering of `` with I-D section references, with a sensible default; and set a default value for --rfc-reference-base-url for `` with section= ease of use.
- Tweaked the conditions for a preptool warning about missing docName to only apply in non-rfc mode, and added generation of any missing ` ` element from docName if present.
- Widened the search for seriesInfo elements when handling the `--rfc-reference-base-url` option, in order to handle all possible placements, and fixed a bug in the creation of target URL when using this option.
- Added a warning for `` elements without proper v3 alternatives during v2v3 conversion.
- Fixed a bug introduced in [295fd79](https://github.com/ietf-tools/xml2rfc/commit/295fd7930474de10d24d42a6a68a264d4409a44f) when stabilizing attribute order, which could cause errors when running v2v3 conversion with XInclude insertion.
- Changed the code for --info dump to work for both py27 and py3x.
- The --legacy-list-symbols option was checked for validity before the version attribute of the input file was seen. Moved this check (and some similar cases) later, in order to permit it to be used with v3 input without giving the --v3 option. Fixes issue [#414](https://github.com/ietf-tools/xml2rfc/issues/414).
## [2.24.0] - 2019-08-10
This release addresses a number of issues and minor feature requests from the RFC Editor. Excerpt from the commit log:
- Added a switch --rfc-reference-base-url to specify an alternative base url when using `` section links.
- Stabilized XML and HTML output attribute order. With lxml 4.40, the handling of attribute order changed for Py 3.6 and higher, to match the use of ordered dictionaries in Py3.6+. Initial attributes set on an element are now sorted by key value. This matches what lxml did previously, and still does for Py 2.7 and Py 3.[0-5]. Enforcing sorted initial attributes under Py 3.6+ makes our output more stable under varying versions of lxml and Python.
- Added support for `` section references in the v3 text formatter. Refactored some of the xref handling in preptool. Added warnings for some xref attribute and content combinations that don't make sense.
- Tweaked the error message for use of -o with multiple output formats.
- Tweaked the layout of v3 text front page to correctly handle unicode codepoints of different width than 1, in order to get correct line lengths for authors with CJK names.
- Handled a problem with an unwanted space between year and the following comma in HTML ```` rendering.
- When using the built-in lxml Element remove() method, it unexpectedly removes not only the element, but also the element's tail. Dealt with this by using our own remove() where needed.
- Added pilcrows on ``, to match pilcrows on other list entries.
- Removed address lines with only punctuation from the author address rendering, eliminating for instance lines containing only a comma.
- Added a viewport meta tag, to improve rendering on some devices.
- Added class 'selfRef' on some Figure and Table links that were missing it.
- Changed the address format to always start with the author name, according to a conversation with the RFC-Editor staff in Prague.
- Changed the V3 writer note() method to obey quiet and verbose in the same manner as log.note().
- Changed the v3 validate() from being separate methods for the v2v3 converter and the preptool to a common method on BaseV3Writer.
- Tweaked the `` handling to make year ranges and fuzzy dates possible.
- Fixed an issue where text was lost when immediately preceded by ``.
- Added a `--bom` text format option, to insert a BOM mark at the beginning of the text format output. Also added a BOM test, and removed some irrelevant switches.
- Made the line spacing of `` the same as for ``.
- Removed stripping of horizontal whitespace at the start of artwork in list items.
- Removed an unwanted attribute inheritance of 'ulEmpty' for ``.
- Fixed an issue with the CSS stylesheet for compact `` lists.
- Removed an unintentional change that would permit a 'contributor' author role.
## [2.23.1] - 2019-07-07
- Fixed a bug in the handling of sha1 and base64 methods when generating cache names for references with query arguments.
- Updated the license file to more strictly follow the BSD 3-Clause license, and changed the license field in the setup.py file to be more precise.
## [2.23.0] - 2019-06-27
This release adds v2v3 support for conversion of v2 code with both text and external image sources to v3 `` format, and provides improved cache handling. It also contains a long list of bugfixes. Here is an excerpt from the commit log:
- Fixed an issue where cache clearing did not consider custom cache locations.
- Added retry on connection error for external includes. This fixes an issue which has appearing more often recently, where the first connection to fetch a reference file has failed to provide the right redirect.
- Added inclusion of metadata.js in the html renderer, for future handling of dynamic metadata (updated-by and obsoleted-by information, for instance). Added a default instance of the metadata javascript file to the distribution, and added an command-line option to specify an alternative version of the javascript metadata script.
- Added `
Xml2rfc Vocabulary V3 Schema
February 2022
xml2rfc(1)
Informational
[Page]
Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.12.1
This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.¶
Most elements listed in this documentation will have a "Content schema" entry. This shows the permitted content for the element, expressed in RelaxNG Compact Notation [RNC ] . For relatively trivial cases such as the ones in this document, the notation is quite straightforward, and resembles simple regular expressions, but with element names as atoms, instead of individual characters as atoms. A trailing '*' indicates zero or more instances; '+' indicates one or more, '?' indicates zero or one. '|' separates choices within a parenthesized group, and ',' separates entries in a sequence.¶
Some attributes which are valid according to the schema are not listed in this documentation, mostly because they primarily are used by the preptool, and are not useful to document authors.¶
Elements and attributes that have been introduced after the publication of the original schema version 3 specification, [RFC7991 ] , have been marked with '(New)' in this document.¶
For an introduction to the v3 schema, with suggestions on how to transition from v2, see [INTRO-TO-V3 ] .¶
The latest version of this documentation is available in HTML form at https://xml2rfc.ietf.org/xml2rfc-doc .¶
This documentation applies to xml2rfc version 3.12.1.¶
Contains the Abstract of the document. See [RFC7322 ] for more information on restrictions for the Abstract.¶
This element can be a child element of <front >.¶
Content schema:
( dl | ol | t | ul )+¶
Document-wide unique identifier for this <abstract> element.¶
Provides additional prose augmenting a bibliographic reference. This text is intended to be shown after the rest of the generated reference text.¶
This element can be a child element of <reference >.¶
Content schema:
( text | bcp14 | cref | em | eref | iref | strong | sub | sup | tt | u | xref )*¶
Provides information about the IETF area to which this document relates (currently not used when generating documents).¶
The value ought to be either the full name or the abbreviation of one of the IETF areas as listed on http://www.ietf.org/iesg/area.html . A list of full names and abbreviations will be kept by the RFC Series Editor.¶
This element can be a child element of <front >.¶
Content schema:
text¶
This element allows for the support of multiple artwork formats, in order to provide suitable artwork for different output formats.¶
When multiple <artwork> instances are provided within one <artset> element, the renderer will try to pick the <artwork> instance which is most appropriate for its current output format from the given alternatives.¶
If more than one <artwork> element with the same "type" is found within an <artset> element, the renderer could select the first one, or possibly choose between the alternative instances based on the output format and some quality of the alternatives that make one more suitable than the others for that particular format, such as size, aspect ratio, etc.¶
This element can be a child element of <aside >, <blockquote >, <dd >, <figure >, <li >, <section >, <td >, and <th >.¶
Content schema:
artwork +¶
Document-wide unique identifier for this <artset> element.¶
This element allows the inclusion of "artwork" in the document. <artwork> provides full control of horizontal whitespace and line breaks; thus, it is used for a variety of things, such as diagrams ("line art") and protocol unit diagrams. Tab characters (U+0009) inside of this element are prohibited.¶
Alternatively, the "src" attribute allows referencing an external graphics file, such as a vector drawing in SVG or a bitmap graphic file, using a URI. In this case, the textual content acts as a fallback for output representations that do not support graphics; thus, it ought to contain either (1) a "line art" variant of the graphics or (2) prose that describes the included image in sufficient detail.¶
In order to include alternative artwork expressions for different output formats, you should provide multiple <artwork> elements enclosed within an <artset>. The text renderer will prefer instances with type="ascii-art", while the HTML and PDF renderers will prefer instances with type="svg".¶
In the v1 and v2 iterations of the schema, the <artwork> element was also used for source code and formal languages; in v3, this is now done with <sourcecode>.¶
There are at least five ways to include SVG in artwork in Internet- Drafts:¶
Inline, by including all of the SVG in the content of the element, such as:¶
<artwork type="svg"><svg xmlns="http://www.w3.org/2000/ svg..."> ¶
Inline, but using XInclude (see Appendix B.1), such as:¶
<artwork type="svg"><xi:include href=...> ¶
As a data: URI, such as:¶
<artwork type="svg"
src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww...">
¶
As a URI to an external entity, such as:¶
<artwork type="svg" src="http://www.example.com/..."> ¶
As a local file, such as:¶
<artwork type="svg" src="diagram12.svg"> ¶
The use of SVG in Internet-Drafts and RFCs is covered in much more detail in [RFC7996 ] .¶
The above methods for inclusion of SVG art can also be used for including text artwork, but using a data: URI is probably confusing for text artwork.¶
Formatters that do pagination should attempt to keep artwork on a single page. This is to prevent artwork that is split across pages from looking like two separate pieces of artwork.¶
See Section 5 for a description of how to deal with issues of using "&" and "<" characters in artwork.¶
This element can be a child element of <artset >, <aside >, <blockquote >, <dd >, <figure >, <li >, <section >, <td >, and <th >.¶
Content schema:
( text* | svg )¶
Possible values:
( "left" | "center" | "right" )¶
Default value:
"left"¶
Controls whether the artwork appears left justified, centered, or right justified.¶
Alternative text description of the artwork (which is more than just a summary or caption). When the art comes from the "src" attribute and the format of that artwork supports alternate text, the alternative text comes from the text of the artwork itself, not from this attribute. The contents of this attribute are important to readers who are visually impaired, as well as those reading on devices that cannot show the artwork well, or at all.¶
Document-wide unique identifier for this <artwork> element.¶
A filename suitable for the contents (such as for extraction to a local file). This attribute can be helpful for other kinds of tools (such as automated syntax checkers, which work by extracting the artwork). Note that the "name" attribute does not need to be unique for <artwork> elements in a document. If multiple <artwork> elements have the same "name" attribute, a processing tool might assume that the elements are all fragments of a single file, and the tool can collect those fragments for later processing.¶
The URI reference of a graphics file [RFC3986 ] , or the name of a file on the local disk. This can be a "data" URI [RFC2397 ] that contains the contents of the graphics file. Note that the inclusion of art with the "src" attribute depends on the capabilities of the processing tool reading the XML document. Tools need to be able to handle the file: URI, and they should be able to handle http: and https: URIs as well. The prep tool will be able to handle reading the "src" attribute.¶
If no URI scheme is given in the attribute, the attribute is considered to be a local filename relative to the current directory. Processing tools must be careful to not accept dangerous values for the filename, particularly those that contain absolute references outside the current directory. Document creators should think hard before using relative URIs due to possible later problems if files move around on the disk. Also, documents should most likely use explicit URI schemes wherever possible.¶
In some cases, the prep tool may remove the "src" attribute after processing its value. See [RFC7998 ] for a description of this.¶
Specifies the format of the artwork. The value of this attribute is free text with certain values designated as preferred.¶
The preferred values for <artwork> types are:¶
ascii-art¶
binary-art¶
svg¶
Values that don't describe the format, such as "call-flow" or "hex-dump" were mentioned in [RFC7991 ] , but are not supported here; they are instead candidates for use with another future attribute to describe the artwork content.¶
The RFC Series Editor will maintain a complete list of the preferred values on the RFC Editor web site, and that list is expected to be updated over time. Thus, a consumer of v3 XML should not cause a failure when it encounters an unexpected type or no type is specified. The table will also indicate which type of art can appear in plain-text output (for example, type="svg" cannot).¶
This element is a container for content that is semantically less important or tangential to the content that surrounds it.¶
This element can be a child element of <dd > and <section >.¶
Content schema:
( artset | artwork | blockquote | dl | figure | iref | ol | t | table | ul )*¶
Document-wide unique identifier for this <aside> element.¶
Provides information about a document's author. This is used both for the document itself (at the beginning of the document) and for referenced documents.¶
The <author> elements contained within the document's <front> element are used to fill the boilerplate and also to generate the "Author's Address" section (see [RFC7322 ] ).¶
Note that an "author" can also be just an organization (by not specifying any of the "name" attributes, but adding the <organization> child element).¶
Furthermore, the "role" attribute can be used to mark an author as "editor". This is reflected both on the front page and in the "Author's Address" section, as well as in bibliographic references. Note that this specification does not define a precise meaning for the term "editor".¶
This element can be a child element of <front > and <section >.¶
Content schema:
organization ?, address ?¶
Document-wide unique identifier for this <author> element.¶
The Latin script equivalent of the author's full name.¶
The Latin script equivalent of the author's initials, to be used in conjunction with the separately specified asciiSurname.¶
The Latin script equivalent of the author's surname, to be used in conjunction with the separately specified asciiInitials.¶
The full name (used in the automatically generated "Author's Address" section). Although this attribute is optional, if one or more of the "asciiFullname", "asciiInitials", or "asciiSurname" attributes does not have values, the "fullname" attribute is required.¶
An abbreviated variant of the given name(s), to be used in conjunction with the separately specified surname. It usually appears on the front page, in footers, and in references.¶
Some processors will post-process the value -- for instance, when it only contains a single letter (in which case they might add a trailing dot). Relying on this kind of post-processing can lead to results varying across formatters and thus ought to be avoided.¶
Specifies the role the author had in creating the document.¶
The author's surname, to be used in conjunction with the separately specified initials. It usually appears on the front page, in footers, and in references.¶
Contains the "back" part of the document: the references and appendices. In <back>, <section> elements indicate appendices.¶
This element can be a child element of <rfc >.¶
Content schema:
displayreference *, references *, section *¶
Marks text that are phrases defined in [BCP14 ] such as "MUST", "SHOULD NOT", and so on. When shown in some of the output representations, the text in this element might be highlighted. The use of this element is optional.¶
This element is only to be used around the actual phrase from BCP 14, not the full definition of a requirement. For example, it is correct to say "The packet <bcp14>MUST</bcp14> be dropped.", but it is not correct to say "<bcp14>The packet MUST be dropped.</bcp14>".¶
This element can be a child element of <annotation >, <blockquote >, <dd >, <dt >, <em >, <li >, <name >, <refcontent >, <strong >, <sub >, <sup >, <t >, <td >, <th >, and <tt >.¶
Content schema:
text¶
Specifies that a block of text is a quotation.¶
This element can be a child element of <aside >, <li >, and <section >.¶
Content schema:
( ( artset | artwork | dl | figure | ol | sourcecode | t | ul )+ | ( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | tt | u | xref )+ )¶
Document-wide unique identifier for this <blockquote> element.¶
The source of the citation. This must be a URI. If the "quotedFrom" attribute is given, this URI will be used by processing tools as the link for the text of that attribute.¶
Name of person or document the text in this element is quoted from. A formatter should render this as visible text at the end of the quotation.¶
Holds the boilerplate text for the document. This element is filled in by the prep tool.¶
This element contains <section> elements. Every <section> element in this element must have the "numbered" attribute set to "false".¶
This element can be a child element of <front >.¶
Content schema:
section +¶
Inserts a forced break. Use sparingly. In most situations, it's better to insert U+200B, ZERO WIDTH SPACE, in order to encourage line breaking at a point where it would otherwise not occur.¶
This element can be a child element of <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <strong >, <t >, <td >, <th >, <title >, and <tt >.¶
Content schema:
empty¶
Gives the city name in a postal address.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <city> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Where postal addresses use city subdivisions, these are mapped to the <cityarea> element. Korean addresses would use this for a city district, for instance. Countries known to use this element are Ascension Island, China, Iran, South Korea, and Thailand.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <cityarea> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Gives the postal region code.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <code> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Specifies the country name in a postal address. All common and official country names should be recognized; in addition two- and three-letter country codes according to ISO 3166 are recognized.¶
xml2rfc has a help option which will list all names and country codes it recognizes as valid country names: xml2rfc --country-help
.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <country> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Represents a comment.¶
Comments can be used in a document while it is work in progress. They might appear either inline and visually highlighted, at the end of the document, or not at all, depending on the formatting tool.¶
This element can be a child element of <annotation >, <blockquote >, <dd >, <dt >, <em >, <li >, <name >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, .¶
Content schema:
( text | br | em | eref | strong | sub | sup | tt | xref )*¶
Document-wide unique identifier for this <cref> element.¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
Suggests whether or not the comment should be displayed by formatting tools. This might be set to "false" if you want to keep a comment in a document after the contents of the comment have already been dealt with.¶
Holds the "source" of a comment, such as the name or the initials of the person who made the comment.¶
Provides information about the publication date. This element is used for two cases: the boilerplate of the document being produced, and inside bibliographic references that use the <front> element.¶
Bibliographic references:
(New) In order to be able to specify fuzzy dates, such as "2002-2003", "Second quarter 2010", etc., the date element is now permitted to have text content in addition to the "year", "month", and "day" attributes. If there is only text content, it will be rendered as is. If there is both text content and date components, both will be rendered, with the expanded date components in parentheses.¶
Boilerplate for Internet-Drafts and RFCs:
This element defines the date of publication for the current document (Internet-Draft or RFC). When producing Internet-Drafts, the prep tool uses this date to compute the expiration date (see [IDGUIDE ] ). When one or more of "year", "month", or "day" are left out, the prep tool will attempt to use the current system date if the attributes that are present are consistent with that date.¶
In dates in <rfc> elements, the month must be a number or a month in English. The prep tool will silently change text month names to numbers. Similarly, the year must be a four-digit number.¶
When the prep tool is used to create Internet-Drafts, it will warn if the draft has a <date> element in the boilerplate for itself that is more than 3 days away from today. To avoid this problem, authors might simply not include a <date> element in the boilerplate.¶
This element can be a child element of <front >.¶
Content schema:
text¶
The day of publication.¶
The month of publication.¶
The year of publication.¶
This element gives a mapping between the anchor of a reference and a name that will be displayed instead. This allows authors to display more mnemonic anchor names for automatically included references. The mapping in this element only applies to <xref> elements whose format is "default". For example, if the reference uses the anchor "RFC6949", the following would cause that anchor in the body of displayed documents to be "RFC-dev":¶
<displayreference target="RFC6949" to="RFC-dev"/> ¶
If a reference section is sorted, this element changes the sort order.¶
This element can be a child element of <back >.¶
This attribute must be the name of an anchor in a <reference> or <referencegroup> element.¶
This attribute is a name that will be displayed as the anchor instead of the anchor that is given in the <reference> element. The string given must start with one of the following characters: 0-9, a-z, or A-Z. The other characters in the string must be 0-9, a-z, A-Z, "-", ".", or "_".¶
A definition list. Each entry has a pair of elements: a term (<dt>) and a definition (<dd>). (This is slightly different and simpler than the model used in HTML, which allows for multiple terms for a single definition.)¶
This element can be a child element of <abstract >, <aside >, <blockquote >, <dd >, <li >, <note >, <section >, <td >, and <th >.¶
Content schema:
( dt , dd )+¶
Document-wide unique identifier for this <dl> element.¶
Default value:
"3"¶
Indicates the indentation to be used for the rendering of the second and following lines of the item (the first line starts with the term, and is not indented). The indentation amount is interpreted as characters when rendering plain-text documents, and en-space units when rendering in formats that have richer typographic support such as HTML or PDF. One en-space is assumed to be the length of 0.5 em-space in CSS units.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
The "newline" attribute defines whether or not the term appears on the same line as the definition. newline="false" indicates that the term is to the left of the definition, while newline="true" indicates that the term will be on a separate line.¶
Possible values:
( "normal" | "compact" )¶
Default value:
"normal"¶
Defines whether or not there is a blank line between entries. spacing="normal" indicates a single blank line, while spacing="compact" indicates no blank line between entries.¶
The term being defined in a definition list.¶
This element can be a child element of <dl >.¶
Content schema:
( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | tt | xref )*¶
Document-wide unique identifier for this <dt> element.¶
Indicates text that is semantically emphasized. In HTML and PDF rendering, text enclosed within this element will be displayed as italic after processing; in text rendering it will be preceded and folled by an underline character. This element can be combined with other character formatting elements, and the formatting will be additive.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <li >, <name >, <refcontent >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, and <xref >.¶
Content schema:
( text | bcp14 | br | cref | eref | iref | strong | sub | sup | tt | xref )*¶
Provides an email address.¶
The value is expected to be the addr-spec defined in Section 2 of [RFC6068 ] .¶
(New) In [RFC7991 ] , only zero or one instance of this element was permitted in an address. In the current schemal, now multiple email addresses are permitted.¶
This element can be a child element of <address >.¶
Content schema:
text¶
The ASCII equivalent of the author's email address. This is only used if the email address has any internationalized components.¶
Represents an "external" link (as specified in the "target" attribute). This is useful for embedding URIs in the body of a document.¶
If the <eref> element has non-empty text content, the content is used as the displayed text that is linked. Otherwise, the value of the "target" attribute is used as the displayed text.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, .¶
Content schema:
text¶
Possible values:
( "none" | "angle" )¶
Default value:
"none"¶
Determines the type of brackets that an eref will be rendered with. "angle" will render with angle brackets, and "none" will render with no brackets in HTML and PDF, and with parentheses by the text renderer.¶
URI of the link target [RFC3986 ] . This must begin with a scheme name (such as "https://") and thus not be relative to the URL of the current document.¶
Extra address information. This element can be used for address parts more specific than a street, for instance apartment numbers, suite numbers, building parts, etc.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <extaddr> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Represents the "front matter" metadata (such as author information), the Abstract, and additional notes.¶
A <front> element may have more than one <seriesInfo> element. Each should contain a "name" attribute with the series name and a "value" attribute with the series number; other uses of <front><seriesInfo> described in [RFC7991 ] are deprecated.¶
This element can be a child element of <reference > and <rfc >.¶
Content schema:
title , seriesInfo *, author +, date ?, area *, workgroup *, keyword *, abstract ?, note *, boilerplate ?, toc ?¶
Provides terms for the document's index.¶
Index entries can be either regular entries (when just the "item" attribute is given) or nested entries (by specifying "subitem" as well), grouped under a regular entry.¶
Index entries generally refer to the exact place where the <iref> element occurred. An exception is the occurrence as a child element of <section>, in which case the whole section is considered to be relevant for that index entry. In some formats, index entries of this type might be displayed as ranges.¶
When the prep tool is creating index content, it collects the items in a case-sensitive fashion for both the item and subitem level.¶
This element can be a child element of <annotation >, <aside >, <blockquote >, <dd >, <dt >, <em >, <figure >, <li >, <name >, <section >, <strong >, <sub >, <sup >, <t >, <table >, <td >, <th >, <tt >, .¶
Content schema:
empty¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Setting this to "true" declares the occurrence as "primary", which might cause it to be highlighted in the index. There is no restriction on the number of occurrences that can be "primary".¶
The subitem to include.¶
Specifies a keyword applicable to the document.¶
Note that each element should only contain a single keyword; for multiple keywords, the element can simply be repeated.¶
Keywords are used both in the RFC Index and in the metadata of generated document representations. They are not reflected in the HTML, PDF, or text rendering of the document.¶
This element can be a child element of <front >.¶
Content schema:
text¶
A link to an external document that is related to the RFC.¶
The following are the supported types of external documents that can be pointed to in a <link> element:¶
The current International Standard Serial Number (ISSN) for the RFC Series. The value for the "rel" attribute is "item". The link should use the form "urn:issn:".¶
The Digital Object Identifier (DOI) for this document. The value for the "rel" attribute is "describedBy". The link should use the form specified in [RFC7669 ] ; this is expected to change in the future.¶
The Internet-Draft that was submitted to the RFC Editor to become the published RFC. The value for the "rel" attribute is "prev". (RFC7998 specified "convertedFrom", but that value is not one of the recognised values for the @rel attribute of <link> elements in HTML. The "prev" value has the desired semantics.) The link should be to an IETF-controlled web site that retains copies of Internet-Drafts.¶
A representation of the document offered by the document author. The value for the "rel" attribute is "alternate". The link can be to a personally run web site.¶
In RFC production mode, the prep tool needs to check the values for <link> before an RFC is published. In draft production mode, the prep tool might remove some <link> elements during the draft submission process.¶
This element can be a child element of <rfc >.¶
The URI of the external document.¶
The relationship of the external document to this one. The relationships are taken from the "Link Relations" registry maintained by IANA [LINKRELATIONS ] .¶
Represents the main content of the document.¶
This element can be a child element of <rfc >.¶
Content schema:
section +¶
The name of the containing (parent) element, for instance the section name. This name can include inline markup (for example, including references or making some characters use a fixed-width font).¶
This element can be a child element of <figure >, <note >, <references >, <section >, <table >, .¶
Content schema:
( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | tt | xref )*¶
Creates an unnumbered, titled block of text that appears after the Abstract.¶
It is usually used for additional information to reviewers (Working Group information, mailing list, ...) or for additional publication information such as "IESG Notes".¶
This element can be a child element of <front >.¶
Content schema:
name ?, ( dl | ol | t | ul )+¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
If set to "true", this note is marked in the prep tool with text indicating that it should be removed before the document is published as an RFC. That text will be "This note is to be removed before publishing as an RFC."¶
Deprecated. Use the <name> element instead.¶
An ordered list. The labels on the items will be either a number or a letter, depending on the value of the style attribute.¶
This element can be a child element of <abstract >, <aside >, <blockquote >, <dd >, <li >, <note >, <section >, <td >, and <th >.¶
Content schema:
li +¶
Document-wide unique identifier for this <ol> element.¶
When the prep tool sees an <ol> element with a "group" attribute that has already been seen, it continues the numbering of the list from where the previous list with the same group name left off. If an <ol> element has both a "group" attribute and a "start" attribute, the group's numbering is reset to the given start value.¶
Possible values:
( text | "adaptive" )¶
Default value:
"adaptive"¶
The indentation of the list elements relative to the start of the list item number. With indent='adaptive'
, the width of the widest list item number will determine the indentation. With a numeric value, that value will be used to determine the amount of indentation. The indentation amount is interpreted as characters when rendering plain-text documents, and en-space units when rendering in formats that have richer typographic support such as HTML or PDF. One en-space is assumed to be the length of 0.5 em-space in CSS units. Only non-negative integer amounts of indentation are supported.¶
Possible values:
( "normal" | "compact" )¶
Default value:
"normal"¶
Defines whether or not there is a blank line between entries. spacing="normal" indicates a single blank line, while spacing="compact" indicates no blank line between entries.¶
Default value:
"1"¶
The ordinal value at which to start the list. This defaults to "1" and must be an integer of value 0 or greater.¶
Default value:
"1"¶
The type of the labels on list items. If the length of the type value is 1, the meaning is the same as it is for HTML:¶
a
Lowercase letters (a, b, c, ...)¶
A
Uppercase letters (A, B, C, ...)¶
1
Decimal numbers (1, 2, 3, ...)¶
i
Lowercase Roman numerals (i, ii, iii, ...)¶
I
Uppercase Roman numerals (I, II, III, ...)¶
For types "a" and "A", after the 26th entry, the numbering starts at "aa"/"AA", then "ab"/"AB", and so on.¶
If the length of the type value is greater than 1, the value must contain a percent-encoded indicator and other text. The value is a free-form text that allows counter values to be inserted using a "percent-letter" format. For instance, "[REQ%d]" generates labels of the form "[REQ1]", where "%d" inserts the item number as a decimal number.¶
The following formats are supported:¶
%c
Lowercase letters (a, b, c, ...)¶
%C
Uppercase letters (A, B, C, ...)¶
%d
Decimal numbers (1, 2, 3, ...)¶
%i
Lowercase Roman numerals (i, ii, iii, ...)¶
%I
Uppercase Roman numerals (I, II, III, ...)¶
%p
The list counter of a list item in a parent list (see more below)¶
%%
Represents a percent sign¶
Other formats are reserved for future use. Only one percent encoding other than "%%" and "%p" is allowed in a type string.¶
It is an error for the type string to be empty. For bulleted lists, use the <ul> element. For lists that have neither bullets nor numbers, use the <ul> element with the 'empty="true"' attribute.¶
'%p' may be used in nested ordered lists, where it represents the item number of the parent list item. This lets you say for instance:¶
<ol>
<li>List item one</li>
<li>
<t>Nested list:</t>
<ol type='%p%d'>
<li>Sublist item 2.1</li>
<li>Sublist item 2.2</li>
</ol>
</li>
</ol>
¶
which is rendered as:¶
List item one¶
Nested list¶
2.1
Sublist item 2.1¶
2.2
Sublist item 2.2¶
Without the '%p' format specifier, you would have to explicitly insert the counter number of the parent item, which could easily result in mismatched numbering if parent list intems were inserted or removed during document editing.¶
Specifies the affiliation [RFC7322 ] of an author.¶
This information appears both in the "Author's Address" section and on the front page (see [RFC7322 ] for more information). If the value is long, an abbreviated variant can be specified in the "abbrev" attribute.¶
This element can be a child element of <author > and <contact >.¶
Content schema:
text¶
Abbreviated variant of the organization name.¶
The ASCII equivalent of the <organization> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
The ASCII equivalent of the abbreviated variant of the organization's name.¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
Turns off listing of organization with author name on the first document page.¶
Represents a phone number.¶
The value is expected to be the scheme-specific part of a "tel" URI (and so does not include the prefix "tel:"), using the "global-number-digits" syntax. See Section 3 of [RFC3966 ] for details.¶
This element can be a child element of <address >.¶
Content schema:
text¶
Represents a post office box number.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <pobox> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Contains optional child elements providing postal information. These elements will be displayed in an order that is specific to formatters. A postal address can contain only a set of <street>, <city>, <region>, <code>, and <country> elements, or only an ordered set of <postalLine> elements, but not both.¶
This element can be a child element of <address >.¶
Content schema:
( ( city | cityarea | code | country | extaddr | pobox | region | sortingcode | street )* | postalLine + )¶
Represents one line of a postal address. When more than one <postalLine> is given, the prep tool emits them in the order given.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <postalLine> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Text that should appear between the title and the date of a reference. The purpose of this element is to obviate the need for abuse of <seriesInfo> in order to add such text.¶
For example:¶
<reference anchor="April1"> <front> <title>On Being A Fool</title> <author initials="K." surname="Phunny" fullname="Knot Phunny"/> <date year="2000" month="April"/> </front> <refcontent>Self-published pamphlet</refcontent> </reference>¶
would render as:¶
[April1] Phunny, K., "On Being A Fool", Self-published pamphlet, April 2000.¶
This element can be a child element of <reference >.¶
Content schema:
( text | bcp14 | em | strong | sub | sup | tt )*¶
Represents a bibliographic reference.¶
This element can be a child element of <referencegroup > and <references >.¶
Content schema:
stream ?, front , ( annotation | refcontent | seriesInfo )*¶
Document-wide unique identifier for this <reference>. Usually, this will be used both to "label" the reference in the "References" section and as an identifier in links to this reference entry; but see <displayreference (Section 2.22 ) > for how to change this.¶
Possible values:
( "true" | "false" )¶
Specifies whether or not the title in the reference should be quoted. This can be used to prevent quoting, such as on errata.¶
Holds the URI for the reference.¶
Represents a list of bibliographic references that will be represented as a single reference. This is most often used to reference STDs and BCPs, where a single reference (such as "BCP 9") may encompass more than one RFC.¶
This element can be a child element of <references >.¶
Content schema:
reference +¶
Document-wide unique identifier for this <referencegroup>. Usually, this will be used both to "label" the reference group in the "References" section and as an identifier in links to this reference entry; but see <displayreference (Section 2.22 ) > for how to change this.¶
(New) Holds an URI for the reference group, analogous to the "target" attribute of <reference>. Useful for a STD which consists of multiple RFCs with their own URLs, but also has its own unique URL.¶
Contains a set of bibliographic references.¶
In the early days of the RFC Series, there was only one "References" section per RFC. This convention was later changed to group references into two sets, "Normative" and "Informative", as described in [RFC7322 ] . This vocabulary supports the split with the <name> child element. In general, the title should be either "Normative References" or "Informative References".¶
The recommended way to include references to RFCs and Internet-Drafts is to use the standard XML XInclude mechanism. Here is an example:¶
<references>
<name>Normative References</name>
<!--RTP-->
<xi:include href=
"https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml"/>
<!--SIP-->
<xi:include href=
"https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
</references>
¶
This element can be a child element of <back > and <references >.¶
Content schema:
name ?, ( references + | ( reference | referencegroup )* )¶
An optional user-supplied identifier for this set of references.¶
Deprecated. Use the <name> element instead.¶
Provides the region name in a postal address.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <region> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
This is the root element of the xml2rfc vocabulary.¶
Content schema:
link *, front , middle , back ?¶
Possible values:
( "std" | "bcp" | "exp" | "info" | "historic" )¶
Document category¶
For RFCs, the "category" attribute (Section 2.33.1) determines the "maturity level" (see Section 4 of [RFC2026 ] ). The allowed values are "std" for "Standards Track", "bcp" for "BCP", "info" for "Informational", "exp" for "Experimental", and "historic" for "Historic".¶
For Internet-Drafts, the "category" attribute is not needed; when supplied, it will appear as "Intended Status". Supplying this information can be useful to reviewers.¶
Possible values:
( "no" | "yes" | "false" | "true" )¶
Default value:
"false"¶
Affects the generated boilerplate. Note that the values of "no" and "yes" are deprecated and are replaced by "false" and "true".¶
See [RFC7841 ] for more information.¶
Indicates the draft name (including revision number) for a draft, or the draft from which an RFC derived, for an RFC. Used to insert the <link rel="prev" href="..."> element that points to the precursor of the RFC, in accordance with the intentions of Section 5.6.3 of [RFC7998 ] .¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
Specifies whether or not a formatter is requested to include an index in generated files. If the source file has no <iref> elements, an index is never generated. This option is useful for generating documents where the source document has <iref> elements but the author no longer wants an index.¶
Represents the Intellectual Property status of the document.¶
If the attribute is set to the empty string: <tt>ipr=''</tt>, it is assumed that this is not a regular IETF/IRTF/IAB/ISE document, and the document header content is reduced. This is considered a feature by a few other standards organisations that have used xml2rfc to format their standards documents.¶
Used to determine wheher to produce an RFC or an Internet-Draft.¶
A comma-separated list of RFC numbers or Internet-Draft names.¶
The prep tool will parse the attribute value so that incorrect references can be detected.¶
The date that the XML was processed by a prep tool. This is included in the XML file just before it is saved to disk. The value is formatted using the "date-time" format defined in Section 5.6 of [RFC3339 ] . The "time-offset" should be "Z".¶
Deprecated; instead, use the "value" in <seriesInfo>.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Specifies whether or not the prep tool will sort the references in each reference section.¶
Possible values:
( "IETF" | "IAB" | "IRTF" | "independent" )¶
Default value:
"IETF"¶
The document stream, as described in [RFC7841 ] . (The RFC Series Editor may change the list of allowed values in the future.)¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
Specifies whether or not a formatter is requested to use symbolic references (such as "RFC2119 "). If the value for this is "false", the references come out as numbers (such as "[3]").¶
Default value:
"3"¶
Specifies the number of levels of headings that a formatter is requested to include in the table of contents.¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
Specifies whether or not a formatter is requested to include a table of contents in generated files.¶
A comma-separated list of RFC numbers or Internet-Draft names.¶
The prep tool will parse the attribute value so that incorrect references can be detected.¶
Specifies the version of xml2rfc syntax used in this document. The only expected value (for now) is "3".¶
Represents a section (when inside a <middle> element) or an appendix (when inside a <back> element).¶
Subsections are created by nesting <section> elements inside <section> elements. Sections are allowed to be empty.¶
This element can be a child element of <back >, <boilerplate >, <middle >, <section >, and <toc >.¶
Content schema:
name ?, ( artset | artwork | aside | author | blockquote | contact | dl | figure | iref | ol | sourcecode | t | table | ul )*, section *¶
Document-wide unique identifier for this <section> element.¶
Possible values:
( "true" | "false" )¶
Default value:
"true"¶
If set to "false", the formatter is requested to not display a section number. The prep tool will verify that such a section is not followed by a numbered section in this part of the document. Descendant sections of unnumbered sections are unnumbered by definition. (New) Both top-level <section>s and other <section>s may have numbered='false'
.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
If set to "true", this section is marked in the prep tool with text indicating that it should be removed before the document is published as an RFC. That text will be "This section is to be removed before publishing as an RFC."¶
Deprecated. Use the <name> element instead.¶
Possible values:
( "include" | "exclude" | "default" )¶
Default value:
"default"¶
Indicates to a formatter whether or not the section is to be included in a table of contents, if such a table of contents is produced. This only takes effect if the level of the section would have appeared in the table of contents based on the "tocDepth" attribute of the <rfc> element, and of course only if the table of contents is being created based on the "tocInclude" attribute of the <rfc> element. If this is set to "exclude", any section below this one will be excluded as well. The "default" value indicates inclusion of the section if it would be included by the tocDepth attribute of the <rfc> element.¶
Specifies the document series in which this document appears, and also specifies an identifier within that series.¶
A processing tool determines whether it is working on an RFC or an Internet-Draft by inspecting the "name" attribute of a <seriesInfo> element inside the <front> element inside the <rfc> element, looking for "RFC" or "Internet-Draft". (Specifying neither value in any of the <seriesInfo> elements can be useful for producing other types of documents but is out of scope for this specification.)¶
It is invalid to have multiple <seriesInfo> elements inside the same <front> element containing the same "name" value. Some combinations of <seriesInfo> "name" attribute values make no sense, such as having both <seriesInfo name="rfc"/> and <seriesInfo name="Internet-Draft"/> in the same <front> element.¶
This element can be a child element of <front > and <reference >.¶
Content schema:
empty¶
The ASCII equivalent of the name field.¶
The ASCII equivalent of the value field.¶
The name of the series. Some values in use by the IETF community are "RFC", "Internet-Draft", and "DOI", but other names such as "ISO", "W3C" for exist for other standardisation organisations.¶
Possible values:
( "IETF" | "IAB" | "IRTF" | "independent" )¶
Deprecated. Use the <stream (Section 2.54 ) > element instead.¶
The identifier within the series specified by the "name" attribute.¶
For BCPs, FYIs, RFCs, and STDs, this is the number within the series.¶
For Internet-Drafts, it is the full draft name (ending with the two-digit version number).¶
For DOIs, the value is given, such as "10.17487/rfc1149", as described in [RFC7669 ] .¶
The name in the value should be the document name without any file extension.¶
A sorting code is related to postal codes in that it is used in addresses to allow sorting, for example to route mail to a certain postal centre or to distinguish streets with the same name in two different areas of the same settlement.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <sortingcode> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
This element allows the inclusion of source code into the document.¶
When rendered, source code is always shown in a monospace font. When <sourcecode> is a child of <figure> or <section>, it provides full control of horizontal whitespace and line breaks. When formatted, it is indented relative to the left margin of the enclosing element. It is thus useful for source code and formal languages (such as ABNF [RFC5234 ] or the RNC notation used in this document). (When <sourcecode> is a child of other elements, it flows with the text that surrounds it.) Tab characters (U+0009) inside of this element are prohibited.¶
For artwork such as character-based art, diagrams of message layouts, and so on, use the <artwork> element instead.¶
Output formatters that do pagination will attempt to keep source code on a single page. This is to prevent source code that is split across pages from looking like two separate pieces of code.¶
This element can be a child element of <blockquote >, <dd >, <figure >, <li >, <section >, <td >, and <th >.¶
Content schema:
text¶
Document-wide unique identifier for this <sourcecode> element.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Indicates whether "<CODE BEGINS>" and "<CODE ENDS>" markers, as introduced by [RFC6087 ] , should be generated when rendering the <sourcecode> element. The alternative is to include these explicitly inside the element, but that would necessitate extra code to strip these, when extracting code from the XML source.¶
A filename suitable for the contents (such as for extraction to a local file). This attribute can be helpful for other kinds of tools (such as automated syntax checkers, which work by extracting the source code). Note that the "name" attribute does not need to be unique for <artwork> elements in a document. If multiple <sourcecode> elements have the same "name" attribute, a formatter might assume that the elements are all fragments of a single file, and such a formatter can collect those fragments for later processing.¶
The URI reference of a source file [RFC3986 ] .¶
It is an error to have both a "src" attribute and content in the <sourcecode> element.¶
Specifies the type of the source code. The value of this attribute is free text with certain values designated as preferred.¶
Most of the preferred values for <sourcecode> types are language names, in a wide sense, such as "abnf", "asn.1", "bash", "c++", etc.¶
The RFC Series Editor maintains a list of the preferred values on the RFC Editor web site at https://www.rfc-editor.org/materials/sourcecode-types.txt , and that list is updated over time. Thus, a consumer of v3 XML should not cause a failure when it encounters an unexpected type or no type is specified.¶
Indicates which stream an RFC belongs to.¶
This element can be a child element of <reference >.¶
Content schema:
( "IETF" | "IAB" | "IRTF" | "independent" )?¶
Provides a street address.¶
This element can be a child element of <postal >.¶
Content schema:
text¶
The ASCII equivalent of the <street> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
Indicates text that is semantically strong. In HTML and PDF rendering, text enclosed within this element will be displayed as bold after processing; in text rendering it will be preceeded and followed by an asterisk. This element can be combined with other character formatting elements, and the formatting will be additive.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <refcontent >, <sub >, <sup >, <t >, <td >, <th >, <tt >, and <xref >.¶
Content schema:
( text | bcp14 | br | cref | em | eref | iref | sub | sup | tt | xref )*¶
Causes the text to be displayed as subscript, approximately half a letter-height lower than normal text, in HTML and PDF rendering. This element can be combined with other character formatting elements, and the formatting will be additive.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <refcontent >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, and <xref >.¶
Content schema:
( text | bcp14 | cref | em | eref | iref | strong | sub | sup | tt | xref )*¶
Causes the text to be displayed as superscript, approximately half a letter-height higher than normal text, in HTML and PDF rendering. This element can be combined with other character formatting elements, and the formatting will be additive.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <refcontent >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, and <xref >.¶
Content schema:
( text | bcp14 | cref | em | eref | iref | strong | sub | sup | tt | xref )*¶
Contains a paragraph of text.¶
This element can be a child element of <abstract >, <aside >, <blockquote >, <dd >, <li >, <note >, <section >, <td >, and <th >.¶
Content schema:
( text | bcp14 | br | contact | cref | em | eref | iref | strong | sub | sup | tt | u | xref )*¶
Document-wide unique identifier for this paragraph.¶
Deprecated. Instead, use <dd> inside of a definition list (<dl>).¶
Default value:
"0"¶
Indicates any extra amount of indentation to be used when rendering the paragraph of text. The indentation amount is interpreted as characters when rendering plain-text documents, and en-space units when rendering in formats that have richer typographic support such as HTML or PDF. One en-space is assumed to be the length of 0.5 em-space in CSS units. Only non-negative integer amounts of indentation are supported.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Acts as a hint to the output formatters that do pagination to do a best-effort attempt to keep the paragraph with the next element, whatever that happens to be. For example, for HTML output @media print
CSS might translate this to page-break-after: avoid. For PDF, the paginator could attempt to keep the paragraph with the next element. Note: this attribute is strictly a hint and not always actionable.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Acts as a hint to the output formatters that do pagination to do a best-effort attempt to keep the paragraph with the previous element, whatever that happens to be. For example, for HTML output @media print
CSS might translate this to page-break-before: avoid. For PDF, the paginator could attempt to keep the paragraph with the previous element. Note: this attribute is strictly a hint and not always actionable.¶
Contains a table with a caption with the table number. If the element contains a <name> element, the caption will also show that name.¶
Inside the <table> element there is, optionally, a <thead> element to contain the rows that will be the table's heading and, optionally, a <tfoot> element to contain the rows of the table's footer. If the XML is converted to a representation that has page breaks (such as PDFs or printed HTML), the header and footer are meant to appear on each page.¶
This element can be a child element of <aside >, <dd >, <li >, and <section >.¶
Content schema:
name ?, iref *, thead ?, tbody +, tfoot ?¶
Possible values:
( "left" | "center" | "right" )¶
Default value:
"center"¶
Controls whether the table appears left justified, centered, or right justified. The caption will be centered under the table, and the combined table and caption will be aligned according to the "align" attribute.¶
Document-wide unique identifier for this <table> element.¶
A container for a set of body rows for a table.¶
This element can be a child element of <table >.¶
Content schema:
tr +¶
Document-wide unique identifier for this <tbody> element.¶
A cell in a table row.¶
This element can be a child element of <tr >.¶
Content schema:
( ( artset | artwork | dl | figure | ol | sourcecode | t | ul )+ | ( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | tt | u | xref )* )¶
Possible values:
( "left" | "center" | "right" )¶
Default value:
"left"¶
Controls whether the content of the cell appears left justified, centered, or right justified. Note that "center" or "right" will probably only work well in cells with plain text; any other elements might make the contents render badly.¶
Document-wide unique identifier for this <td> element.¶
Default value:
"1"¶
The number of columns that the cell is to span. For example, setting "colspan='3'" indicates that the cell occupies the same horizontal space as three cells of a row without any "colspan" attributes.¶
Default value:
"1"¶
The number of rows that the cell is to span. For example, setting "rowspan='3'" indicates that the cell occupies the same vertical space as three rows.¶
A cell in a table row. When rendered, this will normally come out in boldface; other than that, there is no difference between this and the <td> element.¶
This element can be a child element of <tr >.¶
Content schema:
( ( artset | artwork | dl | figure | ol | sourcecode | t | ul )+ | ( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | tt | u | xref )* )¶
Possible values:
( "left" | "center" | "right" )¶
Default value:
"left"¶
Controls whether the content of the cell appears left justified, centered, or right justified. Note that "center" or "right" will probably only work well in cells with plain text; any other elements might make the contents render badly.¶
Document-wide unique identifier for this <th> element.¶
Default value:
"1"¶
The number of columns that the cell is to span. For example, setting "colspan='3'" indicates that the cell occupies the same horizontal space as three cells of a row without any "colspan" attributes.¶
Default value:
"1"¶
The number of rows that the cell is to span. For example, setting "rowspan='3'" indicates that the cell occupies the same vertical space as three rows.¶
A container for a set of header rows for a table.¶
This element can be a child element of <table >.¶
Content schema:
tr +¶
Document-wide unique identifier for this <thead> element.¶
Represents the document title.¶
When this element appears in the <front> element of the current document, the title might also appear in page headers or footers. If it is long (~40 characters), the "abbrev" attribute can be used to specify an abbreviated variant.¶
This element can be a child element of <front >.¶
Content schema:
( text | br )*¶
Specifies an abbreviated variant of the document title.¶
The ASCII equivalent of the <title> content.
This element may have non-ASCII Latin script content without specifying
an ASCII equivalent, but for other non-ASCII content an ASCII equivalent
is required.¶
This element contains the Table of Content. The content of the <toc> element is generated by the preptool based on the "tocInclude" and "tocDepth" attributes of the <rfc> element. As a document author, you should not use <toc> directly.¶
This element can be a child element of <front >.¶
Content schema:
section *¶
A row of a table.¶
This element can be a child element of <tbody >, <tfoot >, and <thead >.¶
Content schema:
( td | th )+¶
Document-wide unique identifier for this <tr> element.¶
Causes the text to be displayed in a constant-width font. This element can be combined with other character formatting elements, and the formatting will be additive.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <refcontent >, <strong >, <sub >, <sup >, <t >, <td >, <th >, and <xref >.¶
Content schema:
( text | bcp14 | br | cref | em | eref | iref | strong | sub | sup | xref )*¶
In xml2rfc vocabulary version 3, the elements <author>, <organisation>, <street>, <city>, <region>, <code>, <country>, <postalLine>, <email>, <seriesInfo>, and <title> may contain non- ascii characters for the purpose of rendering author names, addresses, and reference titles correctly. They also have an additional "ascii" attribute for the purpose of proper rendering in ascii-only media.¶
In order to insert Unicode characters in any other context, xml2rfc vocabulary v3 requires that the Unicode string be enclosed within an <u> element. The element will be expanded inline based on the value of a "format" attribute. This provides a generalised means of generating the 6 methods of Unicode renderings listed in [RFC7997 ] , Section 3.4, and also several others found in for instance the RFC Format Tools example rendering of RFC 7700, at https://rfc-format.github.io/draft-iab-rfc-css-bis/sample2-v2.html .¶
This element can be a child element of <annotation >, <blockquote >, <dd >, <li >, <t >, <td >, and <th >.¶
Content schema:
text¶
Document-wide unique identifier for this <u> element.¶
The ASCII equivalent of the content, to be used if the "ascii" keyword is used in the "format" specification.¶
An unordered list. The labels on the items will be symbols picked by the formatter.¶
This element can be a child element of <abstract >, <aside >, <blockquote >, <dd >, <li >, <note >, <section >, <td >, and <th >.¶
Content schema:
li +¶
Document-wide unique identifier for this <ul> element.¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Can only be used with empty="true" (see below). Determines if the blank bullet has an horizontal extension or not. With bare="false", the empty list bullet will still occupy the same space as for empty="false". With empty="true", there will be no bullet at all, i.e., the list items will have no indentation.¶
Example: an unordered list with bare="true" and empty="true":¶
Possible values:
( "true" | "false" )¶
Default value:
"false"¶
Defines whether or not the list item bullets are empty. empty="true" indicates that a blank (empty) bullet will be shown.¶
Example: an unordered list with bare="false" and empty="false":¶
Example: an unordered list with bare="false" and empty="true":¶
Default value:
"3"¶
The indentation of the list elements relative to the start of the bullet or bullet text.¶
Possible values:
( "normal" | "compact" )¶
Default value:
"normal"¶
Defines whether or not there is a blank line between entries. spacing="normal" indicates a single blank line, while spacing="compact" indicates no blank line between entries.¶
Contains a web address associated with the author.¶
The contents should be a valid URI; this most likely will be an "http:" or "https:" URI.¶
This element can be a child element of <address >.¶
Content schema:
text¶
This element is used to specify the Working Group (IETF) or Research Group (IRTF) from which the document originates, if any. The recommended format is the official name of the Working Group (with some capitalization).¶
In Internet-Drafts, this is used in the upper left corner of the boilerplate, replacing the "Network Working Group" string. Formatting software can append the words "Working Group" or "Research Group", depending on the "submissionType" property of the <rfc> element (Section 2.48.12).¶
This element can be a child element of <front >.¶
Content schema:
text¶
A reference to an anchor in this document. Formatters that have links (such as HTML and PDF) are likely to render <xref> elements as internal hyperlinks. This element is useful for referring to references in the "References" section, to specific sections of the document, to specific figures, and so on.¶
If the "section" attribute is present, this represents a link to a specific part of a document that appears in a <reference> element. Formatters that have links (such as HTML and PDF) render <xref> elements with "section" attributes as external hyperlinks to the specified part of the reference, creating the link target by combining the base URI from the <reference> element with the "relative" attribute from this element. The "target" attribute is required, and it must be the anchor of a <reference> element.¶
If the reference is not an RFC or Internet-Draft that is in the v3 format, the element needs to have a "relative" attribute; in this case, the value of the "section" attribute is used to render the text of the external link.¶
If the "sectino" attribute is present, the rendering will for most cominations of the "format" and "sectionFormat" have two links; one external link to the specific part of the referenced document, and one internal link to the <reference> entry.¶
The attribute "format" affect the internal link rendering only, and the "sectionFormat" affects the rendering of the external link and its textual relationship to the internal link only.¶
This element can be a child element of <annotation >, <blockquote >, <cref >, <dd >, <dt >, <em >, <li >, <name >, <strong >, <sub >, <sup >, <t >, <td >, <th >, <tt >, .¶
Content schema:
( text | em | strong | sub | sup | tt )*¶
Specifies a relative reference from the URI in the target reference. This value must include whatever leading character is needed to create the relative reference; typically, this is "#" for HTML documents.¶
Specifies a section of the target reference. If the reference is not an RFC or Internet-Draft in the v3 format, and no "relative" attribute has been provided, it is an error.¶
Identifies the document component being referenced. The value needs to match the value of the "anchor" attribute of an element in the document; otherwise, it is an error.¶
The following elements from v2 have been deprecated:¶
<c>¶
<facsimile>¶
<format>¶
<list>¶
<postamble>¶
<preamble>¶
<relref>¶
<spanx>¶
<texttable>¶
<ttcol>¶
<vspace>¶
The following attributes from v2 have been deprecated. Only
attributes of elements that have not themselves been deprecated
are listed:¶
<artwork>:
<figure>:
"align"¶
"alt"¶
"height"¶
"src"¶
"suppress-title"¶
"title"¶
"width"¶
<note>:
<references>:
<section>:
<seriesInfo>:
<t>:
[BCP14]
Bradner, S. , "Key words for use in RFCs to Indicate Requirement Levels" , BCP 14 , RFC 2119 , March 1997 .
Leiba, B. , "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words" , BCP 14 , RFC 8174 , May 2017 .
<https://www.rfc-editor.org/bcp/bcp14.txt >
[IDGUIDE]
Housley, R. , "Guidelines to Authors of Internet-Drafts" , December 2010 , <https://www.ietf.org/id-info/guidelines.html > .
[INTRO-TO-V3]
Levkowetz, H. , "Introduction to xml2rfc Version 3" , 20 February 2019 , <https://tools.ietf.org/src/xml2rfc/trunk/cli/doc/xml2rfc3.html > .
[LINKRELATIONS]
IANA , "Link Relations" , <https://www.iana.org/assignments/link-relations/link-relations.xhtml > .
[RFC2026]
Bradner, S. , "The Internet Standards Process -- Revision 3" , BCP 9 , RFC 2026 , DOI 10.17487/RFC2026 , October 1996 , <https://www.rfc-editor.org/info/rfc2026 > .
[RFC2397]
Masinter, L. , "The "data" URL scheme" , RFC 2397 , DOI 10.17487/RFC2397 , August 1998 , <https://www.rfc-editor.org/info/rfc2397 > .
[RFC3339]
Klyne, G. and C. Newman , "Date and Time on the Internet: Timestamps" , RFC 3339 , DOI 10.17487/RFC3339 , July 2002 , <https://www.rfc-editor.org/info/rfc3339 > .
[RFC3966]
Schulzrinne, H. , "The tel URI for Telephone Numbers" , RFC 3966 , DOI 10.17487/RFC3966 , December 2004 , <https://www.rfc-editor.org/info/rfc3966 > .
[RFC3986]
Berners-Lee, T. , Fielding, R. , and L. Masinter , "Uniform Resource Identifier (URI): Generic Syntax" , STD 66 , RFC 3986 , DOI 10.17487/RFC3986 , January 2005 , <https://www.rfc-editor.org/info/rfc3986 > .
[RFC5234]
Crocker, D., Ed. and P. Overell , "Augmented BNF for Syntax Specifications: ABNF" , STD 68 , RFC 5234 , DOI 10.17487/RFC5234 , January 2008 , <https://www.rfc-editor.org/info/rfc5234 > .
[RFC6068]
Duerst, M. , Masinter, L. , and J. Zawinski , "The 'mailto' URI Scheme" , RFC 6068 , DOI 10.17487/RFC6068 , October 2010 , <https://www.rfc-editor.org/info/rfc6068 > .
[RFC6087]
Bierman, A. , "Guidelines for Authors and Reviewers of YANG Data Model Documents" , RFC 6087 , DOI 10.17487/RFC6087 , January 2011 , <https://www.rfc-editor.org/info/rfc6087 > .
[RFC7322]
Flanagan, H. and S. Ginoza , "RFC Style Guide" , RFC 7322 , DOI 10.17487/RFC7322 , September 2014 , <https://www.rfc-editor.org/info/rfc7322 > .
[RFC7669]
Levine, J. , "Assigning Digital Object Identifiers to RFCs" , RFC 7669 , DOI 10.17487/RFC7669 , October 2015 , <https://www.rfc-editor.org/info/rfc7669 > .
[RFC7841]
Halpern, J., Ed. , Daigle, L., Ed. , and O. Kolkman, Ed. , "RFC Streams, Headers, and Boilerplates" , RFC 7841 , DOI 10.17487/RFC7841 , May 2016 , <https://www.rfc-editor.org/info/rfc7841 > .
[RFC7991]
Hoffman, P. , "The "xml2rfc" Version 3 Vocabulary" , RFC 7991 , DOI 10.17487/RFC7991 , December 2016 , <https://www.rfc-editor.org/info/rfc7991 > .
[RFC7996]
Brownlee, N. , "SVG Drawings for RFCs: SVG 1.2 RFC" , RFC 7996 , DOI 10.17487/RFC7996 , December 2016 , <https://www.rfc-editor.org/info/rfc7996 > .
[RFC7997]
Flanagan, H., Ed. , "The Use of Non-ASCII Characters in RFCs" , RFC 7997 , DOI 10.17487/RFC7997 , December 2016 , <https://www.rfc-editor.org/info/rfc7997 > .
[RFC7998]
Hoffman, P. and J. Hildebrand , ""xml2rfc" Version 3 Preparation Tool Description" , RFC 7998 , DOI 10.17487/RFC7998 , December 2016 , <https://www.rfc-editor.org/info/rfc7998 > .
[RNC]
Clark, J. , "RELAX NG Compact Syntax" , <https://www.oasis-open.org/committees/relax-ng/compact-20021121.html > .
<CODE BEGINS> file "v3.rnc"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
# xml2rfc Version 3 grammar
rfc =
element rfc {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute number { text }?,
[ a:defaultValue = "" ] attribute obsoletes { text }?,
[ a:defaultValue = "" ] attribute updates { text }?,
attribute category {
"std" | "bcp" | "exp" | "info" | "historic"
}?,
attribute mode { text }?,
[ a:defaultValue = "false" ]
attribute consensus { "no" | "yes" | "false" | "true" }?,
attribute seriesNo { text }?,
attribute ipr { text }?,
attribute iprExtract { xsd:IDREF }?,
[ a:defaultValue = "IETF" ]
attribute submissionType {
"IETF" | "IAB" | "IRTF" | "independent"
}?,
attribute docName { text }?,
[ a:defaultValue = "false" ]
attribute sortRefs { "true" | "false" }?,
[ a:defaultValue = "true" ]
attribute symRefs { "true" | "false" }?,
[ a:defaultValue = "true" ]
attribute tocInclude { "true" | "false" }?,
[ a:defaultValue = "3" ] attribute tocDepth { text }?,
attribute prepTime { text }?,
[ a:defaultValue = "true" ]
attribute indexInclude { "true" | "false" }?,
attribute version { text }?,
[ a:defaultValue = "Common,Latin" ] attribute scripts { text }?,
attribute expiresDate { text }?,
link*,
front,
middle,
back?
}
link =
element link {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute href { text },
attribute rel { text }?
}
front =
element front {
attribute xml:base { text }?,
attribute xml:lang { text }?,
title,
seriesInfo*,
author+,
date?,
area*,
workgroup*,
keyword*,
abstract?,
note*,
boilerplate?,
toc?
}
title =
element title {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute abbrev { text }?,
attribute ascii { text }?,
(text | br)*
}
author =
element author {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute initials { text }?,
attribute asciiInitials { text }?,
attribute surname { text }?,
attribute asciiSurname { text }?,
attribute fullname { text }?,
attribute role { "editor" }?,
attribute asciiFullname { text }?,
organization?,
address?
}
contact =
element contact {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute initials { text }?,
attribute asciiInitials { text }?,
attribute surname { text }?,
attribute asciiSurname { text }?,
attribute fullname { text }?,
attribute asciiFullname { text }?,
organization?,
address?
}
organization =
element organization {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute abbrev { text }?,
attribute ascii { text }?,
attribute asciiAbbrev { text }?,
[ a:defaultValue = "true" ]
attribute showOnFrontPage { "true" | "false" }?,
text
}
address =
element address {
attribute xml:base { text }?,
attribute xml:lang { text }?,
postal?,
phone?,
facsimile?,
email*,
uri?
}
postal =
element postal {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(( city | cityarea | code | country | extaddr | pobox | region
| sortingcode | street)*
| postalLine+)
}
extaddr =
element extaddr {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
pobox =
element pobox {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
street =
element street {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
cityarea =
element cityarea {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
city =
element city {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
region =
element region {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
code =
element code {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
sortingcode =
element sortingcode {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
country =
element country {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
postalLine =
element postalLine {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
phone =
element phone {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
facsimile =
element facsimile {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
email =
element email {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute ascii { text }?,
text
}
uri =
element uri {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
date =
element date {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute day { text }?,
attribute month { text }?,
attribute year { text }?,
text
}
area =
element area {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
workgroup =
element workgroup {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
keyword =
element keyword {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
abstract =
element abstract {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
(dl | ol | t | ul)+
}
note =
element note {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute title { text }?,
attribute pn { xsd:ID }?,
[ a:defaultValue = "false" ]
attribute removeInRFC { "true" | "false" }?,
name?,
(dl | ol | t | ul)+
}
boilerplate =
element boilerplate {
attribute xml:base { text }?,
attribute xml:lang { text }?,
section+
}
toc =
element toc {
attribute xml:base { text }?,
attribute xml:lang { text }?,
section*
}
middle =
element middle {
attribute xml:base { text }?,
attribute xml:lang { text }?,
section+
}
section =
element section {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
attribute title { text }?,
[ a:defaultValue = "true" ]
attribute numbered { "true" | "false" }?,
[ a:defaultValue = "default" ]
attribute toc { "include" | "exclude" | "default" }?,
[ a:defaultValue = "false" ]
attribute removeInRFC { "true" | "false" }?,
name?,
(artset
| artwork
| aside
| author
| blockquote
| contact
| dl
| figure
| iref
| ol
| sourcecode
| t
| table
| texttable
| ul)*,
section*
}
name =
element name {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute slugifiedName { xsd:ID }?,
(text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
br =
element br {
attribute xml:base { text }?,
attribute xml:lang { text }?,
empty
}
t =
element t {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
attribute hangText { text }?,
[ a:defaultValue = "0" ]
attribute indent { text }?,
[ a:defaultValue = "false" ]
attribute keepWithNext { "true" | "false" }?,
[ a:defaultValue = "false" ]
attribute keepWithPrevious { "true" | "false" }?,
(text
| bcp14
| br
| contact
| cref
| em
| eref
| iref
| \list
| relref
| spanx
| strong
| sub
| sup
| tt
| u
| vspace
| xref)*
}
aside =
element aside {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
(artset
| artwork
| blockquote
| dl
| figure
| iref
| ol
| t
| table
| ul)*
}
blockquote =
element blockquote {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
attribute cite { text }?,
attribute quotedFrom { text }?,
((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
| (text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| u
| xref)+)
}
\list =
element list {
attribute xml:base { text }?,
attribute xml:lang { text }?,
[ a:defaultValue = "empty" ] attribute style { text }?,
attribute hangIndent { text }?,
attribute counter { text }?,
attribute pn { xsd:ID }?,
t+
}
ol =
element ol {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "1" ] attribute type { text }?,
[ a:defaultValue = "1" ] attribute start { text }?,
attribute group { text }?,
[ a:defaultValue = "normal" ]
attribute spacing { "normal" | "compact" }?,
[ a:defaultValue = "adaptive" ]
attribute indent { text | "adaptive" }?,
attribute pn { xsd:ID }?,
li+
}
ul =
element ul {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "normal" ]
attribute spacing { "normal" | "compact" }?,
([ a:defaultValue = "false" ]
attribute empty { "true" | "false" },
[ a:defaultValue = "false" ]
attribute bare { "true" | "false" }?)?,
[ a:defaultValue = "3" ]
attribute indent { text }?,
attribute pn { xsd:ID }?,
li+
}
li =
element li {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute derivedCounter { text }?,
attribute pn { xsd:ID }?,
(( artset
| artwork
| blockquote
| dl
| figure
| ol
| sourcecode
| t
| table
| ul)+
| (text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| u
| xref)+)
}
dl =
element dl {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "normal" ]
attribute spacing { "normal" | "compact" }?,
[ a:defaultValue = "false" ]
attribute newline { "true" | "false" }?,
[ a:defaultValue = "3" ]
attribute indent { text }?,
attribute pn { xsd:ID }?,
(dt, dd)+
}
dt =
element dt {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
(text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
dd =
element dd {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
(( artset
| artwork
| aside
| dl
| figure
| ol
| sourcecode
| t
| table
| ul)+
| (text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| u
| xref)+)
}
xref =
element xref {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute target { xsd:IDREF },
[ a:defaultValue = "false" ]
attribute pageno { "true" | "false" }?,
[ a:defaultValue = "default" ]
attribute format { "default" | "title" | "counter" | "none" }?,
attribute derivedContent { text }?,
[ a:defaultValue = "of" ]
attribute sectionFormat { "of" | "comma" | "parens" | "bare" }?,
attribute section { text }?,
attribute relative { text }?,
attribute derivedLink { text }?,
(text | em | strong | sub | sup | tt)*
}
relref =
element relref {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute target { xsd:IDREF },
[ a:defaultValue = "of" ]
attribute displayFormat { "of" | "comma" | "parens" | "bare" }?,
attribute derivedContent { text }?,
attribute section { text },
attribute relative { text }?,
attribute derivedLink { text }?,
text
}
eref =
element eref {
attribute xml:base { text }?,
attribute xml:lang { text }?,
[ a:defaultValue = "none" ]
attribute brackets { "none" | "angle" }?,
attribute target { text },
text
}
iref =
element iref {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute item { text },
[ a:defaultValue = "" ] attribute subitem { text }?,
[ a:defaultValue = "false" ]
attribute primary { "true" | "false" }?,
attribute pn { xsd:ID }?,
empty
}
cref =
element cref {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute source { text }?,
[ a:defaultValue = "true" ]
attribute display { "true" | "false" }?,
(text
| br
| em
| eref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
tt =
element tt {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| xref)*
}
strong =
element strong {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| sub
| sup
| tt
| xref)*
}
em =
element em {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| br
| cref
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
sub =
element sub {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
sup =
element sup {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| xref)*
}
spanx =
element spanx {
attribute xml:base { text }?,
attribute xml:lang { text }?,
[ a:defaultValue = "preserve" ]
attribute xml:space { "default" | "preserve" }?,
[ a:defaultValue = "emph" ] attribute style { text }?,
text
}
vspace =
element vspace {
attribute xml:base { text }?,
attribute xml:lang { text }?,
[ a:defaultValue = "0" ] attribute blankLines { text }?,
empty
}
figure =
element figure {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
[ a:defaultValue = "" ] attribute title { text }?,
[ a:defaultValue = "false" ]
attribute suppress-title { "true" | "false" }?,
attribute src { text }?,
attribute originalSrc { text }?,
[ a:defaultValue = "left" ]
attribute align { "left" | "center" | "right" }?,
[ a:defaultValue = "" ] attribute alt { text }?,
[ a:defaultValue = "" ] attribute width { text }?,
[ a:defaultValue = "" ] attribute height { text }?,
name?,
iref*,
preamble?,
(artset | artwork | sourcecode)+,
postamble?
}
table =
element table {
attribute xml:base { text }?,
attribute xml:lang { text }?,
[ a:defaultValue = "center" ]
attribute align { "left" | "center" | "right" }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
name?,
iref*,
thead?,
tbody+,
tfoot?
}
preamble =
element preamble {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| cref
| em
| eref
| iref
| relref
| spanx
| strong
| sub
| sup
| tt
| u
| xref)*
}
artset =
element artset {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
artwork+
}
artwork =
element artwork {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
attribute xml:space { text }?,
[ a:defaultValue = "" ] attribute name { text }?,
[ a:defaultValue = "" ] attribute type { text }?,
attribute src { text }?,
[ a:defaultValue = "left" ]
attribute align { "left" | "center" | "right" }?,
[ a:defaultValue = "" ] attribute alt { text }?,
[ a:defaultValue = "" ] attribute width { text }?,
[ a:defaultValue = "" ] attribute height { text }?,
attribute originalSrc { text }?,
(text* | svg)
}
include "SVG-1.2-RFC.rnc"
sourcecode =
element sourcecode {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
attribute pn { xsd:ID }?,
[ a:defaultValue = "" ] attribute name { text }?,
[ a:defaultValue = "" ] attribute type { text }?,
[ a:defaultValue = "false" ]
attribute markers { "true" | "false" }?,
attribute src { text }?,
attribute originalSrc { text }?,
text
}
thead =
element thead {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
tr+
}
tbody =
element tbody {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
tr+
}
tfoot =
element tfoot {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
tr+
}
tr =
element tr {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
(td | th)+
}
td =
element td {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "1" ] attribute colspan { text }?,
[ a:defaultValue = "1" ] attribute rowspan { text }?,
[ a:defaultValue = "left" ]
attribute align { "left" | "center" | "right" }?,
((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
| (text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| u
| xref)*)
}
th =
element th {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "1" ] attribute colspan { text }?,
[ a:defaultValue = "1" ] attribute rowspan { text }?,
[ a:defaultValue = "left" ]
attribute align { "left" | "center" | "right" }?,
((artset | artwork | dl | figure | ol | sourcecode | t | ul)+
| (text
| bcp14
| br
| cref
| em
| eref
| iref
| relref
| strong
| sub
| sup
| tt
| u
| xref)*)
}
postamble =
element postamble {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text | cref | eref | iref | spanx | xref)*
}
texttable =
element texttable {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID }?,
[ a:defaultValue = "" ] attribute title { text }?,
[ a:defaultValue = "false" ]
attribute suppress-title { "true" | "false" }?,
[ a:defaultValue = "center" ]
attribute align { "left" | "center" | "right" }?,
[ a:defaultValue = "full" ]
attribute style { "all" | "none" | "headers" | "full" }?,
name?,
preamble?,
ttcol+,
c*,
postamble?
}
ttcol =
element ttcol {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute width { text }?,
[ a:defaultValue = "left" ]
attribute align { "left" | "center" | "right" }?,
(cref | eref | iref | xref | text)*
}
c =
element c {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text | cref | eref | iref | spanx | xref)*
}
bcp14 =
element bcp14 {
attribute xml:base { text }?,
attribute xml:lang { text }?,
text
}
back =
element back {
attribute xml:base { text }?,
attribute xml:lang { text }?,
displayreference*,
references*,
section*
}
displayreference =
element displayreference {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute target { xsd:IDREF },
attribute to { text }
}
references =
element references {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute pn { xsd:ID }?,
attribute anchor { xsd:ID }?,
attribute title { text }?,
name?,
(references+ | (reference | referencegroup)*)
}
reference =
element reference {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID },
attribute derivedAnchor { text }?,
attribute target { text }?,
[ a:defaultValue = "true" ]
attribute quoteTitle { "true" | "false" }?,
attribute quote-title { "true" | "false" }?,
stream?,
front,
(annotation | format | refcontent | seriesInfo)*
}
stream =
element stream {
( "IETF" | "IAB" | "IRTF" | "independent" )?
}
referencegroup =
element referencegroup {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute anchor { xsd:ID },
attribute derivedAnchor { text }?,
attribute target { text }?,
reference+
}
seriesInfo =
element seriesInfo {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute name { text },
attribute value { text },
attribute asciiName { text }?,
attribute asciiValue { text }?,
attribute status { text }?,
attribute stream { "IETF" | "IAB" | "IRTF" | "independent" }?,
empty
}
format =
element format {
attribute xml:base { text }?,
attribute xml:lang { text }?,
attribute target { text }?,
attribute type { text },
attribute octets { text }?,
empty
}
annotation =
element annotation {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text
| bcp14
| cref
| em
| eref
| iref
| relref
| spanx
| strong
| sub
| sup
| tt
| u
| xref)*
}
refcontent =
element refcontent {
attribute xml:base { text }?,
attribute xml:lang { text }?,
(text | bcp14 | em | strong | sub | sup | tt)*
}
u =
element u {
attribute anchor { xsd:ID }?,
attribute ascii { text }?,
[ a:defaultValue = "lit-name-num" ]
attribute format { text }?,
attribute pn { xsd:ID }?,
text
}
start |= rfc
<CODE ENDS> ¶
The following command-line options are available. Long options may be shortened to the shortest substring that still makes the option string unique, when given on the command line. In config files, the full long option string must be used.¶
source
Input XML file to render to one or more of the available formats.¶
Some options to generate built-in documentation.
The group has 8 options.¶
--help
, -h
Show a help message and exit.¶
--docfile
Generate a documentation XML file ready for formatting.¶
The --docfile
and --manpage
switches takes input from 5 places:¶
The v3.rng
file distributed as part of the xml2rfc package, which is also used to validate and process v3 XML input.¶
A rfc7991.rng
file distributed as part of the xml2rfc package, which holds the schema defined in [RFC7991 ] . This is used in determining elements and attributes that are new in the current v3.rng
schema, compared to the RFC7991 schema.¶
Lists of deprecated elements and attributes, which are part of the xml2rfc source.¶
A YAML file doc.yaml
that contains XML snippets with descriptions of elements, attributes, attribute values, and switches, from the same directory as doc.xml
.¶
An XML template file doc.xml
, by default taken from the templates
directory of the xml2rfc package (but this can be changed with the --templates-dir
switch). The 4 preceding sources provide content that is used to expand the template file when generating the --â docfile
and --â manpage
output.¶
--manpage
Show paged text documentation.¶
Generates on-the-fly paged text documentation for the v3 schema elements and attributes from the v3 RelaxNG schema file which is part of the xml2rfc distribution, and YAML and XML files that provide the text content and formatting. See the --docfile
switch for more details.¶
--country-help
Show the recognized <country> strings.¶
--pdf-help
Show pdf generation requirements.¶
--template-dir
Directory to pull the doc.xml and doc.yaml templates from. The default is the "templates" directory of the xml2rfc package.¶
This is used to find the templates used by the --â docfile
and --â manpage
commands and for legacy .html template and .dtd files.¶
A consequence of being able to specify a different template directory than the default is that it's possible to use the --â docfile
command to generate additional documentation XML files based on the current V3 grammar file. The default template and snippets file does not include documentation for deprecated elements and attributes, for instance; but if it is desired to generate such documentation from the distributed V3 RelaxNg schema, it should be straightforward. The templating system used is Jinja2; the snippens file is YAML with extra support for some escape sequences: '\ <' and '\ >'.¶
--values
Show option values and from where they come.¶
This shows (in order):¶
Command line arguments¶
Config file settings, per config file¶
Default values¶
Config file search path¶
--version
, -V
Display the version number and exit.¶
With the --verbose
switch, the versions of the external python modules used will also be shown.¶
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.
The group has 10 options.¶
--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
Outputs formatted PDF to file.¶
--raw
Outputs formatted text to file, unpaginated (only v2 input).¶
--expand
Outputs XML to file with all references expanded.¶
--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.¶
--clear-cache
, -C
Purge the cache and exit.¶
--debug
Show debugging output.¶
--no-network
, -N
Don't use the network to resolve references.¶
--no-org-info
, -O
Don't show author orgainzation info on page one (legacy only).¶
--quiet
, -q
Don't print anything while working.¶
--skip-config-files
Ignore config file settings.¶
Use this to ignore values in config files, even if there are config files in the search path. Somewhat ironically, this option can itself be set in a config file, and cause all other config file settings to be ignored.¶
--allow-local-file-access
Allow local file system references.¶
--remove-pis
, -r
Remove XML processing instructions.¶
--utf8
, -u
Generate utf8 output.¶
--verbose
, -v
Print extra information.¶
--basename
, -b
= NAME
Specify the base name for output files.¶
--cache
, -c
= PATH
Specify a primary cache directory to write to; default: try [ /var/cache/xml2rfc, ~/.cache/xml2rfc ].¶
--config-file
= FILE
Specify a configuration file.¶
This argument can be repeated, to read multiple explicitly specified config files. They will be read after any config files found in 'standard' locations have been read. Run xml2rfc --values
to see the default search path for config files.¶
--dtd
, -d
= DTDFILE
Specify an alternate dtd file.¶
This option can be negated with --no-dtd.¶
--date
, -D
= DATE
Run as if the date is DATE (format: yyyy-mm-dd). Default: Today's date.¶
--filename
, -f
= FILE
Deprecated. The same as -o.¶
--indent
, -i
= INDENT
With some v3 formatters: Indentation to use when pretty-printing XML.¶
--out
, -o
= FILE
Specify an explicit output filename.¶
--path
, -p
= PATH
Specify the directory path for output files.¶
--silence
, -s
= STRING
Silence any warning beginning with the given string.¶
Specifies a string prefix or a regular expression to match against warning messages. Any warning message that matches is silenced. Example:¶
xml2rfc --silence='The document date' draft-foo-bar.xml ¶
This will not show any message about the document date being too far from the current date. The option can be repeated with different prefix strings or regular expressions in order to silence multiple warning messages.¶
Alternatively, instead of indicating this on the command line, an xml2rfc-specific PI (processing instruction) is available for use in XML input files. This will have the same effect as the example above, except when processing prepped drafts; running the preptool on a file will strip XML PIs before writing the prepped file:¶
<?v3xml2rfc silence="The document date" ?> ¶
--v3
With --text and --html: use the v3 formatter, rather than the legacy one.¶
This is the default. With both v2 schema and v3 schema XML input files, use the v3 output formatters. Input with deprecated v2 elements will be converted to v3 on the fly. This means some loss of functionality and exact control of the output, due to the intermediary conversion step.¶
--v2
, --legacy
With --text and --html: use the legacy output formatters, rather than the v3 ones.¶
Invokes the legacy (schema v2) validator and output formatters, instead of the default schema v3 output formatters. This can only be used with pure v2 input files.¶
--id-is-work-in-progress
In references, refer to Internet-Drafts as "Work in Progress".¶
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.¶
This option can be negated with --no-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.¶
Do pagination.¶
By default, drafts are paginated, but not RFCs. Use this switch if you want to force pagination of all text output.¶
This option can be negated with --no-pagination.¶
--table-hyphen-breaks
More easily do line breaks after hyphens in table cells to give a more compact table.¶
--table-borders
Default value: full¶
The style of table borders to use for text output; one of full/light/minimal.¶
Examples (these will only have visible differences in text mode):¶
"full":
Table 2
A
B
C
a
b
c
aa
ba
ca
ab
bb
cb
AA
BB
CC
aaa
bba
cca
aab
bbb
ccb
¶
"light":
Table 3
A
B
C
a
b
c
aa
ba
ca
ab
bb
cb
AA
BB
CC
aaa
bba
cca
aab
bbb
ccb
¶
"minimal":
Table 4
A
B
C
a
b
c
aa
ba
ca
ab
bb
cb
AA
BB
CC
aaa
bba
cca
aab
bbb
ccb
¶
--css
= FILE
Use the given CSS file instead of the builtin.¶
--external-css
Place css in external files.¶
This option can be negated with --no-external-css.¶
--external-js
Place js in external files.¶
This option can be negated with --no-external-js.¶
--rfc-base-url
Default value: https://www.rfc-editor.org/rfc/¶
Base URL for RFC links.¶
--id-base-url
Default value: https://datatracker.ietf.org/doc/html/¶
Base URL for Internet-Draft links.¶
--rfc-reference-base-url
Default value: https://rfc-editor.org/rfc/¶
Base URL for RFC reference targets, replacing the target="..." value given in the reference entry.¶
--id-reference-base-url
Default value: https://datatracker.ietf.org/doc/html/¶
Base URL for I-D reference targets.¶
--metadata-js-url
Default value: metadata.min.js¶
URL for the metadata script.¶
--add-xinclude
Replace reference elements with RFC and Internet-Draft seriesInfo with the appropriate XInclude element.¶
--draft-revs
, --draft-revisions
Reference explicit draft revisions when inserting XIncludes for draft references.¶
--strict
Be strict about stripping some deprecated attributes.¶
--accept-prepped
Accept already prepped input.¶
Most options have built-in defaults, and the command-line switches above can be used to override those. Additionally, xml2rfc
will look for config files in some standard file locations. The option --â values
will show the places xml2rfc
will look for config files on your system (among other information). Any settings in config files will override the program defaults, but will in turn be overridden by command-line options.¶
The config files are expected to contain lines with option value assignments. Lines with '#' as the first character are considered comments. Here is an example:¶
# ----
legacy-date-format = true
add-xinclude = true
external-js = false
# ----
¶
The complete long option names must be used in configuration files; abbreviations will not be recognised (in contrast with how abbreviations are handled during command-line option processing).¶
The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.12.1:¶
{{ bare_latin_tags }}:
{{ descriptions }}:
The descriptions read from the doc.yaml
file¶
{{ element_tags }}:
A list of all the element tags in the XML schema¶
{{ elements }}:
A list of dictionaries, each with information about one schema element: {"attributes": ..., "children": ..., "deprecated": ..., "deprecated_attributes": ..., "description": ..., "new": ..., "parents": ..., "rnc": ..., "tag": ..., }¶
{{ options }}:
A list of dictionaries describing the command-line options¶
{{ schema }}:
The full RelaxNG Compact representation of the schema in text form¶
{{ toc_depth }}:
ToC depth setting; 1 when running --man, 2 otherwise¶
{{ v3_element_tags }}:
A list of v3 element tags, excluding deprecated tags¶
{{ version }}:
The xml2rfc version number¶