ietf-tools / idnits

Library / CLI to inspect Internet-Draft documents for a variety of conditions to conform with IETF policies.
BSD 3-Clause "New" or "Revised" License
11 stars 16 forks source link

Processing instructions get treated like elements in idnitsv3 #33

Open paulehoffman opened 5 months ago

paulehoffman commented 5 months ago

The current version of kramdown-rfc adds procoessing instructions similar to the following to the XML output:

<?line 57?>

idnits currently flags these with INVALID_ABSTRACT_SECTION_CHILD and INVALID_INTRODUCTION_SECTION_CHILD.

rjsparks commented 5 months ago

To help clarify:

Are you looking at idnits3 or idnits2? (You must be looking at idnits3 if it's inspecting the xml)?

idnits3 expects v3, not the hybrid v2/v3 that kramdown-rfc currently produces. kramdown-rfc would need to be run through --v2v3 before it would make sense to feed it to idnits3.

paulehoffman commented 5 months ago

v3, definitely. (Sorry for not being specific; I'm looking at v3 now.)

I will change to using --v2v3, but think the report might still stand: processing instructions are generic to all XML, not just what is produced by kramdown.

paulehoffman commented 5 months ago

Post-processing with xml2rfc --v2v3 still produces XML with the same processing instructions.

rjsparks commented 5 months ago

Perhaps we warn that PIs are present but otherwise ignore them?

paulehoffman commented 5 months ago

That is OK, or not even "warn" that they are present because they will be harmless to xlm2rfc. (That's assuming that xml2rfc ignores them when creating publication versions.)