xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

BCP14 markup not allowed in CREF

Open cabo opened this issue 2 years ago • 9 comments

Describe the issue

Error: Did not expect element bcp14 there, at /rfc/middle/section[4]/section[2]/t[2]/cref/bcp14

This is obviously a bug in the RFCXML grammar. However, cref elements are removed before publication. RFC 7991 does not consider document submission, so it should not be considered authoritative here.

(The BCP14 marking of cref content happens automatically, so any argument that the author could leave it out is not relevant.)

Code of Conduct

cabo avatar Sep 05 '22 15:09 cabo

This should be addressed in the long-awaited general cleanup of what can be contained in what.

rjsparks avatar Sep 06 '22 15:09 rjsparks

And this should probably be a issue on some grammar document, not on xml2rfc, until a new grammar is blessed. @jrlevine - what's the best place for this?

rjsparks avatar Sep 06 '22 15:09 rjsparks

My argument here is that this can indeed be fixed entirely locally in xml2rfc. The grammar document to be updated is right inside xml2rfc...

cabo avatar Sep 06 '22 16:09 cabo

I'm planning to add a section to the as-implemented doc that describes changes that have been proposed but not made (yet). I'm at a conference in Europe this week, will try and catch up next week.

jrlevine avatar Sep 06 '22 19:09 jrlevine

@cabo we have made way too many ad-hoc changes to the grammar and I am not interested in making any more until we have a process beyond "some person wants this for one draft" I'm not going to add dangling paragraphs to sections either.

jrlevine avatar Sep 06 '22 19:09 jrlevine

With RSWG, RPAT etc. seated, can we now start working on bugs like this?

cabo avatar Oct 07 '23 16:10 cabo

Since it's the issue of when and how to change the XML grammar, I wouldn't hold my breath.

For this particular bug, since cref sections can't be normative, how about adjusting your translator not to put bcp14 tags in cref sections?

jrlevine avatar Oct 07 '23 18:10 jrlevine

Since it's the issue of when and how to change the XML grammar, I wouldn't hold my breath.

As I said, it's not. The publication grammar does not change when this bug is fixed, as it doesn't include cref. The authoring grammar does, but that is outside the scope of the big grammar change that everyone is afraid of.

For this particular bug, since cref sections can't be normative, how about adjusting your translator not to put bcp14 tags in cref sections?

cref sections are comments, and they can contain text like "Section 3.2 says this MUST NOT be done, and here we explain how to do it anyway".

Of course, I can litter my code with workarounds for the RFCXML grammar bugs, but so far the point was that xml2rfc handles those. (In this particular case, fixing the bug would have a non-trivial effect on the converter run time for everyone, so this is not a cheap fix.)

cabo avatar Oct 08 '23 06:10 cabo

xml2rfc only has one grammar. Maybe it would be a good idea to have separate grammars for I-Ds and RFCs, but that's not how it works now. As I think I've said before, I'm not opposed to grammar changes but I am definitely opposed to doing ad hoc one at a time since that's how we got the messy grammar we have now.

jrlevine avatar Oct 08 '23 17:10 jrlevine