Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to <xref> indicating if the reference is normative #1149

Open
1 task done
kwatsen opened this issue Jul 30, 2024 · 6 comments
Open
1 task done

Add a flag to <xref> indicating if the reference is normative #1149

kwatsen opened this issue Jul 30, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@kwatsen
Copy link

kwatsen commented Jul 30, 2024

Description

It is sometimes difficult for authors to track if a reference is normative of not. This is especially true after a reference is used multiple times.

For instance, the first time a reference added, it may be Informative but, later, a Normative reference is made to the same reference. The second use will not cause a missing-reference error, since it is already present, but it continues to be in the "Informative" section, though it should be moved to the "Normative" section.

It would be nice if, on a per <xref> basis, a flag could be set to indicate that the reference is Normative, and then for xml2rfc to autogenerate the Normative/Informative sections, or at least validate that they are accurate.

The rule would be: a reference is Normative if there is at least one Normative use, and Informative otherwise.

Code of Conduct

@kwatsen kwatsen added the enhancement New feature or request label Jul 30, 2024
@cabo
Copy link
Contributor

cabo commented Jul 30, 2024

Note that this is already fully implemented in kramdown-rfc.

@kwatsen
Copy link
Author

kwatsen commented Jul 30, 2024

Indeed. It's such a good idea, but all my doc sources are in XML...

@rjsparks
Copy link
Member

rjsparks commented Aug 1, 2024

and changes to the xml (at least for RFCs) is owned by RSWG now - not something we can easily just start changing in xml2rfc.

Also Carsten - please remind me (or other people who stumble across this) what the kramdown-rfc implementation of this looks like? I don't think I've seen the nature of the reference indicated each time the reference is used before?

@cabo
Copy link
Contributor

cabo commented Aug 2, 2024

Robert, you can list the references in the YAML header (and make the normative/informative distinction there). That's what most people do, when it makes sense to think about references globally for the document.

You also can do a reference that is completely inline, as in {{!RFC8949}} or {{?RFC9423}} -- this is sorted into the data that is in the YAML header, with ! indicating normative and ? indicating informative. This makes sense if the reference is of local interest only and you can make the determination there.

@rjsparks
Copy link
Member

rjsparks commented Aug 2, 2024

So the first version (in the YAML) is structurally the same as putting the references in the informal or normative reference section in the xml. It's not what Kent is asking for.

It the second - the completely inline version that has the property he's looking for, but - does kramdown-rfc error or warn or anything if someone has both {{!RFC8949}} and {{?RFC8949}} inline in different places, add the document to both reference sections, or follow some "highest value seen wins" algorithm like what Kent proposes?

@cabo
Copy link
Contributor

cabo commented Aug 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants