Skip to content

Commit

Permalink
fix: Treat referencegroup entries similarly to reference entries (#1089)
Browse files Browse the repository at this point in the history
* chore: Run yestests

* fix: Show doi in referencegroups

Fixes #1067

* chore: Run yestests with doi change

* fix: Show target link for each entry in referencegroup

Fixes #1067

* chore: Run yests with target chagne
  • Loading branch information
kesara authored Jan 31, 2024
1 parent 9c47d64 commit 8f14554
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 120 deletions.
6 changes: 3 additions & 3 deletions tests/valid/docfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dd class="workgroup">xml2rfc(1)</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2024-01-16" class="published">16 January 2024</time>
<time datetime="2024-01-26" class="published">26 January 2024</time>
</dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
Expand Down Expand Up @@ -4226,9 +4226,9 @@ <h2 id="name-references-2">
<dt id="BCP14">[BCP14]</dt>
<dd>
<div class="refInstance" id="RFC2119">
<span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>. </div>
<span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>&gt;</span>. </div>
<div class="refInstance" id="RFC8174">
<span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>. </div>
<span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>&gt;</span>. </div>
<span>&lt;<a href="https://www.rfc-editor.org/bcp/bcp14.txt">https://www.rfc-editor.org/bcp/bcp14.txt</a>&gt;</span>
</dd>
<dd class="break"></dd>
Expand Down
38 changes: 20 additions & 18 deletions tests/valid/draft-miek-test.v3add-xinclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,16 @@ draft-gieben-writing-rfcs-pandoc-00.txt -> draft.txt
<!-- bibxml reference -->
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4941.xml"/><!-- bibxml-misc reference -->
<reference anchor="ISO.8327.1990" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.ISO.8327.1990.xml">
<front>
<title>Information processing systems - Open Systems Interconnection - Basic connection oriented session protocol specification</title>
<author>
<organization>International Organization for Standardization</organization>
</author>
<date month="April" year="1990"/>
</front>
<seriesInfo name="ISO" value="Standard 8327"/>
<front>
<title>Information processing systems - Open Systems Interconnection - Basic connection oriented session protocol specification</title>
<author>
<organization>International Organization for Standardization</organization>
</author>
<date month="April" year="1990"/>
</front>

<seriesInfo name="ISO" value="Standard 8327"/>

</reference><!-- bibxml-ids reference -->
<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-6lo-ap-nd.xml"/><!-- bibxml-w3c reference -->
<reference anchor="W3C.CR-accelerometer-20191212" target="https://www.w3.org/TR/2019/CR-accelerometer-20191212/" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.W3C.CR-accelerometer-20191212.xml">
Expand All @@ -895,16 +897,16 @@ draft-gieben-writing-rfcs-pandoc-00.txt -> draft.txt
<seriesInfo name="W3C" value="CR-accelerometer-20191212"/>
</reference><!-- bibxml-ieee reference -->
<reference anchor="IEEE.802-1Y.1990" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.IEEE.802-1Y.1990.xml">
<front>
<title>Source Routing Tutorial for End System Operation</title>
<author>
<organization>Institute of Electrical and Electronics Engineers</organization>
</author>
<date month="September" year="1990"/>
</front>
<seriesInfo name="IEEE" value="Standard 802.1Y"/>
<seriesInfo name="IEEE" value="802.1y-1990"/>
<seriesInfo name="IEEE" value="ieee-802-1y"/>
<front>
<title>Source Routing Tutorial for End System Operation</title>
<author>
<organization>Institute of Electrical and Electronics Engineers</organization>
</author>
<date month="September" year="1990"/>
</front>

<seriesInfo name="IEEE" value="Standard 802.1Y"/>

</reference></references>
</references>
<!--This document was prepared using Pandoc2rfc https://github.com/miekg/pandoc2rfc -->
Expand Down
38 changes: 20 additions & 18 deletions tests/valid/draft-template.v3add-xinclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,16 @@ draft-gieben-writing-rfcs-pandoc-00.txt -> draft.txt
<!-- bibxml reference -->
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4941.xml"/><!-- bibxml-misc reference -->
<reference anchor="ISO.8327.1990" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.ISO.8327.1990.xml">
<front>
<title>Information processing systems - Open Systems Interconnection - Basic connection oriented session protocol specification</title>
<author>
<organization>International Organization for Standardization</organization>
</author>
<date month="April" year="1990"/>
</front>
<seriesInfo name="ISO" value="Standard 8327"/>
<front>
<title>Information processing systems - Open Systems Interconnection - Basic connection oriented session protocol specification</title>
<author>
<organization>International Organization for Standardization</organization>
</author>
<date month="April" year="1990"/>
</front>

<seriesInfo name="ISO" value="Standard 8327"/>

</reference><!-- bibxml-ids reference -->
<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-6lo-ap-nd.xml"/><!-- bibxml-w3c reference -->
<reference anchor="W3C.CR-accelerometer-20191212" target="https://www.w3.org/TR/2019/CR-accelerometer-20191212/" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.W3C.CR-accelerometer-20191212.xml">
Expand All @@ -895,16 +897,16 @@ draft-gieben-writing-rfcs-pandoc-00.txt -> draft.txt
<seriesInfo name="W3C" value="CR-accelerometer-20191212"/>
</reference><!-- bibxml-ieee reference -->
<reference anchor="IEEE.802-1Y.1990" xml:base="https://bib.ietf.org/public/rfc/bibxml-misc/reference.IEEE.802-1Y.1990.xml">
<front>
<title>Source Routing Tutorial for End System Operation</title>
<author>
<organization>Institute of Electrical and Electronics Engineers</organization>
</author>
<date month="September" year="1990"/>
</front>
<seriesInfo name="IEEE" value="Standard 802.1Y"/>
<seriesInfo name="IEEE" value="802.1y-1990"/>
<seriesInfo name="IEEE" value="ieee-802-1y"/>
<front>
<title>Source Routing Tutorial for End System Operation</title>
<author>
<organization>Institute of Electrical and Electronics Engineers</organization>
</author>
<date month="September" year="1990"/>
</front>

<seriesInfo name="IEEE" value="Standard 802.1Y"/>

</reference></references>
</references>
<!--This document was prepared using Pandoc2rfc https://github.com/miekg/pandoc2rfc -->
Expand Down
12 changes: 8 additions & 4 deletions tests/valid/draft-v3-features.text
Original file line number Diff line number Diff line change
Expand Up @@ -1382,19 +1382,23 @@ Table of Contents

[STD78] Schoenwaelder, J., "Simple Network Management Protocol
(SNMP) Context EngineID Discovery", STD 78, RFC 5343,
September 2008.
DOI 10.17487/RFC5343, September 2008,
<https://www.rfc-editor.org/info/rfc5343>.

Harrington, D. and J. Schoenwaelder, "Transport Subsystem
for the Simple Network Management Protocol (SNMP)",
STD 78, RFC 5590, June 2009.
STD 78, RFC 5590, DOI 10.17487/RFC5590, June 2009,
<https://www.rfc-editor.org/info/rfc5590>.

Harrington, D. and W. Hardaker, "Transport Security Model
for the Simple Network Management Protocol (SNMP)",
STD 78, RFC 5591, June 2009.
STD 78, RFC 5591, DOI 10.17487/RFC5591, June 2009,
<https://www.rfc-editor.org/info/rfc5591>.

Hardaker, W., "Transport Layer Security (TLS) Transport
Model for the Simple Network Management Protocol (SNMP)",
STD 78, RFC 6353, July 2011.
STD 78, RFC 6353, DOI 10.17487/RFC6353, July 2011,
<https://www.rfc-editor.org/info/rfc6353>.

<https://www.rfc-editor.org/info/std78>

Expand Down
10 changes: 5 additions & 5 deletions tests/valid/draft-v3-features.v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
This document tests features introduced in xml2rfc v3 vocabulary.
" name="description">
<meta content="xml2rfc 3.18.2" name="generator">
<meta content="xml2rfc 3.19.1" name="generator">
<meta content="draft-v3-features" name="ietf.draft">
<link href="tests/input/draft-v3-features.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down Expand Up @@ -4992,13 +4992,13 @@ <h2 id="name-some-references">
<dt id="STD78">[STD78]</dt>
<dd>
<div class="refInstance" id="RFC5343">
<span class="refAuthor">Schoenwaelder, J.</span>, <span class="refTitle">"Simple Network Management Protocol (SNMP) Context EngineID Discovery"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5343</span>, <time datetime="2008-09" class="refDate">September 2008</time>. </div>
<span class="refAuthor">Schoenwaelder, J.</span>, <span class="refTitle">"Simple Network Management Protocol (SNMP) Context EngineID Discovery"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5343</span>, <span class="seriesInfo">DOI 10.17487/RFC5343</span>, <time datetime="2008-09" class="refDate">September 2008</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5343">https://www.rfc-editor.org/info/rfc5343</a>&gt;</span>. </div>
<div class="refInstance" id="RFC5590">
<span class="refAuthor">Harrington, D.</span> and <span class="refAuthor">J. Schoenwaelder</span>, <span class="refTitle">"Transport Subsystem for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5590</span>, <time datetime="2009-06" class="refDate">June 2009</time>. </div>
<span class="refAuthor">Harrington, D.</span> and <span class="refAuthor">J. Schoenwaelder</span>, <span class="refTitle">"Transport Subsystem for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5590</span>, <span class="seriesInfo">DOI 10.17487/RFC5590</span>, <time datetime="2009-06" class="refDate">June 2009</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5590">https://www.rfc-editor.org/info/rfc5590</a>&gt;</span>. </div>
<div class="refInstance" id="RFC5591">
<span class="refAuthor">Harrington, D.</span> and <span class="refAuthor">W. Hardaker</span>, <span class="refTitle">"Transport Security Model for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5591</span>, <time datetime="2009-06" class="refDate">June 2009</time>. </div>
<span class="refAuthor">Harrington, D.</span> and <span class="refAuthor">W. Hardaker</span>, <span class="refTitle">"Transport Security Model for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 5591</span>, <span class="seriesInfo">DOI 10.17487/RFC5591</span>, <time datetime="2009-06" class="refDate">June 2009</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5591">https://www.rfc-editor.org/info/rfc5591</a>&gt;</span>. </div>
<div class="refInstance" id="RFC6353">
<span class="refAuthor">Hardaker, W.</span>, <span class="refTitle">"Transport Layer Security (TLS) Transport Model for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 6353</span>, <time datetime="2011-07" class="refDate">July 2011</time>. </div>
<span class="refAuthor">Hardaker, W.</span>, <span class="refTitle">"Transport Layer Security (TLS) Transport Model for the Simple Network Management Protocol (SNMP)"</span>, <span class="seriesInfo">STD 78</span>, <span class="seriesInfo">RFC 6353</span>, <span class="seriesInfo">DOI 10.17487/RFC6353</span>, <time datetime="2011-07" class="refDate">July 2011</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc6353">https://www.rfc-editor.org/info/rfc6353</a>&gt;</span>. </div>
<span>&lt;<a href="https://www.rfc-editor.org/info/std78">https://www.rfc-editor.org/info/std78</a>&gt;</span>
</dd>
<dd class="break"></dd>
Expand Down
12 changes: 6 additions & 6 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 January 16, 2024
Internet-Draft January 26, 2024
Intended status: Experimental
Expires: July 19, 2024
Expires: July 29, 2024


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 July 19, 2024.
This Internet-Draft will expire on July 29, 2024.

Copyright Notice

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



Person Expires July 19, 2024 [Page 1]
Person Expires July 29, 2024 [Page 1]

Internet-Draft xml2rfc index tests January 2024

Expand Down Expand Up @@ -109,7 +109,7 @@ Index



Person Expires July 19, 2024 [Page 2]
Person Expires July 29, 2024 [Page 2]

Internet-Draft xml2rfc index tests January 2024

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



Person Expires July 19, 2024 [Page 3]
Person Expires July 29, 2024 [Page 3]
6 changes: 3 additions & 3 deletions tests/valid/indexes.prepped.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" sortRefs="true" category="exp" submissionType="independent" ipr="trust200902" docName="indexes-00" indexInclude="true" prepTime="2024-01-16T00:03:26" scripts="Common,Latin" symRefs="true" tocDepth="3" tocInclude="true">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" sortRefs="true" category="exp" submissionType="independent" ipr="trust200902" docName="indexes-00" indexInclude="true" prepTime="2024-01-26T01:00:08" scripts="Common,Latin" symRefs="true" tocDepth="3" tocInclude="true">
<!-- xml2rfc v2v3 conversion 3.19.1 -->


Expand All @@ -20,7 +20,7 @@
</postal>
</address>
</author>
<date day="16" month="01" year="2024"/>
<date day="26" month="01" year="2024"/>
<boilerplate>
<section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
<name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
Expand All @@ -41,7 +41,7 @@
material or to cite them other than as "work in progress."
</t>
<t indent="0" pn="section-boilerplate.1-4">
This Internet-Draft will expire on 19 July 2024.
This Internet-Draft will expire on 29 July 2024.
</t>
</section>
<section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
Expand Down
6 changes: 3 additions & 3 deletions tests/valid/indexes.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 January 16, 2024
Internet-Draft January 26, 2024
Intended status: Experimental
Expires: July 19, 2024
Expires: July 29, 2024


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 July 19, 2024.
This Internet-Draft will expire on July 29, 2024.

Copyright Notice

Expand Down
8 changes: 4 additions & 4 deletions tests/valid/indexes.v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</tr></thead>
<tfoot><tr>
<td class="left">Person</td>
<td class="center">Expires July 19, 2024</td>
<td class="center">Expires July 29, 2024</td>
<td class="right">[Page]</td>
</tr></tfoot>
</table>
Expand All @@ -36,12 +36,12 @@
<dd class="internet-draft">indexes-00</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2024-01-16" class="published">January 16, 2024</time>
<time datetime="2024-01-26" class="published">January 26, 2024</time>
</dd>
<dt class="label-intended-status">Intended Status:</dt>
<dd class="intended-status">Experimental</dd>
<dt class="label-expires">Expires:</dt>
<dd class="expires"><time datetime="2024-07-19">July 19, 2024</time></dd>
<dd class="expires"><time datetime="2024-07-29">July 29, 2024</time></dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
<div class="author">
Expand Down Expand Up @@ -71,7 +71,7 @@ <h2 id="name-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."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
<p id="section-boilerplate.1-4">
This Internet-Draft will expire on July 19, 2024.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
This Internet-Draft will expire on July 29, 2024.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
</section>
</div>
<div id="copyright">
Expand Down
9 changes: 6 additions & 3 deletions tests/valid/manpage.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
xml2rfc(1) xml2rfc(1)
16 January 2024
26 January 2024


Xml2rfc Vocabulary Version 3 Schema
Expand Down Expand Up @@ -2643,10 +2643,13 @@ Table of Contents
4. References

[BCP14] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.

Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, May 2017.
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.

<https://www.rfc-editor.org/bcp/bcp14.txt>

Expand Down
Loading

0 comments on commit 8f14554

Please sign in to comment.