Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of depercated tag "list" cause xml2rfc to crash. #1127

Open
1 task done
loghyr opened this issue Jun 13, 2024 · 3 comments
Open
1 task done

Use of depercated tag "list" cause xml2rfc to crash. #1127

loghyr opened this issue Jun 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@loghyr
Copy link

loghyr commented Jun 13, 2024

Describe the issue

To reproduce:

git clone [email protected]:loghyr/flexfilesv2.git
cd flexfilesv2
make

Submit resulting file draft-haynes-nfsv4-flexfiles-v2-00.xml to https://author-tools.ietf.org/idnits

Or submit the following: (might have to rename to .xml)
draft-haynes-nfsv4-flexfiles-v2-00.txt

Code of Conduct

@loghyr loghyr added the bug Something isn't working label Jun 13, 2024
@kesara
Copy link
Member

kesara commented Jun 14, 2024

@loghyr, This is a xml2rfc bug.
The way https://author-tools.ietf.org/idnits works is, it creates a text file from the XML you submit.
Because idints v2 only works with text files.
You can use experimental idnits v3 to test XML files without converting to text under the hood.

The error you get is from xml2rfc:

root@4d23dc73e717:~/xml2rfc# xml2rfc draft-haynes-nfsv4-flexfiles-v2-00.xml
Warning: /root/xml2rfc/rfc2629-xhtml.ent is no longer needed as the special processing of non-ASCII characters has been superseded by direct support for non-ASCII characters in RFCXML.
Warning: /root/xml2rfc/rfc2629-xhtml.ent is no longer needed as the special processing of non-ASCII characters has been superseded by direct support for non-ASCII characters in RFCXML.
Warning: /root/xml2rfc/rfc2629-xhtml.ent is no longer needed as the special processing of non-ASCII characters has been superseded by direct support for non-ASCII characters in RFCXML.
Warning: /root/xml2rfc/rfc2629-xhtml.ent is no longer needed as the special processing of non-ASCII characters has been superseded by direct support for non-ASCII characters in RFCXML.
/root/xml2rfc/draft-haynes-nfsv4-flexfiles-v2-00.xml(18): Warning: Setting consensus="true" for IETF STD document (this is not the schema default, but is the only value permitted for this type of document)
/root/xml2rfc/draft-haynes-nfsv4-flexfiles-v2-00.xml(2599): Warning: Unused reference: There seems to be no reference to [RFC8435] in the document
/root/xml2rfc/draft-haynes-nfsv4-flexfiles-v2-00.xml(336): Warning: Was asked to render a deprecated element: <list>
    c: '<Element list at 0xffff9876cfe0>'
Traceback (most recent call last):
  File "/usr/local/bin/xml2rfc", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/run.py", line 730, in main
    writer.write(filename)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 344, in write
    text = self.process()
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 302, in process
    lines = self.render(self.root, width=72, joiners=joiners)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 368, in render
    res = func(e, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 3064, in render_rfc
    lines = self.ljoin(lines, c, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 557, in ljoin
    res = mklines(self.render(e, width, **kwargs), e)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 368, in render
    res = func(e, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 2242, in render_middle
    lines = self.ljoin(lines, c, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 557, in ljoin
    res = mklines(self.render(e, width, **kwargs), e)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 368, in render
    res = func(e, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 3335, in render_section
    lines = self.ljoin(lines, c, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 557, in ljoin
    res = mklines(self.render(e, width, **kwargs), e)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 368, in render
    res = func(e, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 3767, in render_t
    text = self.inner_text_renderer(e)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 631, in inner_text_renderer
    text += self.render(c, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 368, in render
    res = func(e, width, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/xml2rfc/writers/text.py", line 613, in default_renderer
    ctext = "\n\n".join(ctext)
TypeError: sequence item 0: expected str instance, Line found

Since this is a xml2rfc bug I'll move it there.

@kesara
Copy link
Member

kesara commented Jun 14, 2024

The error is caused by the <list> tag.
It's deprecated in xml2rfc v3 vocabulary.
You can use <ul> (unordered list) 1 or <ol> (ordered list) 2 instead.

Footnotes

  1. https://authors.ietf.org/en/rfcxml-vocabulary#ul

  2. https://authors.ietf.org/en/rfcxml-vocabulary#ol

@kesara kesara transferred this issue from ietf-tools/author-tools Jun 14, 2024
@kesara kesara changed the title {"error":"sequence item 0: expected str instance, Line found"} Use of depercated tag "list" cause xml2rfc to crash. Jun 14, 2024
@cabo
Copy link
Contributor

cabo commented Jun 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants