Re: [rfc-i] SVG/A specification.

Leonard Rosenthol <lrosenth@adobe.com> Fri, 24 January 2020 15:21 UTC

Return-Path: <lrosenth@adobe.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 BC7AEF4070D for <rfc-interest@rfc-editor.org>; Fri, 24 Jan 2020 07:21:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at rfc-editor.org
X-Spam-Flag: NO
X-Spam-Score: -0.499
X-Spam-Level:
X-Spam-Status: No, score=-0.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, IXHASH_X1=1.5, SPF_NONE=0.001] autolearn=no autolearn_force=no
Authentication-Results: rfcpa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=adobe.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 oK2tfMu_gUzX for <rfc-interest@rfc-editor.org>; Fri, 24 Jan 2020 07:21:30 -0800 (PST)
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2057.outbound.protection.outlook.com [40.107.220.57]) by rfc-editor.org (Postfix) with ESMTPS id C6857F406D8 for <rfc-interest@rfc-editor.org>; Fri, 24 Jan 2020 07:21:29 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7X8/rN1KkE/3hwA7iqtnt3tWy5uYOv9xMFi1gTtIHNY+v2H9446/x1zecgNFaEMlpBGSTR6kGJlUVBAgZYd95y2y5lYFfhyXxpMBeBMcstk+XOpeQ0bVmsMqkLPHs50f/1fYHxtaJrp1d4TNMIBDr29NE0eJzJpeG4fpx2GvcppF6FSZmBw+XLwIO7VuNEIHr3Kd9aG/q+PG0PRZbW5U4BmsinznBtF2L34ggK33R38+BRgNDC2i15FkrxpP7JgpOX3iUNHjs5MKa7A9nnYO0NvRO8qu8HK2yy+6fLt2xY8s83STc41V4wfMakhHvhQ/c39q2K+mtUcCIYBGJ1PPw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LoKxz1V2IqoRJMg07N8wofcdHZTkYRkS9WKAlO7vp60=; b=NfP8LGvXwHT2PkWdU1menWvxaUYbvJwpV/pHbZEHetaN1cSbvZzcskxf1IV3v89a4ndkf7TBgKxa/0zdTNk/P/hDUHYu6eftO9URgmr1OQJ3xMHyPa4+S8mNfUW+7f3TL63GJibsZjb8LBC+YBlqv5W1U5FPeXrBmXU4KeqbQArhkxTYxj3zXSBUon25D86qLBKNWPV/e2AdezcmpfDcPBnVWrkQkGu0c1y1T/E7NoylmAQXzgSQ7qdaB5mzQ/ps5QmfOWP4ZmX7AqAyxen0YW5CKYmpNLYffHDSn+FFQ2A9igugdRRJfWLYg6pTcmFX9H2hQP9a0DUcVVXY9riHGQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=adobe.com; dmarc=pass action=none header.from=adobe.com; dkim=pass header.d=adobe.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adobe.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LoKxz1V2IqoRJMg07N8wofcdHZTkYRkS9WKAlO7vp60=; b=Vbt04D/BG1MQSN5BJ1QkuZChQaQ54iZWKoCCyfA9YdOGhu53pA6b/qjQZM2NJBAIykY3xYQHK2KgbdS4Lz98j2pHoVSZ85JUffU1V54FvCnqGJpIRlAEV45Kdayq4cf09qnel2NdbzA3ERppO40zVJiLT4CUaa8o5JIjqu0YkWw=
Received: from MN2PR02MB6992.namprd02.prod.outlook.com (20.179.223.74) by MN2PR02MB6349.namprd02.prod.outlook.com (52.132.175.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Fri, 24 Jan 2020 15:21:38 +0000
Received: from MN2PR02MB6992.namprd02.prod.outlook.com ([fe80::bc90:8089:6718:861b]) by MN2PR02MB6992.namprd02.prod.outlook.com ([fe80::bc90:8089:6718:861b%5]) with mapi id 15.20.2644.027; Fri, 24 Jan 2020 15:21:38 +0000
From: Leonard Rosenthol <lrosenth@adobe.com>
To: Phillip Hallam-Baker <phill@hallambaker.com>, RFC Interest <rfc-interest@rfc-editor.org>
Thread-Topic: [rfc-i] SVG/A specification.
Thread-Index: AQHV0mvngUIneYG83Eey+PyBJCikHaf5m0aA
Date: Fri, 24 Jan 2020 15:21:38 +0000
Message-ID: <9261C066-86A3-4D80-A5A1-890E06A67744@adobe.com>
References: <CAMm+LwhRoycA5Dn-SmhTWGizRcxe5i_9nGPbcs=6MYkfGS4SWQ@mail.gmail.com>
In-Reply-To: <CAMm+LwhRoycA5Dn-SmhTWGizRcxe5i_9nGPbcs=6MYkfGS4SWQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.21.0.200113
authentication-results: spf=none (sender IP is ) smtp.mailfrom=lrosenth@adobe.com;
x-originating-ip: [24.0.194.111]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 09dfae67-abb5-4338-d9ac-08d7a0e11b9f
x-ms-traffictypediagnostic: MN2PR02MB6349:
x-microsoft-antispam-prvs: <MN2PR02MB6349BA5D5AA6B6130279E98DCD0E0@MN2PR02MB6349.namprd02.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 02929ECF07
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(91956017)(76116006)(66556008)(86362001)(5660300002)(6486002)(64756008)(81166006)(81156014)(66476007)(66946007)(8936002)(66446008)(36756003)(8676002)(186003)(66574012)(2616005)(478600001)(71200400001)(53546011)(33656002)(26005)(6506007)(786003)(2906002)(6512007)(110136005)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR02MB6349; H:MN2PR02MB6992.namprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: adobe.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 0EghnQR/KNazRaNh230JnM4hhZSzUxaTDylsBol1v32TcQ+Gid3yYCRVk5nt9oWBJ4qkS5LzlEZ8mc+u9uLozKrfg3WCNChJd2oisfXGcN4EFYJEu0x03ZrqmoH7jiPcCD3rqY06KIaRxwH8wpLO5j7Z3KDchk/HlPO/X3qg1fs3AD+p9Hk3z3yO3KkSSO/Zv0tvvU4zvFvrnipLBMKFD9hCSg/VXCxhjWKyH+F8rCPUQ+9guhDAuFH9c6itvPU+XBOFQXQRd+Jyk5LJRRX19+QpV8vYYjowxW9Uh38f9mBxh4qn7sn67ExYqYy7zni7MxSaFFvMe8j9Xqrj/GGtFuyBBWMQAr0tdg/rh6bertWj5tQR5PZaebo8seqStFRt/iL+0b3SPva4v1ZRxgiHH1rE5+SPHRpbhqn3mO4c85MMOSih6zv5ywdz4yen0z2jO6j6XegcBeBoKv+Dtgg6LGApAEk68AvMau8huuDyDzM=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_9261C06686A34D80A5A1890E06A67744adobecom_"
MIME-Version: 1.0
X-OriginatorOrg: adobe.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 09dfae67-abb5-4338-d9ac-08d7a0e11b9f
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2020 15:21:38.5929 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: fa7b1b5a-7b34-4387-94ae-d2c178decee1
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: wanAIkjnfdFWM89j2X5ACVvi+m0+iux4jfFkUBjRloYM7YWa91wxOnuoL2OlCEtMRLJq1Td9kaGVBF0XKKiwug==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6349
Subject: Re: [rfc-i] SVG/A specification.
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: Fri, 24 Jan 2020 15:21:33 -0000

Since you (assumedly) named this to align with PDF/A (the archival subset of PDF), then since I am the project leader for PDF/A, I think it’s only appropriate for me to weigh in.

Given your definition of archival (which seems fine), I believe that you have not fully thought through all of the requirements necessary to achieve that.


  *   Encapsulation.
     *   Great starting point and your definition aligns well with PDF/A.  However, your implementation does not.  For example, you allow for fonts by reference – which is not permitted in PDF/A (and was, IIRC the first requirement that was ever put into that standard).  All font information *must* be embedded, since is impossible to determine what fonts will be available at any time in the future.   This is especially true for any font/content that uses “special areas” of Unicode such as math.
  *   Accessibility
     *   You aren’t actually doing anything here to address this.  Where are you requirements around associating alt text (at a minimum)?  If you are going to call this out, if nothing else, you need to at least point to WCAG requirements here.  Either that, or I recommend you drop this requirement.

You are also missing a key requirement:


  *   (No) Scripting
     *   Removing any scripts that could change the content in the future was the #2 requirement applied to PDF/A and I would say also needs to be applied to RFC’s.  Not only to prevent content changing but also to prevent an RFC from accessing a remote site when being viewed (which also falls into the “encapsulation” category).


Also, you have some requirements that don’t have anything to do with archival requirements and AFAICT serve no useful purpose.

  *   The stylesheet element MUST NOT be present.
  *   The id and style attributes MUST NOT be present
Why??   As long as everything is internal and does not include scripting – what is wrong with CSS/stylesheets?   Same with the style & id elements?   They are all perfectly valid and archival.


  *   If a diagram uses symbols from a different font, the specific glyphs used can be imported as SVG fonts.

SVG Fonts (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_fonts) are not supported by any modern browsers and should not be used.  However it is possible to embed fonts into an HTML/SVG files, conceptually as one does with PDF.


Leonard


From: rfc-interest <rfc-interest-bounces@rfc-editor.org> on behalf of Phillip Hallam-Baker <phill@hallambaker.com>
Date: Thursday, January 23, 2020 at 11:08 PM
To: "rfc-interest@rfc-editor.org" <rfc-interest@rfc-editor.org>
Subject: [rfc-i] SVG/A specification.

I have not gone through every curlicue at this point, but this is the set of requirements that I see, I am writing them out here to checkpoint the conversation:


Archival

The RFC series is an archival series that SHOULD remain readable as technology evolves.

Encapsulation

Published RFCs and Internet Drafts and the XML source files provided to enable rendering in future formats MUST be presented as a single file with no necessary external dependencies.

Interoperability

It SHOULD be possible to create RFCs and Internet Drafts using Commercial Off The Shelf (COTS) applications and their Open Source equivalents.

Accessibility

RFCs and Internet Drafts SHOULD be presented in a format that is compatible with the use of accessibility aids for blind and visually impaired readers. In particular, color vision deficiency should not affect the semantics of the documents.

Professional

RFCs and Internet Drafts SHOULD be presented in a format that meets contemporary standards for professional publications.
Here is the outline of the SVG/A spec:

SVG is a widely supported format for representing vector graphics.
Instead of defining a new specification that refers to the SVG specification for semantics (i.e. a profile) SVG/A is specified as a set of restrictions on the use of SVG.

•       No external content is permitted (stylesheets, fonts)

•       The stylesheet element MUST NOT be present.

•       The id and style attributes MUST NOT be present.

•       The values specified in id attributes MUST be unique in the compound document
Since the differences between SVG and SVG/A are small, it is much easier to define SVG/A = SVG-features rather than defining a new schema.
A source SVG file MAY be converted to SVG/A as follows

1.       Parse the source file to create an XML parse tree 'the target'.

2.       Resolve all references to external resources, extract the part(s) of the document that are referenced in the source document and incorporate at the appropriate point in the target tree.

3.       Convert all class attribute values in the target tree to style attribute values.

4.       Convert all style attribute values to the corresponding element attributes.

5.       (Optional) Apply accessibility transformations/validations
To incorporate a set of SVG/A files 'set of input files' in an XML2RFC source document requires the further steps of

6.       Detecting all references to document identifiers within the set of input files.

7.       Determining which identifier values are ambiguous.

8.       Changing the ambiguous identifiers and their referents throughout the set of input files.
Note that it is not necessary for the translation tool to be complete. It is acceptable for the tool to reject valid SVG input provided that it does not produce invalid SVG/A output.

It needs a bunch of wordsmithing and some details of course. But I really don't think setting out a set of restrictions on SVG is all that challenging. It is certainly much easier to abandon the SVG-Tiny approach and move to SVG/A than attempting to fix the SVG-Tiny docs.

At this point, I have been focused on the problem of fixing one SVG file rather than incorporating multiple SVG files into a single document. I need to do these as separate passes as my source editing formats are Word/OOXML and Markdown. I regard XML2RFC as an import/export format only.

Another advantage of my approach is that we can avoid the need to consider which fonts are 'archival'. If a diagram uses symbols from a different font, the specific glyphs used can be imported as SVG fonts.

What this means is that we can have high quality math in the documents without the need for recourse to MathML which Google Chrome doesn't support (its only 25 years since the first Math extensions to HTML were specified).