[rfc-i] sourcecode preparation

jhildebr at cisco.com (Joe Hildebrand (jhildebr)) Fri, 12 February 2016 20:48 UTC

From: jhildebr at cisco.com (Joe Hildebrand (jhildebr))
Date: Fri, 12 Feb 2016 20:48:13 +0000
Subject: [rfc-i] sourcecode preparation
Message-ID: <3E1AA856-580C-4F8D-84B1-30D2856C7EBF@cisco.com>

Say my input XML3RFCv3 doc has this:

<sourcecode src="foo/bar.py"/>

Is it reasonable that the preptool might output this?

<sourcecode name="bar.py" type="python">

code here
</sourcecode>

If so, we would need to following two preptool rules:

- If a <sourcecode> element contains a src attribute, but not a name attribute, copy the basename of the src attribute into the name attribute
- If a <sourcecode> element contains a src attribute, but not a type attribute, and the preptool can tell what the type attribute should be from the filename in the src attribute, the tool MAY insert the correct type attribute.

Thoughts?

-- 
Joe Hildebrand