Subject: [xml2rfc] #213: support for suppress-title is missing

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 26 Nov 2013 15:26:55 -0000

#213: support for suppress-title is missing

 Apparently, support for figure/@suppress-title is missing.

 When generating HTML, the attribute is ignored.

 When generating plain text, the transformation stops with:

 Using
 XML_LIBRARY=/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml2:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml4:/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml5
 Parsing file INPUT
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629.dtd
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629-xhtml.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629-other.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629.dtd
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629-xhtml.ent
 Resolving entity... /usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/templates/rfc2629-other.ent

 Traceback (most recent call last):
   File "/usr/local/bin/xml2rfc", line 225, in <module>
     main()
   File "/usr/local/bin/xml2rfc", line 210, in main
     pagedwriter.write(filename)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 1111, in
 write
     self._build_index()
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 945, in
 _build_index
     self.write_section_rec(middle, None)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 818, in
 write_section_rec
     level=level + 1, appendix=appendix)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 818, in
 write_section_rec
     level=level + 1, appendix=appendix)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 818, in
 write_section_rec
     level=level + 1, appendix=appendix)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 798, in
 write_section_rec
     self.write_figure(element)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/paginated_txt.py", line
 56, in write_figure
     BaseRfcWriter.write_figure(self, *args, **kwargs)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/base.py", line 690, in
 write_figure
     source_line=figure.sourceline)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/paginated_txt.py", line
 70, in write_raw
     RawTextRfcWriter.write_raw(self, *args, **kwargs)
   File "/usr/local/lib/python2.7/dist-
 packages/xml2rfc-2.4.3-py2.7.egg/xml2rfc/writers/raw_txt.py", line 486, in
 write_raw
     min([len(line) - len(line.lstrip()) for line in lines])
 ValueError: min() arg is an empty sequence

-- 
-----------------------------------+----------------------------------
 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/213>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "Jim Schaad" <[email-masked]>
Date: Sat, 30 Nov 2013 16:19:27 -0800

Because the behavior of this attribute is not what I expected it to be, I
wanted to see if this is the same behavior that should be kept going
forward.  

If the table or figure is numbered, then the string 'Figure ##: ' is
prefixed to the title unless suppress-title is set to true.  This is true
even if the title string supplied is an empty or zero length string.

The title is then emitted if the resulting title string is not empty.

Thus this just suppresses the title decoration and not the title itself.

Jim

> -----Original Message-----
> From: xml2rfc [mailto:[email-masked]] On Behalf Of xml2rfc issue
> tracker
> Sent: Tuesday, November 26, 2013 7:27 AM
> To: [email-masked]; [email-masked]
> Cc: [email-masked]
> Subject: [xml2rfc] #213: support for suppress-title is missing
> 
> XML_LIBRARY=/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml
> :/home/www/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml2:/home/www
>
/tools.ietf.org/tools/xml2rfc/web/public/rfc/bibxml3:/home/www/tools.ietf.or
g
/tools/xml2rfc/web/public/rfc/bibxml4:/home/www/tools.ietf.org/tools/xml2rf
> c/web/public/rfc/bibxml5
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629.dtd
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629-xhtml.ent
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629-other.ent
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629.dtd
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629-xhtml.ent
packages/xml2rfc-2.4.3-
> py2.7.egg/xml2rfc/templates/rfc2629-other.ent
> 
56,
> in write_figure
70,
> in write_raw
> _______________________________________________
> xml2rfc mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/xml2rfc