> Luckily ‘cabo’ is on the thread to give you a definitive answer of how this > should be done in kramdown-rfc ;-)
Thanks Rob :-) Kramdown-rfc generates XML that goes into xml2rfc. So what kramdown-rfc can do is limited to generating the best XML possible within the limits of xml2rfc and thus the RFCXML format. If kramdown-rfc doesn’t help you with generating that, you can even type in XML in verbatim into the markdown document. RFCXML does not currently have an attribute “role=” for <sourcecode. We can of course campaign for getting one, but until then xml2rfc will simply croak when it sees that. (We’d also need to agree on what that attribute means, and that will be difficult, because there are multiple processes working on the document, and a single attribute will have trouble identifying the role in all these processes, including some that haven’t been invented.) I think that matching the filename (“name=“, or “sourcecode-name=“ in kramdown-rfc (*)) for conventions will work almost as well and also immediately not cost a long wait time. Oh, and if you have a specific process in mind that kramdown-rfc-extract-sourcecode could help with, I’m all ears. Grüße, Carsten (*) These long names come from the fact that markdown only really has one thing that needs to generate both <figure and <sourcecode, so you sometimes have to say where a markdown attribute is supposed to go (“sourcecode-name=“). > > Kind regards, > Rob > > > From: Camilo Cardona <[email protected] > <mailto:[email protected]>> > Date: Tuesday, 14 October 2025 at 22:54 > To: Ladislav Lhotka <[email protected] > <mailto:[email protected]>> > Cc: Carsten Bormann <[email protected] <mailto:[email protected]>>, Kent Watsen > <[email protected] <mailto:[email protected]>>, netmod <[email protected] > <mailto:[email protected]>>, Rob Wilton (rwilton) <[email protected] > <mailto:[email protected]>> > Subject: Re: [netmod] Should example modules be allowed to use code tags [Re: > AD review of draft-ietf-netmod-intf-ext-yang-16] > > Hi, > > In the coverage draft we propose a naming convention within the text. > However, I think the proposal from Lada of a "role" makes sense... It seems > to be a more flexible approach, since it could cover other type of files that > could be useful in validating more complex pipelines. > > A naive question. A lot of people are moving away from building drafts using > xml, and inclining more for markdown. I don't have official stats though. > Sticking with XML would still allow for marking correctly everything in > markdown? Looking at https://github.com/cabo/kramdown-rfc/wiki/Syntax doesn't > provide a clear answer right away. > > Camilo > > > > On 14 Oct 2025, at 11:27, Ladislav Lhotka > <[email protected] > <mailto:[email protected]>> wrote: > > > > > 14. 10. 2025 v 18:13, Carsten Bormann <[email protected] <mailto:[email protected]>>: > > On Oct 14, 2025, at 16:45, Carsten Bormann <[email protected] > <mailto:[email protected]>> wrote: > > > type=“yang”… > > Actually, > > https://www.rfc-editor.org/rpc/wiki/doku.php?id=sourcecode-types > > has: > > • yang > • yang-instance-data+json > • yangtree > > (and you can get additional ones of needed, and media types can also be used > as source code-types.) > > This is even better, but it still doesn't discriminate instance data snippets > or sketches from complete examples that are intended to be formally > validated. Instead of introducing new sourcecode/media types for this, it > would IMO be cleaner to introduce a new attribute, e.g. "role". > > Lada > > > > Grüße, Carsten > > > > -- > Ladislav Lhotka > PGP Key ID: 0xB8F92B08A9F76C67 > > > > _______________________________________________ > netmod mailing list -- [email protected] <mailto:[email protected]> > To unsubscribe send an email to [email protected] > <mailto:[email protected]>
_______________________________________________ netmod mailing list -- [email protected] To unsubscribe send an email to [email protected]
