Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"intervaltree>=3.1.0",
"jinja2>=3.1.2",
"lxml>=5.3.0",
"natsort>=8.4.0",
"pycountry>=22.3.5",
"pyyaml>=5.3.1",
"requests>=2.5.0",
Expand Down
190 changes: 190 additions & 0 deletions tests/input/rfc99999.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,65 @@
<section numbered="true" toc="default">
<name>Section 31</name>
<t>redacted <xref target="RFC99998"/></t>
<t>More references:
<xref target="RFC666"/>
<xref target="RFC4321"/>
<xref target="RFC1"/>
<xref target="RFC99"/>
<xref target="BCP101"/>
<xref target="BCP3"/>
<xref target="BCP10"/>
<xref target="STD101"/>
<xref target="STD30"/>
<xref target="STD2"/>
<xref target="ACME"/>
<xref target="FOOBAR"/>
<xref target="RFCed"/>
<xref target="ZULU"/>
</t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<reference anchor="RFC666" target="https://www.rfc-editor.org/info/rfc666">
<front>
<title>General Order 24</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="666"/>
<seriesInfo name="DOI" value="10.17487/RFC666"/>
</reference>
<reference anchor="RFC4321" target="https://www.rfc-editor.org/info/rfc4321">
<front>
<title>General Order 7</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="4321"/>
<seriesInfo name="DOI" value="10.17487/RFC4321"/>
</reference>
<reference anchor="RFC1" target="https://www.rfc-editor.org/info/rfc1">
<front>
<title>General Order 0</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="1"/>
<seriesInfo name="DOI" value="10.17487/RFC1"/>
</reference>
<reference anchor="RFC99998" target="https://www.rfc-editor.org/info/rfc99998">
<front>
<title>Prime Directive</title>
Expand All @@ -46,6 +98,144 @@
<seriesInfo name="RFC" value="99998"/>
<seriesInfo name="DOI" value="10.17487/RFC99998"/>
</reference>
<reference anchor="RFC99" target="https://www.rfc-editor.org/info/rfc99">
<front>
<title>General Order 99</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="October" year="2024"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="RFC" value="99"/>
<seriesInfo name="DOI" value="10.17487/RFC99"/>
</reference>
<referencegroup anchor="BCP101" target="https://www.rfc-editor.org/info/bcp101">
<reference anchor="RFC1111" target="https://www.rfc-editor.org/info/rfc1111">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="BCP" value="101"/>
<seriesInfo name="RFC" value="1111"/>
<seriesInfo name="DOI" value="10.17487/RFC1111"/>
</reference>
</referencegroup>
<referencegroup anchor="BCP3" target="https://www.rfc-editor.org/info/bcp3">
<reference anchor="RFC1112" target="https://www.rfc-editor.org/info/rfc1112">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="BCP" value="3"/>
<seriesInfo name="RFC" value="1112"/>
<seriesInfo name="DOI" value="10.17487/RFC1112"/>
</reference>
</referencegroup>
<referencegroup anchor="BCP10" target="https://www.rfc-editor.org/info/bcp10">
<reference anchor="RFC1113" target="https://www.rfc-editor.org/info/rfc1113">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="BCP" value="10"/>
<seriesInfo name="RFC" value="1113"/>
<seriesInfo name="DOI" value="10.17487/RFC1113"/>
</reference>
</referencegroup>
<referencegroup anchor="STD101" target="https://www.rfc-editor.org/info/std101">
<reference anchor="RFC2222" target="https://www.rfc-editor.org/info/rfc2222">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="STD" value="101"/>
<seriesInfo name="RFC" value="2222"/>
<seriesInfo name="DOI" value="10.17487/RFC2222"/>
</reference>
</referencegroup>
<referencegroup anchor="STD30" target="https://www.rfc-editor.org/info/std30">
<reference anchor="RFC2223" target="https://www.rfc-editor.org/info/rfc2223">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="STD" value="30"/>
<seriesInfo name="RFC" value="2223"/>
<seriesInfo name="DOI" value="10.17487/RFC2223"/>
</reference>
</referencegroup>
<referencegroup anchor="STD2" target="https://www.rfc-editor.org/info/std2">
<reference anchor="RFC2224" target="https://www.rfc-editor.org/info/rfc2224">
<front>
<title>Fake Title</title>
<author fullname="J. Doe" initials="J." surname="Doe"/>
<date month="February" year="2020"/>
<abstract>
<t>Fake reference</t>
</abstract>
</front>
<seriesInfo name="STD" value="2"/>
<seriesInfo name="RFC" value="2224"/>
<seriesInfo name="DOI" value="10.17487/RFC2224"/>
</reference>
</referencegroup>
<reference anchor="FOOBAR" target="https://example.org">
<front>
<title>FOOBAR</title>
<author>
<organization>FOOBAR</organization>
</author>
<date year="2019"/>
</front>
</reference>
<reference anchor="ZULU" target="https://example.org">
<front>
<title>ZULU</title>
<author>
<organization>ZULU</organization>
</author>
<date year="2019"/>
</front>
</reference>
<reference anchor="RFCed" target="https://example.org">
<front>
<title>RFCed</title>
<author>
<organization>RFCed</organization>
</author>
<date year="2019"/>
</front>
</reference>
<reference anchor="ACME" target="https://example.org">
<front>
<title>ACME</title>
<author>
<organization>ACME</organization>
</author>
<date year="2019"/>
</front>
</reference>
</references>
</references>
</back>
Expand Down
16 changes: 8 additions & 8 deletions tests/valid/docfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.32.0</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.33.0</title>
<meta content="xml2rfc(1)" name="author">
<meta content="

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.

" name="description">
<meta content="xml2rfc 3.32.0" name="generator">
<meta content="xml2rfc-docs-3.32.0" name="ietf.draft">
<meta content="xml2rfc 3.33.0" name="generator">
<meta content="xml2rfc-docs-3.33.0" name="ietf.draft">
<link href="docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand All @@ -24,7 +24,7 @@
<thead><tr>
<td class="left"></td>
<td class="center">Xml2rfc Vocabulary V3 Schema</td>
<td class="right">March 2026</td>
<td class="right">April 2026</td>
</tr></thead>
<tfoot><tr>
<td class="left">xml2rfc(1)</td>
Expand All @@ -39,7 +39,7 @@
<dd class="workgroup">xml2rfc(1)</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2026-03-30" class="published">30 March 2026</time>
<time datetime="2026-04-13" class="published">13 April 2026</time>
</dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
Expand All @@ -49,7 +49,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.32.0</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.33.0</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -374,7 +374,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The RFCXML vocabulary reference is available at <span><a href="https://authors.ietf.org/en/rfcxml-vocabulary">https://authors.ietf.org/en/rfcxml-vocabulary</a></span>.<a href="#section-1-5" class="pilcrow">¶</a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.32.0.<a href="#section-1-6" class="pilcrow">¶</a></p>
This documentation applies to xml2rfc version 3.33.0.<a href="#section-1-6" class="pilcrow">¶</a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -6416,7 +6416,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.32.0:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
manpage Jinja2 template, as of xml2rfc version 3.33.0:<a href="#appendix-D-1" class="pilcrow">¶</a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
5 changes: 3 additions & 2 deletions tests/valid/draft-miek-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
This version is adapted to work with "xml2rfc" version 2.x.

' name="description">
<meta content="xml2rfc 3.32.0" name="generator">
<meta content="xml2rfc 3.33.0" name="generator">
<meta content="RFC" name="keyword">
<meta content="Request for Comments" name="keyword">
<meta content="I-D" name="keyword">
Expand All @@ -26,13 +26,14 @@
<meta content="Extensible Markup Language" name="keyword">
<meta content="draft-gieben-writing-rfcs-pandoc-02" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.32.0
xml2rfc 3.33.0
Python 3.13.12
ConfigArgParse 1.7.5
google-i18n-address 3.1.1
intervaltree 3.2.1
Jinja2 3.1.6
lxml 6.0.2
natsort 8.4.0
platformdirs 4.9.4
pycountry 26.2.16
pypdf 6.9.2
Expand Down
5 changes: 3 additions & 2 deletions tests/valid/draft-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
Insert an abstract: MANDATORY. This template is for creating an
Internet Draft.
" name="description">
<meta content="xml2rfc 3.32.0" name="generator">
<meta content="xml2rfc 3.33.0" name="generator">
<meta content="template" name="keyword">
<meta content="draft-ietf-xml2rfc-template-05" name="ietf.draft">
<!-- Generator version information:
xml2rfc 3.32.0
xml2rfc 3.33.0
Python 3.13.12
ConfigArgParse 1.7.5
google-i18n-address 3.1.1
intervaltree 3.2.1
Jinja2 3.1.6
lxml 6.0.2
natsort 8.4.0
platformdirs 4.9.4
pycountry 26.2.16
pypdf 6.9.2
Expand Down
16 changes: 8 additions & 8 deletions tests/valid/indexes.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft March 30, 2026
Internet-Draft April 13, 2026
Intended status: Experimental
Expires: October 1, 2026
Expires: October 15, 2026


xml2rfc index tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on October 1, 2026.
This Internet-Draft will expire on October 15, 2026.

Copyright Notice

Expand All @@ -53,9 +53,9 @@ Table of Contents



Person Expires October 1, 2026 [Page 1]
Person Expires October 15, 2026 [Page 1]

Internet-Draft xml2rfc index tests March 2026
Internet-Draft xml2rfc index tests April 2026


This is another section!
Expand Down Expand Up @@ -109,9 +109,9 @@ Index



Person Expires October 1, 2026 [Page 2]
Person Expires October 15, 2026 [Page 2]

Internet-Draft xml2rfc index tests March 2026
Internet-Draft xml2rfc index tests April 2026


E
Expand Down Expand Up @@ -165,4 +165,4 @@ Author's Address



Person Expires October 1, 2026 [Page 3]
Person Expires October 15, 2026 [Page 3]
Loading
Loading