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

Brian E Carpenter <brian.e.carpenter@gmail.com> Thu, 16 January 2020 03:21 UTC

Return-Path: <rfc-interest-bounces@rfc-editor.org>
X-Original-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Delivered-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 10079120058 for <ietfarch-rfc-interest-archive@ietfa.amsl.com>; Wed, 15 Jan 2020 19:21:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.499
X-Spam-Level:
X-Spam-Status: No, score=-4.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com
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 iqS0Fa0wocWu for <ietfarch-rfc-interest-archive@ietfa.amsl.com>; Wed, 15 Jan 2020 19:21:16 -0800 (PST)
Received: from rfc-editor.org (rfc-editor.org [4.31.198.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7D49C120803 for <rfc-interest-archive-eekabaiReiB1@ietf.org>; Wed, 15 Jan 2020 19:21:16 -0800 (PST)
Received: from rfcpa.amsl.com (localhost [IPv6:::1]) by rfc-editor.org (Postfix) with ESMTP id B68D3F40729; Wed, 15 Jan 2020 19:21:12 -0800 (PST)
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 7548CF40729 for <rfc-interest@rfc-editor.org>; Wed, 15 Jan 2020 19:21:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at rfc-editor.org
Authentication-Results: rfcpa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 n4GuUBubAnYR for <rfc-interest@rfc-editor.org>; Wed, 15 Jan 2020 19:21:11 -0800 (PST)
Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by rfc-editor.org (Postfix) with ESMTPS id 8301FF40727 for <rfc-interest@rfc-editor.org>; Wed, 15 Jan 2020 19:21:11 -0800 (PST)
Received: by mail-pg1-x536.google.com with SMTP id k197so9163404pga.10 for <rfc-interest@rfc-editor.org>; Wed, 15 Jan 2020 19:21:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qUSu/+xY2IARFHhMqZv9oa3ntcp7S3yJDdLQ19prZDk=; b=WSSihMzKn5B+4CGIHHKucGbFPsm1LGs6Dh6Pk726lVQ4ED4ECd7dTYDGr9SDmXkjcS i+lA3pZPIWpC+7xz0UIF4bfIgnBY7kcpJ3351H9zKL31AtTjGAvxDsuZkC5ceP4vUt8Z oIvfMSe5lz3sKbde5HxKBjDK50L3qUuUO2ck8A4rElpPtY66ZkyaBUJyVbcTDAavQCdo Qixp0Hp8w9ZKarKR2b4+d+njaSUUFF0V2CpKwBA3JCYYcI5+PpNCm3E26u/5jxCIEJhL g4ddmuFKJDmo3LJGSUzJ5T0F2RglBJgKODts6xkG5006NH2qosWH5v1UY86kCFQhyYVV zbcQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qUSu/+xY2IARFHhMqZv9oa3ntcp7S3yJDdLQ19prZDk=; b=bUE98t87lGlTC8hTLs5ickQH35mtcj61tFkv1j+8hw9zf6Poq8zP4h/gQqoLwy4vO4 3AuoIIbdOl53bGDD2qU2X8o/1gLyqJHXksV7Mpce4ovGcRwRit9cxui2wG8VX8+bYt7l gyfKzQ6cgtWjEi1O1dkdHz1jsCWmmp6ZTnaqm79jnfZ5cRtykHzIF4V27MsJVYiAxfBH mMaqj7wvfmcj2sJCjY+fw/nsW70RINuGxGncy6D8eUl8OLiYciZuj5pi6xxxWq6euMlM tV7fk+cBBtK5yLMwYY6j0yG9qCraPLx8DokyJoM816CbX5sDuwkaZP54/+oe3LR0EJOT Bs2Q==
X-Gm-Message-State: APjAAAUttOXB0KK3NICl1GpLUQqaP2AF4jJ9TZ7f1KlMetLJeRbR5GqO UV+5MBN/+6sFoqo1zSYs4eGVTALI
X-Google-Smtp-Source: APXvYqylvCjgs5ePvdsanrWsnCwy1cAKReD69OoAn2MMzvew877xBPrYwu9rqykTwRmA+Ixv1ESvIQ==
X-Received: by 2002:a63:e545:: with SMTP id z5mr36217546pgj.209.1579144873580; Wed, 15 Jan 2020 19:21:13 -0800 (PST)
Received: from [172.17.0.82] ([111.69.8.186]) by smtp.gmail.com with ESMTPSA id a12sm21300834pga.11.2020.01.15.19.21.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 19:21:12 -0800 (PST)
To: Phillip Hallam-Baker <phill@hallambaker.com>, Doug Royer <douglasroyer@gmail.com>
References: <CAMm+LwiXhhJO7qYi41+DC4W7uMUVipXqyq75Fq2vagA1ppJNdA@mail.gmail.com> <10cca93f-a8b8-4c42-0653-3b12fa67ad12@gmail.com> <CAMm+LwgA-1UffBfrH-Y3J6pfh7ni9kNrndp=gHNyUyi5j=oLxg@mail.gmail.com>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <53607da4-6608-783b-b875-65551e3add19@gmail.com>
Date: Thu, 16 Jan 2020 16:21:10 +1300
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <CAMm+LwgA-1UffBfrH-Y3J6pfh7ni9kNrndp=gHNyUyi5j=oLxg@mail.gmail.com>
Content-Language: en-US
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>
Cc: RFC Interest <rfc-interest@rfc-editor.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Errors-To: rfc-interest-bounces@rfc-editor.org
Sender: rfc-interest <rfc-interest-bounces@rfc-editor.org>

> Attached is a simple XSLT script that I created that simply rips out invalid elements.

The problem with colour/greyscale is that this isn't enough. If you have very dark blue text on a very pale pink background, what happens? svgcheck makes this black on black; my heuristic makes it black on white. What would your script do?

But I do agree with Phill, this is a non-trivial issue. Currently I think doing new drawings with a simple tool like DIA is the only practical way.

Allowing unrestricted SVG has plenty of issues too.

Regards
   Brian

On 16-Jan-20 15:23, Phillip Hallam-Baker wrote:
> Thanks, I think I have a system that might be sufficient for most of it. Main thing missing right now is end of line markers and I have to work out what the transforms are on those.
> 
> Basically, I wrote a CSS parser this morning and a partial SVG engine that tracks the X, Y and Font-Size attributes this afternoon. Net result is I can massage the files into something almost OK. Just have to call it out from my RFC converter and it is done.
> 
> Of course at this stage, it might have been easier to work out how to write a converter for Word diagram format.
> 
> 
> On Wed, Jan 15, 2020 at 7:56 PM Doug Royer <douglasroyer@gmail.com <mailto:douglasroyer@gmail.com>> wrote:
> 
>     On 1/15/20 1:14 PM, Phillip Hallam-Baker wrote:
>     > I am just attempting to massage my diagrams to get them into the SVG profile. Contrary to the claim made in RFC7996, creating a completely non-standard profile is not a trivial matter.
> 
> 
>     If this helps, I use DIA (a program) to make simple SVG files (export as ...). I have not had the need to translate complex SVG files yet. I have also used this script on some Postscript -> SVG converted files.
> 
>     It also works with DOT set of tools (ImageMagic command line tools): dot, neato, twopi, circo, fdp, sfdp, patchwork, and osage)
> 
>     Attached is a simple XSLT script that I created that simply rips out invalid elements. It would not be to difficult to make it alter attribute values. Attributes like 'style' would take some extra work. So far, I have not needed that.
> 
>     When I create the SVG files, I just don't use color and complex styles. If needed this could be expanded.
> 
>     -- 
>     Doug Royer - (http://DougRoyer.US)
>     Douglas.Royer@gmail.com <mailto:Douglas.Royer@gmail.com>
>     714-989-6135
>     _______________________________________________
>     rfc-interest mailing list
>     rfc-interest@rfc-editor.org <mailto:rfc-interest@rfc-editor.org>
>     https://www.rfc-editor.org/mailman/listinfo/rfc-interest
> 
> 
> _______________________________________________
> rfc-interest mailing list
> rfc-interest@rfc-editor.org
> https://www.rfc-editor.org/mailman/listinfo/rfc-interest
> 

_______________________________________________
rfc-interest mailing list
rfc-interest@rfc-editor.org
https://www.rfc-editor.org/mailman/listinfo/rfc-interest