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

Carsten Bormann <> Sat, 30 May 2020 06:42 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DF0453A1483; Fri, 29 May 2020 23:42:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.897
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id srvu5e3DGiWO; Fri, 29 May 2020 23:42:19 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 21CAD3A1481; Fri, 29 May 2020 23:42:19 -0700 (PDT)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (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.\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Sat, 30 May 2020 08:42:16 +0200
Cc: Henrik Levkowetz <>,,,
X-Mao-Original-Outgoing-Id: 612513736.276876-a855b7e3f7abe0dff0fd4c3676353ece
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <>
To: Brian E Carpenter <>
X-Mailer: Apple Mail (2.3608.
Archived-At: <>
Subject: Re: [Rfc-markdown] [xml2rfc] SVG broken (Re: [xml2rfc-dev] New xml2rfc release: v2.45.0)
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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 <> 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 <> 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
> _______________________________________________
> Rfc-markdown mailing list