xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

Review alternate link to XML source in HTML output

Open kesara opened this issue 1 year ago • 5 comments

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 avatar Jan 02 '24 23:01 kesara

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.

kesara avatar Jan 02 '24 23:01 kesara

cc: @paulehoffman, @reschke

rjsparks avatar Jan 03 '24 17:01 rjsparks

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

reschke avatar Jan 03 '24 17:01 reschke

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

paulehoffman avatar Jan 03 '24 17:01 paulehoffman

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

reschke avatar Jan 03 '24 18:01 reschke