Skip to content

Commit

Permalink
fix: Display ASCII names for authors in references (#771)
Browse files Browse the repository at this point in the history
Display ASCII names for authors in references with non-Latin characters in
their names.
  • Loading branch information
kesara authored May 9, 2022
1 parent 6b32a5d commit 384399c
Show file tree
Hide file tree
Showing 11 changed files with 165 additions and 116 deletions.
14 changes: 14 additions & 0 deletions tests/input/elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,20 @@ for opt, value in opts:
</front>
</reference>

<reference anchor="AUTHORS">
<front>
<title>Lots of authors</title>
<author fullname="&#928;&#965;&#952;&#945;&#947;&#972;&#961;&#945;&#962; &#8001; &#931;&#940;&#956;&#953;&#959;&#962;" asciiFullname="Pythagoras of Samos"><organization/></author>
<author fullname="John Doe"><organization/></author>
<author fullname="Armin Bergström"><organization>Example Org.</organization></author>
<author fullname="Jane Doe"><organization/></author>
<date year="2015" month="may"/>
<abstract><t>This is a fun document.</t></abstract>
</front>
<seriesInfo name='RFC' value='7539'/>
<seriesInfo name='DOI' value='10.17487/RFC7539'/>
</reference>

</references>

</references>
Expand Down
15 changes: 8 additions & 7 deletions tests/valid/draft-v3-features.text
Original file line number Diff line number Diff line change
Expand Up @@ -1392,13 +1392,14 @@ Table of Contents

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

[STPETER] ᏚᎢᎵᎬᎢᎬᏒ Inc., "ᏚᎢᎵᎬᎢᎬᏒ's document". A document where the
author element specifies just an organization, and both
title and organization name have an ASCII equivalent.

[SVG11] Ferraiolo, J., 藤沢, 淳, and D. Jackson, "Scalable Vector
Graphics (SVG) 1.1 Specification", W3C Recommendation REC-
SVG11-20030114, January 14, 2003,
[STPETER] ᏚᎢᎵᎬᎢᎬᏒ Inc. (STPETER Inc.), "ᏚᎢᎵᎬᎢᎬᏒ's document". A
document where the author element specifies just an
organization, and both title and organization name have an
ASCII equivalent.

[SVG11] Ferraiolo, J., 藤沢, 淳 (Fujisawa, J.), and D. Jackson,
"Scalable Vector Graphics (SVG) 1.1 Specification", W3C
Recommendation REC-SVG11-20030114, January 14, 2003,
<http://www.w3.org/TR/2003/REC-SVG11-20030114/>. Latest
version available at http://www.w3.org/TR/SVG11/.

Expand Down
54 changes: 27 additions & 27 deletions tests/valid/elements.bom.text
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,8 @@ MIME-SPEC References

Other References

[DATE-RANGE]
Moe, J., "Document with date range", 2002-2003.





Expand All @@ -1402,6 +1402,14 @@ Author, et al. Expires 13 January 2019 [Page 25]
Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


[AUTHORS] Πυθαγόρας ὁ Σάμιος (Samos, P. O.), Doe, J., Bergström, A.,
and J. Doe, "Lots of authors", RFC 7539,
DOI 10.17487/RFC7539, May 2015,
<https://www.rfc-editor.org/rfc/rfc7539>.

[DATE-RANGE]
Moe, J., "Document with date range", 2002-2003.

[FUZZY-DATE]
Mae, J., "Document with fuzzy date", Second quarter 2010.

Expand All @@ -1410,7 +1418,7 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
[NO-DATE] Mae, N., "Document — with no date", Advances in Cryptology
- AACC Edition pp. 235-265.

[REPUBLIC] Πλάτων, "Πολιτεία", 375 BC.
[REPUBLIC] Πλάτων (Plato), "Πολιτεία", 375 BC.

[RFC0952] Harrenstien, K., Stahl, M., and E. Feinler, "DoD Internet
host table specification", RFC 952, DOI 10.17487/RFC0952,
Expand Down Expand Up @@ -1441,6 +1449,15 @@ A.1. Contributors

Additional contact information:





Author, et al. Expires 13 January 2019 [Page 26]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


רוני אבן
וואווי
דוד המלך 14
Expand All @@ -1451,13 +1468,6 @@ A.1. Contributors
Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).



Author, et al. Expires 13 January 2019 [Page 26]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


A.2. Arbitrary^superscript in section _title_

Arbitrary text
Expand Down Expand Up @@ -1497,6 +1507,13 @@ Authors' Addresses

Additional contact information:



Author, et al. Expires 13 January 2019 [Page 27]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


田中花子 様
日本
〒112-0001
Expand All @@ -1505,15 +1522,6 @@ Authors' Addresses
3階B号室






Author, et al. Expires 13 January 2019 [Page 27]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


No Org
Tokyo
112-0001
Expand Down Expand Up @@ -1548,14 +1556,6 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018














Expand Down
54 changes: 27 additions & 27 deletions tests/valid/elements.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,8 @@ MIME-SPEC References

Other References

[DATE-RANGE]
Moe, J., "Document with date range", 2002-2003.





Expand All @@ -1402,6 +1402,14 @@ Author, et al. Expires January 13, 2019 [Page 25]
Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


[AUTHORS] Πυθαγόρας ὁ Σάμιος (Samos, P. O.), Doe, J., Bergström, A.,
and J. Doe, "Lots of authors", RFC 7539,
DOI 10.17487/RFC7539, May 2015,
<https://www.rfc-editor.org/rfc/rfc7539>.

[DATE-RANGE]
Moe, J., "Document with date range", 2002-2003.

[FUZZY-DATE]
Mae, J., "Document with fuzzy date", Second quarter 2010.

Expand All @@ -1410,7 +1418,7 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
[NO-DATE] Mae, N., "Document — with no date", Advances in Cryptology
- AACC Edition pp. 235-265.

[REPUBLIC] Πλάτων, "Πολιτεία", 375 BC.
[REPUBLIC] Πλάτων (Plato), "Πολιτεία", 375 BC.

[RFC0952] Harrenstien, K., Stahl, M., and E. Feinler, "DoD Internet
host table specification", RFC 952, DOI 10.17487/RFC0952,
Expand Down Expand Up @@ -1441,6 +1449,15 @@ A.1. Contributors

Additional contact information:





Author, et al. Expires January 13, 2019 [Page 26]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


רוני אבן
וואווי
דוד המלך 14
Expand All @@ -1451,13 +1468,6 @@ A.1. Contributors
Reviews and helpful comments have also been received from ანა
კიკაბიძე (Ana Kikabidze).



Author, et al. Expires January 13, 2019 [Page 26]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


A.2. Arbitrary^superscript in section _title_

Arbitrary text
Expand Down Expand Up @@ -1497,6 +1507,13 @@ Authors' Addresses

Additional contact information:



Author, et al. Expires January 13, 2019 [Page 27]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


田中花子 様
日本
〒112-0001
Expand All @@ -1505,15 +1522,6 @@ Authors' Addresses
3階B号室






Author, et al. Expires January 13, 2019 [Page 27]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


No Org
Tokyo
112-0001
Expand Down Expand Up @@ -1548,14 +1556,6 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018














Expand Down
25 changes: 24 additions & 1 deletion tests/valid/elements.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" category="info" docName="elements-00" indexInclude="false" ipr="trust200902" obsoletes="1234,5678,9012,3456,7890" prepTime="2022-04-12T02:25:45" scripts="Cherokee,Common,Greek,Han,Hebrew,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="info" docName="elements-00" indexInclude="false" ipr="trust200902" obsoletes="1234,5678,9012,3456,7890" prepTime="2022-05-09T06:41:10" scripts="Cherokee,Common,Greek,Han,Hebrew,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">



Expand Down Expand Up @@ -1704,6 +1704,29 @@ for opt, value in opts:
</references>
<references pn="section-18.2.4">
<name slugifiedName="name-other-references">Other References</name>
<reference anchor="AUTHORS" quoteTitle="true" target="https://www.rfc-editor.org/rfc/rfc7539" derivedAnchor="AUTHORS">
<front>
<title>Lots of authors</title>
<author fullname="Πυθαγόρας ὁ Σάμιος" asciiFullname="Pythagoras of Samos">
<organization showOnFrontPage="true"/>
</author>
<author fullname="John Doe">
<organization showOnFrontPage="true"/>
</author>
<author fullname="Armin Bergström">
<organization showOnFrontPage="true">Example Org.</organization>
</author>
<author fullname="Jane Doe">
<organization showOnFrontPage="true"/>
</author>
<date year="2015" month="may"/>
<abstract>
<t indent="0">This is a fun document.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7539"/>
<seriesInfo name="DOI" value="10.17487/RFC7539"/>
</reference>
<reference anchor="DATE-RANGE" quoteTitle="true" derivedAnchor="DATE-RANGE">
<front>
<title>Document with date range</title>
Expand Down
7 changes: 6 additions & 1 deletion tests/valid/elements.text
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,11 @@ MIME-SPEC References

Other References

[AUTHORS] Πυθαγόρας ὁ Σάμιος (Samos, P. O.), Doe, J., Bergström, A.,
and J. Doe, "Lots of authors", RFC 7539,
DOI 10.17487/RFC7539, May 2015,
<https://www.rfc-editor.org/rfc/rfc7539>.

[DATE-RANGE]
Moe, J., "Document with date range", 2002-2003.

Expand All @@ -1152,7 +1157,7 @@ Other References
[NO-DATE] Mae, N., "Document — with no date", Advances in Cryptology
- AACC Edition pp. 235-265.

[REPUBLIC] Πλάτων, "Πολιτεία", 375 BC.
[REPUBLIC] Πλάτων (Plato), "Πολιτεία", 375 BC.

[RFC0952] Harrenstien, K., Stahl, M., and E. Feinler, "DoD Internet
host table specification", RFC 952, DOI 10.17487/RFC0952,
Expand Down
6 changes: 5 additions & 1 deletion tests/valid/elements.v3.py36.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<meta content="
This is the abstract.
" name="description">
<meta content="xml2rfc 3.12.4" name="generator">
<meta content="xml2rfc 3.12.5" name="generator">
<meta content="elements-00" name="ietf.draft">
<link href="tests/input/elements.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down Expand Up @@ -1733,6 +1733,10 @@ <h4 id="name-other-references">
<a href="#name-other-references" class="section-name selfRef">Other References</a>
</h4>
<dl class="references">
<dt id="AUTHORS">[AUTHORS]</dt>
<dd>
<span class="refAuthor"><span class="non-ascii">Πυθαγόρας ὁ Σάμιος</span> (<span class="ascii">Samos, P. O.</span>)</span>, <span class="refAuthor">Doe, J.</span>, <span class="refAuthor">Bergström, A.</span>, and <span class="refAuthor">J. Doe</span>, <span class="refTitle">"Lots of authors"</span>, <span class="seriesInfo">RFC 7539</span>, <span class="seriesInfo">DOI 10.17487/RFC7539</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span>&lt;<a href="https://www.rfc-editor.org/rfc/rfc7539">https://www.rfc-editor.org/rfc/rfc7539</a>&gt;</span>. </dd>
<dd class="break"></dd>
<dt id="DATE-RANGE">[DATE-RANGE]</dt>
<dd>
<span class="refAuthor">Moe, J.</span>, <span class="refTitle">"Document with date range"</span>, <span>2002-2003</span>. </dd>
Expand Down
6 changes: 5 additions & 1 deletion tests/valid/elements.v3.py37.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<meta content="
This is the abstract.
" name="description">
<meta content="xml2rfc 3.12.4" name="generator">
<meta content="xml2rfc 3.12.5" name="generator">
<meta content="elements-00" name="ietf.draft">
<link href="tests/input/elements.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down Expand Up @@ -1733,6 +1733,10 @@ <h4 id="name-other-references">
<a href="#name-other-references" class="section-name selfRef">Other References</a>
</h4>
<dl class="references">
<dt id="AUTHORS">[AUTHORS]</dt>
<dd>
<span class="refAuthor"><span class="non-ascii">Πυθαγόρας ὁ Σάμιος</span> (<span class="ascii">Samos, P. O.</span>)</span>, <span class="refAuthor">Doe, J.</span>, <span class="refAuthor">Bergström, A.</span>, and <span class="refAuthor">J. Doe</span>, <span class="refTitle">"Lots of authors"</span>, <span class="seriesInfo">RFC 7539</span>, <span class="seriesInfo">DOI 10.17487/RFC7539</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span>&lt;<a href="https://www.rfc-editor.org/rfc/rfc7539">https://www.rfc-editor.org/rfc/rfc7539</a>&gt;</span>. </dd>
<dd class="break"></dd>
<dt id="DATE-RANGE">[DATE-RANGE]</dt>
<dd>
<span class="refAuthor">Moe, J.</span>, <span class="refTitle">"Document with date range"</span>, <span>2002-2003</span>. </dd>
Expand Down
6 changes: 5 additions & 1 deletion tests/valid/elements.v3.py38.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<meta content="
This is the abstract.
" name="description">
<meta content="xml2rfc 3.12.4" name="generator">
<meta content="xml2rfc 3.12.5" name="generator">
<meta content="elements-00" name="ietf.draft">
<link href="tests/input/elements.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand Down Expand Up @@ -1733,6 +1733,10 @@ <h4 id="name-other-references">
<a href="#name-other-references" class="section-name selfRef">Other References</a>
</h4>
<dl class="references">
<dt id="AUTHORS">[AUTHORS]</dt>
<dd>
<span class="refAuthor"><span class="non-ascii">Πυθαγόρας ὁ Σάμιος</span> (<span class="ascii">Samos, P. O.</span>)</span>, <span class="refAuthor">Doe, J.</span>, <span class="refAuthor">Bergström, A.</span>, and <span class="refAuthor">J. Doe</span>, <span class="refTitle">"Lots of authors"</span>, <span class="seriesInfo">RFC 7539</span>, <span class="seriesInfo">DOI 10.17487/RFC7539</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span>&lt;<a href="https://www.rfc-editor.org/rfc/rfc7539">https://www.rfc-editor.org/rfc/rfc7539</a>&gt;</span>. </dd>
<dd class="break"></dd>
<dt id="DATE-RANGE">[DATE-RANGE]</dt>
<dd>
<span class="refAuthor">Moe, J.</span>, <span class="refTitle">"Document with date range"</span>, <span>2002-2003</span>. </dd>
Expand Down
Loading

0 comments on commit 384399c

Please sign in to comment.