ietf-tools / rfc2html

Convert text-format RFCs and Internet-Drafts to html
BSD 3-Clause "New" or "Revised" License
30 stars 23 forks source link

Datatracker doesn't generate correct hyperlinks to or id's for sections or tables. #41

Open peterjeremy opened 3 weeks ago

peterjeremy commented 3 weeks ago

Describe the issue

RFCs typically include tables and figures, with the table of contents including a "List of Figures" and "List of Tables" (see e.g. https://datatracker.ietf.org/doc/html/rfc2131#page-2). These lists have hyperlinks associated with the figure or table number, but those hyperlinks are defined as #section-N, rather than something like #figure-N, and hence link to a section, rather than the expected figure or table.

Looking at the actual HTML, there are no id attributes or HTML elements associated with figures or tables, so it's not actually possible to directly link to them.

Ideally, Datatracker would generate HTML elements with id attributes for figure and table headings to allow linking to them.

Code of Conduct

cabo commented 3 weeks ago

I think there are two observations here:

(1) xml2rfc is unable to generate Lists of Figures or Lists of Tables. This is a limitation that often reduces the usability of non-trivial documents. It would need to be reported as an enhancement request to xml2rfc.

(2) the htmlizer that we needed to use to get links into the HTML generated for pre-XML RFCs (pre-RFC8650) does not recognize Lists of Figures or Lists of Tables and therefore creates less useful links, which may be considered a bug. This probably is related to (1), as lists of tables/figures, not being supported by our common tools, are now uncommon in RFCs, which would make this a low-priority bug to fix.