Subject: [xml2rfc] #405 (Version 2 cli): use of <artset> leads to error and stack trace

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 14 May 2019 15:19:40 -0000

#405: use of <artset> leads to error and stack trace

 with 2.22.3, running "xml2rfc -v3 filename":

 Parsing file artset-test.xml
 artset-test.xml(1): Warning: The 'docName' attribute of the <rfc/> element
 should have a revision number as the last component: docName="draft-foo-
 bar-02".
 Traceback (most recent call last):
   File "/bin/xml2rfc", line 10, in <module>
     sys.exit(main())
   File "/usr/lib/python2.7/site-packages/xml2rfc/run.py", line 549, in
 main
     writer.write(filename)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 228, in write
     lines = self.render(self.root, width=72, joiners=joiners)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 271, in render
     res = func(e, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 2834, in render_rfc
     lines = self.ljoin(lines, c, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 446, in ljoin
     res = mklines(self.render(e, width, **kwargs), e)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 271, in render
     res = func(e, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 2024, in render_middle
     lines = self.ljoin(lines, c, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 446, in ljoin
     res = mklines(self.render(e, width, **kwargs), e)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 271, in render
     res = func(e, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 3102, in render_section
     lines = self.ljoin(lines, c, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 446, in ljoin
     res = mklines(self.render(e, width, **kwargs), e)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 271, in render
     res = func(e, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 3102, in render_section
     lines = self.ljoin(lines, c, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 446, in ljoin
     res = mklines(self.render(e, width, **kwargs), e)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 271, in render
     res = func(e, width, **kwargs)
   File "/usr/lib/python2.7/site-packages/xml2rfc/writers/text.py", line
 675, in render_artset
     a = e[0]
   File "src/lxml/etree.pyx", line 1165, in lxml.etree._Element.__getitem__
 IndexError: list index out of range

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 14 May 2019 15:20:47 -0000

Description changed by [email-masked]:

Old description:

> artset-test.xml(1): Warning: The 'docName' attribute of the <rfc/>
> element should have a revision number as the last component: docName
> ="draft-foo-bar-02".

New description:

 {{{

 }}}

--

-- 
------------------------------------+----------------------------------
Resolution:                         |   Keywords:
------------------------------------+----------------------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/405#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 14 May 2019 17:51:47 -0000

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => fixed

Comment:

 Fixed in [3115]:

 Changed the schema to require at least one instance of <artwork> within
 <artset>.  Fixes issue #405.

-- 
------------------------------------+----------------------------------
  Reporter:  [email-masked]  |      Owner:  [email-masked]
      Type:  defect                 |     Status:  closed
  Priority:  medium                 |  Milestone:
 Component:  Version 2 cli          |    Version:  2.22.*
Resolution:  fixed                  |   Keywords:
------------------------------------+----------------------------------

Ticket URL: </ticket/405#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>