ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
64 stars 35 forks source link

Review alternate link to XML source in HTML output #1068

Open kesara opened 6 months ago

kesara commented 6 months ago

Describe the issue

At the moment, xml2rfc adds a link to source XML. Examples:

<link href="rfc9552.xml" rel="alternate" type="application/rfc+xml">
<link href="/a/www/www6s/staging/draft-ietf-6man-rfc6724-update-06.xml" rel="alternate" type="application/rfc+xml">

The href is from the path given at the execution time, xml2rfc doesn't treat RFC and I-Ds differently in this case.

RFC 7992 states that the href attribute should be pointing to the prepared XML source that was used to generate this document. Provided example is <link rel="alternate" type="application/rfc+xml" href="source.xml">. ^1

Suggestion from @rjsparks: The href attribute should emit the basename in all cases.

Code of Conduct

kesara commented 6 months ago

Alternatively, a link to the source should be provided explicitly to xml2rfc at the runtime as a command line argument because the source link can be different.

rjsparks commented 6 months ago

cc: @paulehoffman, @reschke

reschke commented 6 months ago

I don't think it matters a lot, but it definitvely should make sense for documents that aren't RFCs yet (or be omitted).

paulehoffman commented 6 months ago

I'm with Robert: just the basename, as is shown in 7992.

reschke commented 6 months ago

Well, the basename will be resolved against the context URI, otherwise it wouldn't make sense (sorry if I'm stating the obvious here).