[rfc-i] sourcecode preparation

Paul Hoffman paul.hoffman at vpnc.org
Sat Feb 13 12:58:18 PST 2016


On 12 Feb 2016, at 12:48, Joe Hildebrand (jhildebr) wrote:

> 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?

This seems good, modulo PaulK's note that you need to check that a 
created "name" attribute value doesn't conflict with one already in the 
document.

--Paul Hoffman


More information about the rfc-interest mailing list