Subject: [xml2rfc] #352 (Version 2 cli): xml2rfc --v3 *really* wants files

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 06 Aug 2018 06:21:25 -0000

#352: xml2rfc --v3 *really* wants files

 Not sure how hard it is to fix (seems XML lib is responsible for this),
 but xml2rfc --v3 can work with shell redirection so it always needs
 temporary files:

 {{{
 % xml2rfc --v3 --text x
 ~/g/src/github.com/mmarkdown/mmark master +
 Parsing file x
 x(0): Warning: Invalid document before running preptool: Did not expect
 element t there, line 61
 x(3): Warning: The document date (2018-04-01) is more than 3 days away
 from today's date
 x(0): Warning: Invalid document after running preptool: Did not expect
 element t there, line 61
 x(2): Warning: Expected a category, one of historic,info,exp,std,bcp, but
 found none
 x(43): Warning: No renderer for <bcp14> found
 Created file x.txt
 % xml2rfc --v3 --text <(./mmark rfc/rfc3514.md)
 ~/g/src/github.com/mmarkdown/mmark master +
 Parsing file /proc/self/fd/11
 WARNING: Parsing Error: no element found (line 0)
 Traceback (most recent call last):
   File "/usr/bin/xml2rfc", line 11, in <module>
     load_entry_point('xml2rfc==2.10.0', 'console_scripts', 'xml2rfc')()
   File "/usr/lib/python3/dist-packages/xml2rfc/run.py", line 374, in main
     xmlrfc = parser.parse(remove_comments=False, quiet=True)
   File "/usr/lib/python3/dist-packages/xml2rfc/parser.py", line 528, in
 parse
     tree = lxml.etree.parse(file, parser)
   File "src/lxml/lxml.etree.pyx", line 3427, in lxml.etree.parse
 (src/lxml/lxml.etree.c:81110)
   File "src/lxml/parser.pxi", line 1828, in lxml.etree._parseDocument
 (src/lxml/lxml.etree.c:118065)
   File "src/lxml/parser.pxi", line 1848, in
 lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118334)
   File "src/lxml/parser.pxi", line 1736, in lxml.etree._parseDoc
 (src/lxml/lxml.etree.c:117014)
   File "src/lxml/parser.pxi", line 1102, in
 lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:111258)
   File "src/lxml/parser.pxi", line 595, in
 lxml.etree._ParserContext._handleParseResultDoc
 (src/lxml/lxml.etree.c:105102)
   File "src/lxml/parser.pxi", line 706, in lxml.etree._handleParseResult
 (src/lxml/lxml.etree.c:106810)
   File "src/lxml/parser.pxi", line 646, in lxml.etree._raiseParseError
 (src/lxml/lxml.etree.c:105956)
   File "<string>", line 0
 lxml.etree.XMLSyntaxError
 }}}

-- 
---------------------------+----------------------------------
 Reporter:  [email-masked]   |      Owner:  [email-masked]
     Type:  defect         |     Status:  new
 Priority:  medium         |  Milestone:
Component:  Version 2 cli  |    Version:  2.4.x
 Keywords:                 |
---------------------------+----------------------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/352>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>