Re: [rfc-i] No, constraining to a custom SVG profile is not trivial

Phillip Hallam-Baker <phill@hallambaker.com> Thu, 23 January 2020 03:54 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: rfc-interest@rfc-editor.org
Delivered-To: rfc-interest@rfc-editor.org
Received: from localhost (localhost [127.0.0.1]) by rfc-editor.org (Postfix) with ESMTP id 9FD3FF406F4 for <rfc-interest@rfc-editor.org>; Wed, 22 Jan 2020 19:54:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at rfc-editor.org
X-Spam-Flag: NO
X-Spam-Score: -1.395
X-Spam-Level:
X-Spam-Status: No, score=-1.395 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Received: from rfc-editor.org ([127.0.0.1]) by localhost (rfcpa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id veuRhpt_dllj for <rfc-interest@rfc-editor.org>; Wed, 22 Jan 2020 19:54:54 -0800 (PST)
Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by rfc-editor.org (Postfix) with ESMTPS id 77697F406F0 for <rfc-interest@rfc-editor.org>; Wed, 22 Jan 2020 19:54:54 -0800 (PST)
Received: by mail-ot1-f52.google.com with SMTP id r9so1455973otp.13 for <rfc-interest@rfc-editor.org>; Wed, 22 Jan 2020 19:55:04 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6umdawAqFj6venk7NLeUoyHU8uBUIh6aUIWCpZvES2g=; b=UGdNYKMUBavGkpASA52ujFFkXZcGMPU1/onIvi0ccbCzOYn+4mzBqYbMLRjqyjW5LJ +z+EIs5KJL1TF4LsYGF3Nnd+v2P7whUF3sEWWDCrLcOxdWERDXWQOZD9wWfEo0Ykzgyo RyYlxYsYJdXvpDjwUmJpmleeRwyU0KJldyQVsv86KAvqjaK3jpMMy6sxXsvjlE/2gKO3 n2DyqIVeHgvSHMFTAq7G3eC1N2mfTOWA8J5gqu/TtRKWrd0TZnDBZvKOsV5QAsQa8A/K AXx4m3O0p7r7Dpr8vcaz4h4QW6YL2SygG603RMVbojqbWvCFkVm715yVI0qZpH/jfA2d tN9g==
X-Gm-Message-State: APjAAAWdVBsqXsS3XjtJWqVDDuRv/GbmfBFwjMXuR12DLA0t95i/EHUU zSRNfVpskxtA8+5DUYDrW40Mk/UUvw+qJDPVW28=
X-Google-Smtp-Source: APXvYqyFmsbquanoz8X3lgjjmKkmsBZrN4d0sQijZswp72hkAXbBmY4aICXzaoRciSDapRGlPnepVq3DpVSzFSKA+sE=
X-Received: by 2002:a9d:6758:: with SMTP id w24mr10265389otm.155.1579751703297; Wed, 22 Jan 2020 19:55:03 -0800 (PST)
MIME-Version: 1.0
References: <CAMm+LwiXhhJO7qYi41+DC4W7uMUVipXqyq75Fq2vagA1ppJNdA@mail.gmail.com> <10cca93f-a8b8-4c42-0653-3b12fa67ad12@gmail.com> <CAMm+LwgA-1UffBfrH-Y3J6pfh7ni9kNrndp=gHNyUyi5j=oLxg@mail.gmail.com> <53607da4-6608-783b-b875-65551e3add19@gmail.com> <CAMm+LwgNU2Dr3bB+A8k+UwbQiRRzgUkoRRh60tc6+bBv6CXwfQ@mail.gmail.com> <70ed6362-41ee-faf5-8f90-d094455dbdf4@gmail.com> <CAMm+Lwhy-AV_K5evzGdpDi-ynpLE4RxXCVB1HercickYfZaubg@mail.gmail.com> <27103.1579626232@localhost> <31cf835c-aad6-637f-fc12-8f3efa04e6e7@gmail.com>
In-Reply-To: <31cf835c-aad6-637f-fc12-8f3efa04e6e7@gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
Date: Wed, 22 Jan 2020 22:54:51 -0500
Message-ID: <CAMm+LwgHvz0oS84QMo6BPg0Q-giCtSZnKCrSZRW1DvSKBH_K+A@mail.gmail.com>
To: Brian E Carpenter <brian.e.carpenter@gmail.com>
Cc: RFC Interest <rfc-interest@rfc-editor.org>
Content-Type: multipart/alternative; boundary="0000000000001bd03d059cc69b15"
Subject: Re: [rfc-i] No, constraining to a custom SVG profile is not trivial
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://www.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <http://www.rfc-editor.org/pipermail/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://www.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Jan 2020 03:54:55 -0000

On Tue, Jan 21, 2020 at 10:31 PM Brian E Carpenter <
brian.e.carpenter@gmail.com> wrote:

> On 22-Jan-20 06:03, Michael Richardson wrote:
> >
> > Phillip Hallam-Baker <phill@hallambaker.com> wrote:
> >     > But the other point I will make is that 2014 is six years ago and
> the
> >     > statement made then was that these issues could be reopened at a
> later
> >     > date. I am simply holding the group to the promise made then that
> >     > these issues can be revisited.
> >
> > I would support revisiting the question of a SVG profile... in 2021.
> > Certainly by IETF110, with planning for that discussion at IETF109.
> > So... after we have a new permanent RFC-editor.
> >
> > I think that the change to v3-XML under changing leadership is difficult
> > enough as it is.
> >
> > In the meantime, in the I-D series, I think that we should tolerate a
> variety
> > of SVG inputs, and we should encourage monochrome inputs, but not require
> > them.
>
> Until idnits does detailed SVG checking, that shouldn't be an issue. But
> what's the use when RFCs are constrained to black&white?
>
> I agree that the lack of coloured shading is annoying for many people, but
> *using* shading is annoying for people with limited colour vision.
>
> I have an example that Michael will recognise (see attached). The second
> version passes svgcheck, having been run through my fix-up code. This is
> what we lose by sticking to the current spec.
>
> But the fact is that what we can do under the current spec is
> intentionally very limited. I understand Phill's annoyance but as you say,
> there is a lot of work & time involved in changing the spec.
>

There was sufficient ID-Nits checking to prevent me submitting the drafts
without making changes. Otherwise, I would have submitted them.

Given that IDs expire in six months... I think we should decouple the ID
and RFC requirements.

Looking forward, we need a different approach. Instead of defining a
profile we should specify a set of restrictions. That might not sound like
a major change but for me as an implementer it is huge.

Implementing SVG-minus means:

1) Parse the XML tree, incorporated CSS elements and resolve all links
2) Replace class and style attributes with the corresponding attributes
3) Remove all colors and fonts that are not supported.
4) Map unsupported characters to ?
5) Rename id elements to ensure uniqueness when included in the final
document.

Implementing the first three took me about eight hours to produce an
(almost) fully engineered tool to the above spec that runs on Windows, OSX
and Linux. I don't have a full CSS implementation but it is sufficient to
pares the CSS generated by all the drawing tools I have seen. It does not
currently rename the ID elements, it just deletes them all. That is ok for
SVG tiny but would not work for full SVG (as markers use XLink). It does
map Unicode characters but I still don't have an authoritative set of
permitted code points.

The parse tool I am using is capable of XML schema validation and
performing schema driven binding to strongly typed backing classes. But I
am only using the raw parse tree. So the tool will probably work without
modification on XML/2.0

This is a much simpler approach than the current spec. It is also easier to
implement, test and use. Trying to decipher a profile written in Relax-NG
using the documentation in the base spec written in XML-Schema would be
awful even if the IDNits tool and the Relax schema were consistent but they
aren't.