diff --git a/tests/input/draft-template.xml b/tests/input/draft-template.xml index 3704b4cc..4c9ef08a 100644 --- a/tests/input/draft-template.xml +++ b/tests/input/draft-template.xml @@ -553,6 +553,8 @@ main(int argc, char *argv[]) + +
diff --git a/tests/valid/draft-template.exp.xml b/tests/valid/draft-template.exp.xml index 7a2fa0e5..de2bdd0a 100644 --- a/tests/valid/draft-template.exp.xml +++ b/tests/valid/draft-template.exp.xml @@ -580,6 +580,30 @@ main(int argc, char *argv[]) + + + The 'XML2RFC' version 2 Vocabulary + + + + This document defines the 'XML2RFC' version 2 vocabulary; an XML- based language used for writing RFCs and Internet-Drafts. Version 2 represents the current state of the vocabulary (as implemented by several tools and as used by the RFC Editor) around 2014. Editorial Note (To be removed by RFC Editor) Discussion of this draft takes place on the XML2RFC mailing list (xml2rfc@ietf.org), which has its home page at <https://www.ietf.org/mailman/listinfo/xml2rfc>. + + + + + + + The "xml2rfc" Version 3 Vocabulary + + ICANN + + + + This document defines the "xml2rfc" version 3 vocabulary: an XML-based language used for writing RFCs and Internet-Drafts. It is heavily derived from the version 2 vocabulary that is also under discussion. This document obsoletes the v2 grammar described in RFC 7749. + + + +
This becomes an Appendix. diff --git a/tests/valid/draft-template.html b/tests/valid/draft-template.html index 46794c1e..bacc77e8 100644 --- a/tests/valid/draft-template.html +++ b/tests/valid/draft-template.html @@ -2021,6 +2021,14 @@

Mad Dominators, Inc., "Ultimate Plan for Taking Over the World", , <http://www.example.com/dominator.html>.
+
[I-D.iab-xml2rfc]
+
+Hoffman, P. E., "The "xml2rfc" Version 3 Vocabulary", Work in Progress, Internet-Draft, draft-iab-xml2rfc-04, , <https://datatracker.ietf.org/doc/html/draft-iab-xml2rfc-04>.
+
+
[I-D.iab-xml2rfcv2]
+
+Reschke, J., "The 'XML2RFC' version 2 Vocabulary", Work in Progress, Internet-Draft, draft-iab-xml2rfcv2-00, , <https://datatracker.ietf.org/doc/html/draft-iab-xml2rfcv2-00>.
+
[I-D.narten-iana-considerations-rfc2434bis]
Alvestrand, H. T. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, Internet-Draft, draft-narten-iana-considerations-rfc2434bis-09, , <https://datatracker.ietf.org/doc/html/draft-narten-iana-considerations-rfc2434bis-09>.
diff --git a/tests/valid/draft-template.pages.text b/tests/valid/draft-template.pages.text index d7a64452..ed78bdea 100644 --- a/tests/valid/draft-template.pages.text +++ b/tests/valid/draft-template.pages.text @@ -562,6 +562,18 @@ Davies & Zhao Expires September 2, 2009 [Page 10] Internet-Draft Abbreviated Title March 2009 + [I-D.iab-xml2rfc] + Hoffman, P. E., "The "xml2rfc" Version 3 Vocabulary", Work + in Progress, Internet-Draft, draft-iab-xml2rfc-04, June + 22, 2016, . + + [I-D.iab-xml2rfcv2] + Reschke, J., "The 'XML2RFC' version 2 Vocabulary", Work in + Progress, Internet-Draft, draft-iab-xml2rfcv2-00, January + 9, 2015, . + [I-D.narten-iana-considerations-rfc2434bis] Alvestrand, H. T. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, @@ -600,6 +612,12 @@ Authors' Addresses Email: elwynd@dial.pipex.com + +Davies & Zhao Expires September 2, 2009 [Page 11] + +Internet-Draft Abbreviated Title March 2009 + + Quintin Zhao Huawei Technology 125 Nagog Technology Park @@ -613,4 +631,42 @@ Authors' Addresses -Davies & Zhao Expires September 2, 2009 [Page 11] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Davies & Zhao Expires September 2, 2009 [Page 12] diff --git a/tests/valid/draft-template.prepped.xml b/tests/valid/draft-template.prepped.xml index 859137fc..d45b490e 100644 --- a/tests/valid/draft-template.prepped.xml +++ b/tests/valid/draft-template.prepped.xml @@ -1,6 +1,6 @@ - - + + @@ -650,6 +650,32 @@ main(int argc, char *argv[]) + + + The "xml2rfc" Version 3 Vocabulary + + ICANN + + + + This document defines the "xml2rfc" version 3 vocabulary: an XML-based language used for writing RFCs and Internet-Drafts. It is heavily derived from the version 2 vocabulary that is also under discussion. This document obsoletes the v2 grammar described in RFC 7749. + + + + Work in Progress + + + + The 'XML2RFC' version 2 Vocabulary + + + + This document defines the 'XML2RFC' version 2 vocabulary; an XML- based language used for writing RFCs and Internet-Drafts. Version 2 represents the current state of the vocabulary (as implemented by several tools and as used by the RFC Editor) around 2014. Editorial Note (To be removed by RFC Editor) Discussion of this draft takes place on the XML2RFC mailing list (xml2rfc@ietf.org), which has its home page at <https://www.ietf.org/mailman/listinfo/xml2rfc>. + + + + Work in Progress + Guidelines for Writing an IANA Considerations Section in RFCs diff --git a/tests/valid/draft-template.text b/tests/valid/draft-template.text index 122da9fb..9b990723 100644 --- a/tests/valid/draft-template.text +++ b/tests/valid/draft-template.text @@ -457,6 +457,18 @@ Table of Contents Mad Dominators, Inc., "Ultimate Plan for Taking Over the World", 1984, . + [I-D.iab-xml2rfc] + Hoffman, P. E., "The "xml2rfc" Version 3 Vocabulary", Work + in Progress, Internet-Draft, draft-iab-xml2rfc-04, June + 22, 2016, . + + [I-D.iab-xml2rfcv2] + Reschke, J., "The 'XML2RFC' version 2 Vocabulary", Work in + Progress, Internet-Draft, draft-iab-xml2rfcv2-00, January + 9, 2015, . + [I-D.narten-iana-considerations-rfc2434bis] Alvestrand, H. T. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, diff --git a/tests/valid/draft-template.txt b/tests/valid/draft-template.txt index 082ab3ac..d62db08c 100644 --- a/tests/valid/draft-template.txt +++ b/tests/valid/draft-template.txt @@ -562,6 +562,18 @@ Davies & Zhao Expires 2 September 2009 [Page 10] Internet-Draft Abbreviated Title March 2009 + [I-D.iab-xml2rfc] + Hoffman, P. E., "The "xml2rfc" Version 3 Vocabulary", Work + in Progress, Internet-Draft, draft-iab-xml2rfc-04, 22 June + 2016, . + + [I-D.iab-xml2rfcv2] + Reschke, J., "The 'XML2RFC' version 2 Vocabulary", Work in + Progress, Internet-Draft, draft-iab-xml2rfcv2-00, 9 + January 2015, . + [I-D.narten-iana-considerations-rfc2434bis] Alvestrand, H. T. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, @@ -600,6 +612,12 @@ Authors' Addresses Email: elwynd@dial.pipex.com + +Davies & Zhao Expires 2 September 2009 [Page 11] + +Internet-Draft Abbreviated Title March 2009 + + Quintin Zhao Huawei Technology 125 Nagog Technology Park @@ -613,4 +631,42 @@ Authors' Addresses -Davies & Zhao Expires 2 September 2009 [Page 11] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Davies & Zhao Expires 2 September 2009 [Page 12] diff --git a/tests/valid/draft-template.v2v3.xml b/tests/valid/draft-template.v2v3.xml index 1f27d78d..42cddf2f 100644 --- a/tests/valid/draft-template.v2v3.xml +++ b/tests/valid/draft-template.v2v3.xml @@ -30,7 +30,7 @@ - + @@ -562,6 +562,8 @@ main(int argc, char *argv[]) + +
diff --git a/tests/valid/draft-template.v3.html b/tests/valid/draft-template.v3.html index c17196bf..9fe8f98f 100644 --- a/tests/valid/draft-template.v3.html +++ b/tests/valid/draft-template.v3.html @@ -11,7 +11,7 @@ Insert an abstract: MANDATORY. This template is for creating an Internet Draft. " name="description"> - + @@ -841,9 +841,17 @@

Mad Dominators, Inc., "Ultimate Plan for Taking Over the World", , <http://www.example.com/dominator.html>.
+
[I-D.iab-xml2rfc]
+
+Hoffman, P. E., "The "xml2rfc" Version 3 Vocabulary", Work in Progress, Internet-Draft, draft-iab-xml2rfc-04, , <https://datatracker.ietf.org/doc/html/draft-iab-xml2rfc-04>.
+
+
[I-D.iab-xml2rfcv2]
+
+Reschke, J., "The 'XML2RFC' version 2 Vocabulary", Work in Progress, Internet-Draft, draft-iab-xml2rfcv2-00, , <https://datatracker.ietf.org/doc/html/draft-iab-xml2rfcv2-00>.
+
[I-D.narten-iana-considerations-rfc2434bis]
-Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, Internet-Draft, draft-narten-iana-considerations-rfc2434bis-09, , <https://www.ietf.org/archive/id/draft-narten-iana-considerations-rfc2434bis-09.txt>.
+Alvestrand, H. T. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", Work in Progress, Internet-Draft, draft-narten-iana-considerations-rfc2434bis-09, , <https://datatracker.ietf.org/doc/html/draft-narten-iana-considerations-rfc2434bis-09>.
[RFC2629]
diff --git a/xml2rfc/parser.py b/xml2rfc/parser.py index 5af2df57..6f190c78 100644 --- a/xml2rfc/parser.py +++ b/xml2rfc/parser.py @@ -227,12 +227,10 @@ def getReferenceRequest(self, request, include=False, line_no=0): result = os.path.join(self.source_dir, basename) attempts.append(result) else: - if self.options and self.options.vocabulary == 'v3': - paths = [ request ] - elif not request.endswith('.xml'): - paths = [ request, request + '.xml' ] + if not request.endswith('.xml'): + paths = [ request + '.xml', request ] else: - paths = [ request ] + paths = [ request ] if os.path.isabs(paths[0]): # Absolute path, return as-is for path in paths: