Closed d3e3e3 closed 1 year ago
This is an xml2rfc
text generation error.
Completed preptool run
Traceback (most recent call last):
File "/Users/kesara/lab/ietf-at/venv/bin/xml2rfc", line 8, in <module>
sys.exit(main())
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/run.py", line 730, in main
writer.write(filename)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 344, in write
text = self.process()
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 302, in process
lines = self.render(self.root, width=72, joiners=joiners)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 368, in render
res = func(e, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 3053, in render_rfc
lines = self.ljoin(lines, c, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 557, in ljoin
res = mklines(self.render(e, width, **kwargs), e)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 368, in render
res = func(e, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 2231, in render_middle
lines = self.ljoin(lines, c, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 557, in ljoin
res = mklines(self.render(e, width, **kwargs), e)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 368, in render
res = func(e, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 3324, in render_section
lines = self.ljoin(lines, c, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 557, in ljoin
res = mklines(self.render(e, width, **kwargs), e)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 368, in render
res = func(e, width, **kwargs)
File "/Users/kesara/lab/ietf-at/venv/lib/python3.8/site-packages/xml2rfc/writers/text.py", line 1514, in render_dl
and (width - len(' ') - len(text)) < len(c.text.split(None, 1)[0]))
IndexError: list index out of range
The reason for the error is <dd> </dd>
. xml2rfc
text generator is not happy that.
Hi Kesara,
On Sun, Aug 20, 2023 at 10:21 PM Kesara Rathnayake @.***> wrote:
The reason for the error is
. xml2rfc text generator is not happy that. I am not surprised. I changed the draft to eliminate that and the problem went away. Still, it seems like a bug as I don't see anything inherently wrong with the problematic XML.
kramdown-rfc uses <dd><t/></dd>
to insert the empty definitions required by the, er, suboptimal grammar.
Describe the issue
So, I have this xml v3 source file that seem to produce good HTML and PDF using the xml2rfc "IETF Author Tools" web interface. But if I ask for text output, I get the error "xml2rfc error: list index out of range". See attached: Sexp03-02.xml.zip
Code of Conduct