Subject: [Cellar] expressing both svg graphics and ascii-art fallback within an rfc2xml version 3 file?

From: Dave Rice <[email-masked]>
Date: Sat, 31 Aug 2019 20:13:16 -0400

Hello cellar,

The draft of FFV1 now uses xml2rfc version 3 as defined at https://tools.ietf.org/html/rfc7991 <https://tools.ietf.org/html/rfc7991>. Presently in the markdown source of the FFV1 draft, the math is maintained in both LaTeX expressions (which are converted to SVG for inclusion in the RFC XML) as well as an Ascii Art representation (heavily reliant on functions defined within the draft). For example:

vs

r_{i} = floor( ( R_{i} * S_{i,C_{i}} ) / 2^8 )

Whether in SVG or ascii art, this data is contained by the <artwork> node in rfc2xml version 3. In https://tools.ietf.org/html/rfc7991#section-2.5 <https://tools.ietf.org/html/rfc7991#section-2.5> it states,

   Alternatively, the "src" attribute allows referencing an external
   graphics file, such as a vector drawing in SVG or a bitmap graphic
   file, using a URI.  In this case, the textual content acts as a
   fallback for output representations that do not support graphics;
   thus, it ought to contain either (1) a "line art" variant of the
   graphics or (2) prose that describes the included image in sufficient
   detail.

A bit later it says that SVG data may be encoded and stored within the <artwork>’s @src attribute such as 

   o  As a data: URI, such as: <artwork type="svg" src="data:image/
      svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3…">

So from this I was hoping we could work on one draft rfc2xml version 3 file that could use the SVG image data or use the ascii art as a fallback; however when I try to craft the <artwork> node with both such as:

<artwork type="svg" src="data:image/svg+xml,ENCODED_SVG_MATH_IMAGE_HERE”>FALLBACK_ASCII_ART_HERE</artwork>

then the output “v3-plaintext” output of the conversion tool at https://xml2rfc.tools.ietf.org/experimental.html <https://xml2rfc.tools.ietf.org/experimental.html>, does not use the textual content of the <artwork> node as a fallback but instead places a warning such as

   (Artwork only available as svg: No external link available, see
   draft-ietf-cellar-ffv1-08.html for artwork.)

Is it feasible (recommended?) to have one rfc2xml XML document that could be a source for both plaintext formats (using an ascii art fallback) and non-plaintext formats such as HTML and PDF which would use the embedded SVG data?

Kind Regards,
Dave Rice