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

Michael Richardson <mcr+ietf@sandelman.ca> Sun, 01 September 2019 16:28 UTC

Return-Path: <mcr@sandelman.ca>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6A9E112007A; Sun, 1 Sep 2019 09:28:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3wFzja3H_cFz; Sun, 1 Sep 2019 09:28:38 -0700 (PDT)
Received: from relay.sandelman.ca (relay.cooperix.net [176.58.120.209]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 621AB120033; Sun, 1 Sep 2019 09:28:37 -0700 (PDT)
Received: from dooku.sandelman.ca (unknown [142.169.78.110]) by relay.sandelman.ca (Postfix) with ESMTPS id 11AF91F45A; Sun, 1 Sep 2019 16:28:35 +0000 (UTC)
Received: by dooku.sandelman.ca (Postfix, from userid 179) id 9372A3880; Sun, 1 Sep 2019 12:29:05 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: Dave Rice <dave@dericed.com>, tools-discuss@ietf.org
cc: Codec Encoding for LossLess Archiving and Realtime transmission <cellar@ietf.org>
In-reply-to: <3AAAEED4-87A9-4F5B-9910-55BABBDBBB15@dericed.com>
References: <3AAAEED4-87A9-4F5B-9910-55BABBDBBB15@dericed.com>
Comments: In-reply-to Dave Rice <dave@dericed.com> message dated "Sat, 31 Aug 2019 20:13:16 -0400."
X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Date: Sun, 01 Sep 2019 12:29:05 -0400
Message-ID: <16851.1567355345@dooku.sandelman.ca>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/bPz8mAfyBnN10sHsEow99Ez9V1o>
Subject: Re: [Cellar] expressing both svg graphics and ascii-art fallback within an rfc2xml version 3 file?
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Codec Encoding for LossLess Archiving and Realtime transmission <cellar.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cellar>, <mailto:cellar-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cellar/>
List-Post: <mailto:cellar@ietf.org>
List-Help: <mailto:cellar-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cellar>, <mailto:cellar-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Sep 2019 16:28:40 -0000

{reposting to tools-discuss}

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


-- 
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-