Re: [Rfc-markdown] [xml2rfc] SVG broken (Re: [xml2rfc-dev] New xml2rfc release: v2.45.0)

Carsten Bormann <cabo@tzi.org> Sat, 30 May 2020 06:42 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: rfc-markdown@ietfa.amsl.com
Delivered-To: rfc-markdown@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF0453A1483; Fri, 29 May 2020 23:42:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 srvu5e3DGiWO; Fri, 29 May 2020 23:42:19 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 21CAD3A1481; Fri, 29 May 2020 23:42:19 -0700 (PDT)
Received: from [172.16.42.112] (p5089ae91.dip0.t-ipconnect.de [80.137.174.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 49YsLJ503nzyv7; Sat, 30 May 2020 08:42:16 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <1a5cfced-2718-0a4a-41ef-b366543ec5a2@gmail.com>
Date: Sat, 30 May 2020 08:42:16 +0200
Cc: Henrik Levkowetz <henrik@levkowetz.com>, rfc-markdown@ietf.org, xml2rfc@ietf.org, xml2rfc-dev@ietf.org
X-Mao-Original-Outgoing-Id: 612513736.276876-a855b7e3f7abe0dff0fd4c3676353ece
Content-Transfer-Encoding: quoted-printable
Message-Id: <3E78C586-228A-457E-BADD-D66117FFD1C0@tzi.org>
References: <E1jduEw-0007if-7I@durif.tools.ietf.org> <93E5295E-CE96-4121-B3F5-C04540D542FD@tzi.org> <D6806E5D-2B6E-4464-9126-44F3F5C808F7@tzi.org> <1a5cfced-2718-0a4a-41ef-b366543ec5a2@gmail.com>
To: Brian E Carpenter <brian.e.carpenter@gmail.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/ko34M31MsoxQLe8A2DPfo1BDSwg>
Subject: Re: [Rfc-markdown] [xml2rfc] SVG broken (Re: [xml2rfc-dev] New xml2rfc release: v2.45.0)
X-BeenThere: rfc-markdown@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "rfc-markdown is a discussion list for people writing I-Ds and RFCs in Markdown and the authors of the tools used for that." <rfc-markdown.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-markdown/>
List-Post: <mailto:rfc-markdown@ietf.org>
List-Help: <mailto:rfc-markdown-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 30 May 2020 06:42:23 -0000

Hi Brian,

> On 2020-05-30, at 01:24, Brian E Carpenter <brian.e.carpenter@gmail.com> wrote:
> 
> Do you know what bit of SVG it is barfing on?

I had some error messages in my first message.  Let me expand on these:
AFAICS this is all about attributes that xml2rfc does not accept on specific SVG elements.

Consolidating these messages a bit, I get:

y.xml(722): Error: Invalid attribute shape-rendering for element svg, […]
y.xml(776): Error: Invalid attribute stroke for element path, […]
y.xml(818): Error: Invalid attribute stroke for element text, […]
(And then, apparently as a result of these:
y.xml(14): Error: Invalid document before running preptool.
.)

Well, this is not the whole story, as stroke needs to be a valid attribute for path; this seems to be about the value stroke="#000000” for path (which probably needs to be replaced by stroke=“black”) and stroke="none” for text (which probably is default anyway).
This was for ditaa.  With mscgen, I additionally get:

ymscgen.xml(87): Error: Invalid attribute text-rendering for element svg, […]

> I'm curious because I've done some personal patching of svgcheck and discovered what a minefield this all is. Indeed, some drawing tools produce stuff that others don't, so there is a strong element of crapshoot.

Yes, those words describe it pretty well.

Of course, I could easily integrate my own additions of svgcheck-like processing into kramdown-rfc.
Unfortunately, adding serious XML processing adds some deployment considerations (one would normally use a gem that causes some installation difficulties on older platforms as it requires compiling native code).

Grüße, Carsten


> 
> Regards
>   Brian
> 
> On 30-May-20 09:29, Carsten Bormann wrote:
>> On 2020-05-29, at 21:56, Carsten Bormann <cabo@tzi.org> wrote:
>>> 
>>> I no longer get SVG through this version that has been “repaired” by svgcheck -qra; the SVG processing now seems very picky.  (I haven’t updated since 2.39, so this might have happened earlier.)
>> 
>> Well, OK, this is now SVG generated by ditaa instead of goat, and ditaa seems to want to show of its knowledge of SVG some more.  So that may not be a change in xml2rfc at all.  My question is mostly still valid, though:
>> 
>>> Is svgcheck still intended to be the tool to be used with xml2rfc to make SVG palatable to it?  Is that being updated along with xml2rfc ...?
>> 
>> Grüße, Carsten
>> 
>> _______________________________________________
>> xml2rfc mailing list
>> xml2rfc@ietf.org
>> https://www.ietf.org/mailman/listinfo/xml2rfc
>> 
> 
> _______________________________________________
> Rfc-markdown mailing list
> Rfc-markdown@ietf.org
> https://www.ietf.org/mailman/listinfo/rfc-markdown