Subject: [xml2rfc] #243 (Version 2 cli): problem in HTML rendering of minimal references

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 27 Mar 2014 13:04:07 -0000

#243: problem in HTML rendering of minimal references

 The xml2rfc FAQ at http://xml.resource.org/xml2rfcFAQ.html recommends
 (section 3.7) a construct like this for minimal references to external
 HTML documents:

 {{{
 <reference anchor="SDO-3GPP" target="http://www.3gpp.org/">
   <front>
     <title>3GPP Home Page</title>
     <author/>
     <date/>
   </front>
 </reference>
 }}}

 This doesn't work, however, in xmlrfc 2.4.5. If the above quoted reference
 is the ''first'' one in the references element, you get this trace:

 {{{
  File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", line
 1108, in _build_document
     self.write_reference_list(reference_list)
   File "/Library/Python/2.7/site-packages/xml2rfc/writers/html.py", line
 552, in write_reference_list
     a.tail = ', '
 UnboundLocalError: local variable 'a' referenced before assignment
 }}}

 If you move the problematic reference down in the list, you don't get the
 exception (because a local variable "a" will have been set by one of the
 previous references) but the item is not rendered correctly.

 Workround in both cases is to include either a surname or an organization
 name in the currently empty author element. The HTML rendering is still
 sub-par (there's a spurious comma in the output) but at least it doesn't
 crash.

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

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