xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

id="identifiers" in HTML

Open cabo opened this issue 2 years ago • 7 comments

Describe the issue

I now see id="identifiers", which clashes with document IDs:

https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base/issues/291

(I first mentioned this in https://github.com/ietf-tools/xml2rfc/issues/875#issuecomment-1302606581 -- that issue is otherwise unrelated.)

Code of Conduct

cabo avatar Nov 03 '22 20:11 cabo

id="identifiers" is used to identify the document header section. https://www.rfc-editor.org/js/metadata.min.js uses this id and there are CSS rules specific to this id. I don't see a good solution to this issue other than a xml2rfc warning because,

  • Changing the header id will require regenerating all v3 HTML RFCs.
  • New id="identifiers" is defined by authors in the XML file, so xml2rfc cannot change that.

kesara avatar Nov 07 '22 15:11 kesara

I'm not sure I follow.

This bug only affects documents where the author has used an anchor "identifiers". So there should not be an issue with existing RFCs. For new documents (I-D or RFC), this "system" id should be chosen so that it doesn't conflict with "user" ids in the XML. 4NtsVrQEvSIvP6PsBImQocc8 would work for me. Maybe there is a better one. Since existing documents use id="identifiers" in a specific context, even a shared CSS file shouldn't have a problem.

cabo avatar Nov 07 '22 16:11 cabo

(And I'm trying to find the place where specific anchor prefixes are reserved....)

cabo avatar Nov 07 '22 16:11 cabo

(And I'm trying to find the place where specific anchor prefixes are reserved....)

https://datatracker.ietf.org/doc/html/rfc7992#section-6.5

kesara avatar Nov 07 '22 16:11 kesara

Thanks -- that uses the identifiers (incorrectly, I would claim), but does not capture the implication that they need to be reserved (if XML anchors are used unchanged as HTML identifiers, that is).

I was looking for a different place that reserved section-x, table-x, etc....

cabo avatar Nov 07 '22 16:11 cabo

I'm not sure I follow.

This bug only affects documents where the author has used an anchor "identifiers". So there should not be an issue with existing RFCs. For new documents (I-D or RFC), this "system" id should be chosen so that it doesn't conflict with "user" ids in the XML. 4NtsVrQEvSIvP6PsBImQocc8 would work for me. Maybe there is a better one. Since existing documents use id="identifiers" in a specific context, even a shared CSS file shouldn't have a problem.

The issue with existing RFCs is they have the following JavaScript:

<script src="https://www.rfc-editor.org/js/metadata.min.js"></script>

metadata.min.js has logic based on identifiers id. So I think any changes to this will require regenerating RFCs.

kesara avatar Nov 07 '22 16:11 kesara

The JS could look whether there is a 4NtsVrQEvSIvP6PsBImQocc8, and only if that is not there, use identifiers.

cabo avatar Nov 07 '22 16:11 cabo