xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

Are PI's documented?

Open CxRes opened this issue 1 year ago • 15 comments

Are the list of PI's used by xml2rfc documented? Alternatively, is it possible to get a list by looking at the code.

CxRes avatar Sep 25 '23 14:09 CxRes

xml2rfc v2 used PIs but v3 does not. They've been replaced by attributes of the <rfc> element

jrlevine avatar Sep 25 '23 16:09 jrlevine

This is not the whole story.

E.g., <?v3xml2rfc silence=

It would be good to get an actual list of PIs that have an influence on xml2rfc.

cabo avatar Sep 25 '23 16:09 cabo

Looked at the code, there's "silence" and "table_borders" which do the same thing as the corresponding command line switches. I really wish they hadn't done that since it's yet more stuff that will bite us when people try to render documents a decade from now.

jrlevine avatar Sep 25 '23 17:09 jrlevine

Almost complete list of PIs: https://github.com/ietf-tools/xml2rfc/blob/c10a50c427f8b4002d51f020e506dd2c317e615a/xml2rfc/parser.py#L707-L755 But these might get ignored with v3 xml2rfc.

kesara avatar Sep 25 '23 19:09 kesara

@kesara Thanks for the list!

Can you please identify, if possible, which are used in v3.

CxRes avatar Sep 25 '23 19:09 CxRes

I think none of them, they're from v2. We tried hard to get rid of the PIs and put the ones that mattered into the grammar, so I am dismayed that new ones are leaking back in.

jrlevine avatar Sep 25 '23 21:09 jrlevine

This list is the "attribute"-style names for <?rfc PIs. As I mentioned, there are other PIs. Also, there is no replacement in the v3.rnc for PIs such as "private" or "topblock" (because they don't apply to RFC generation), so these PIs need to stay active.

cabo avatar Sep 27 '23 10:09 cabo

I don't understand. Are you still generating v2 XML?

jrlevine avatar Sep 27 '23 13:09 jrlevine

Yes, kramdown-rfc generates a "hybrid" v2 that pushes the limits of what the v2v3 converter will accept with some v3-like things in it. Its output declares itself to be v2 and it is designed to take advantage of v2v3.

rjsparks avatar Sep 27 '23 13:09 rjsparks