Subject: [xml2rfc] #175: Problems with references: not sorted, not linked properly

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 17:31:46 -0000

#175: Problems with references: not sorted, not linked properly

 Neither online nor python version sorts my references, or properly links
 the non-RFC ones.  The correct link ''is'' present in the txt version,
 which confirms that the necessary information is in the markup, which,
 schematically, looks like this, for example:
 {{{
  <reference target="http://www.w3.org/TR/REC-xml">
    <title>Extensible...</title>
    ...
    <seriesInfo name="World Wide Web Consortium Recommendation"
                          value="REC-xml">
  </reference>
 }}}

 The output looks like this:
 {{{
   <td>...
      "<a>Extensible Markup Language (XML) 1.0
       (Fifth Edition)</a>", World Wide Web
        Consortium Recommendation REC-xml, November 2008.</td>
 }}}
 This is a regression, in that using old.html online works correctly.

-- 
-----------------------------+----------------------------------
 Reporter:  [email-masked]  |      Owner:  [email-masked]
     Type:  defect           |     Status:  new
 Priority:  major            |  Milestone:
Component:  Version 2 cli    |    Version:  2.3.10
 Keywords:                   |
-----------------------------+----------------------------------

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 17:36:33 -0000

Changes (by [email-masked]):

 * version:  2.3.10 => 2.4.x

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 18:05:57 -0000

Comment (by [email-masked]):

 Here's a patch that fixes the sorting pblm:
 {{{
 *** writers/html.py~    2013-05-27 15:57:54.000000000 +0100
 --- writers/html.py     2013-05-27 19:00:48.368504700 +0100
 ***************
 *** 455,460 ****
 --- 455,462 ----

       def write_reference_list(self, list):
           tbody = E.TBODY()
 +         refkeys=[]
 +         refdict={}
           for i, reference in enumerate(list.findall('reference')):
               tr = E.TR()
               # Use anchor or num depending on PI
 ***************
 *** 526,536 ****
                   title_a.tail += month + year + '.'
               tr.append(bullet_td)
               tr.append(ref_td)
 !             tbody.append(tr)
 !             # Render annotation as a separate paragraph
               annotation = reference.find('annotation')
               if annotation is not None and annotation.text:
                   ref_td.append(E.P(annotation.text))

           # Add to body buffer
           self.buf.append(self._serialize(E.TABLE(tbody)))
 --- 528,543 ----
                   title_a.tail += month + year + '.'
               tr.append(bullet_td)
               tr.append(ref_td)
 !             refdict[bullet] = tr
 !             refkeys.append(bullet)
               annotation = reference.find('annotation')
               if annotation is not None and annotation.text:
                   ref_td.append(E.P(annotation.text))
 +         if self.pis['sortrefs'] == 'yes':
 +             refkeys = sorted(refkeys)
 +         for key in refkeys:
 +             tbody.append(refdict[key])
 +             # Render annotation as a separate paragraph

           # Add to body buffer
           self.buf.append(self._serialize(E.TABLE(tbody)))
 }}}

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 19:51:46 -0000

Changes (by [email-masked]):

 * priority:  major => medium
 * status:  new => assigned
 * component:  Version 2 cli => Version 2 cli html

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

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/175#comment:3>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 20:26:51 -0000

Comment (by [email-masked]):

 From [892]:

 Updated tests, see issue #175

Ticket URL: </ticket/175#comment:4>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 27 May 2013 20:29:15 -0000

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

Comment:

 Fixed in [893]:

 Applied a patch from [email-masked] to sort references (when PI
 sortrefs==yes), and added code to insert a link target if the reference
 has a 'target' attribute.  Fixes issue #175.

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

Ticket URL: </ticket/175#comment:5>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>