ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
65 stars 38 forks source link

Are PI's documented? #1035

Open CxRes opened 11 months ago

CxRes commented 11 months ago

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

jrlevine commented 11 months ago

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

cabo commented 11 months ago

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.

jrlevine commented 11 months ago

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.

kesara commented 11 months ago

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.

CxRes commented 11 months ago

@kesara Thanks for the list!

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

jrlevine commented 11 months ago

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.

cabo commented 11 months ago

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.

jrlevine commented 11 months ago

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

rjsparks commented 11 months ago

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.