[rfc-i] [xml2rfc] use of sourcecode type

Carsten Bormann cabo at tzi.org
Tue Jul 21 08:10:18 PDT 2020

A similar problem is giving examples that are intentionally bad in order to demonstrate a kind of error.

I typically tag them with a type that is derived from the one I would give for real code, e.g., “CDDLx” for a bad CDDL example.  I think it would be good to agree on some way to indicate this.

A related problem is that often several code blocks combine to one valid instance of CDDL, for example see Figure 1, 2, 3 in RFC 8428.  There is no way to say that Figure 1 and 2 combine into a valid instance, and so do Figure 1 and 3, but not any other combination.

And, by the way, those type tags are conventionally lower-cased, but this is not made very explicit; you have to infer that from the list in Section 2.48.4 of RFC 7991 or the RFC editor’s updated copy of that list:


(Ha, this doesn’t even have “cddl” in it; I’m not sure how this is updated and whether there shouldn’t really be an IANA registry for these.)

Grüße, Carsten

> On 2020-07-21, at 16:36, Paul Kyzivat <pkyzivat at alum.mit.edu> wrote:
> I have a question about specification of type in sourcecode elements:
> In RFC4566bis there are many examples that have fragments of SDP. But they aren't compliant to SDP syntax, since it requires that many things be present - that are intentionally omitted from these examples.
> Is it valid to tag these with type="SDP"?
> (In sip we had a similar problem. There is a mime-type message/sip, but we sometimes also return fragments of sip in error messages. We ended up defining a separate message/sipfrag mime-type for this.)
> 	Thanks,
> 	Paul
> _______________________________________________
> xml2rfc mailing list
> xml2rfc at ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc

More information about the rfc-interest mailing list