<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-carpenter-rswg-rfc7996-issues-00" category="info" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.14.2 -->
  <front>
    <title abbrev="IETF SVG profile issues">Known issues with the IETF SVG profile</title>
    <seriesInfo name="Internet-Draft" value="draft-carpenter-rswg-rfc7996-issues-00"/>
    <author initials="B. E." surname="Carpenter" fullname="Brian E. Carpenter">
      <organization abbrev="Univ. of Auckland">The University of Auckland</organization>
      <address>
        <postal>
          <postalLine>School of Computer Science</postalLine>
          <postalLine>The University of Auckland</postalLine>
          <postalLine>PB 92019</postalLine>
          <postalLine>Auckland 1142</postalLine>
          <postalLine>New Zealand</postalLine>
        </postal>
        <email>brian.e.carpenter@gmail.com</email>
      </address>
    </author>
    <author initials="J. N." surname="Brownlee" fullname="Nevil Brownlee">
      <organization abbrev="Univ. of Auckland">The University of Auckland</organization>
      <address>
        <postal>
          <postalLine>School of Computer Science</postalLine>
          <postalLine>The University of Auckland</postalLine>
          <postalLine>PB 92019</postalLine>
          <postalLine>Auckland 1142</postalLine>
          <postalLine>New Zealand</postalLine>
        </postal>
        <email>nevil.brownlee@gmail.com</email>
      </address>
    </author>
    <date year="2022" month="September" day="06"/>
    <workgroup>RSWG</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document lists a number of issues observed in practice by authors
attempting to include SVG diagrams in RFCs following the profile
established by RFC7996.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>The latest version of the XML2RFC format for preparing RFCs relies on embedding
diagrams in a particular subset of SVG defined in <xref target="RFC7996"/>.
The great advantage of SVG is that it is intrinsically XML and therefore
is a natural fit for XML2RFC in the way that no bitmap graphical
format can be. Discussion of that basic choice is out of
scope for this document.</t>
      <t>A number of RFCs including such diagrams have been successfully published, but their
authors have encountered various issues in doing so. This document's only
purpose is to describe those issues. Any attempt to resolve them is out of scope
for this document, which is not expected to be published as an RFC. However,
RFC 7996 itself observes that:</t>
      <artwork><![CDATA[
The details (particularly any vocabularies) described in this
document are expected to change based on experience gained in
implementing the new publication toolsets.  Revised documents will be
published capturing those changes...
]]></artwork>
      <t>The authors will be pleased to incorporate brief descriptions of additional issues.</t>
    </section>
    <section anchor="background">
      <name>Background</name>
      <t><xref target="RFC7996"/> specifies SVG 1.2 RFC, an SVG profile for use in
diagrams that may appear in RFCs. It is in fact a subset of SVG 1.2 Tiny,
itself a W3C subset of SVG 1. At the time that the RFC Editor chose this approach,
it was a reasonable hope that "Tiny" would succeed in the market.
This has not happened, and that is at the root of many of the issues
listed below.</t>
      <t>On the other hand, there are good reasons why the RFC Editor cannot allow
just any arbitrary SVG construct in RFCs - for example, to satisfy
accessibility concerns, to avoid external dependencies in RFCs,
and to avoid potentially malicious embedded scripts.</t>
    </section>
    <section anchor="list-of-issues">
      <name>List of Issues</name>
      <t>These are in no particular order.</t>
      <ol spacing="normal" type="1"><li>Very few (possibly only one) drawing tools can intrinsically respect the
RFC 7996 profile. Some simple drawing tools (e.g. dia) allow the user to more or less
respect the profile. However, the most popular drawing tools are very far from
being able to respect the profile, even if the author avoids colour and greyscale.<br/>
The evidence here is anecdotal, and the details are tedious (see below for some examples). The result, however, is that a diagram produced as slideware for presentation and discussion cannot, in the large majority of cases, be converted into RFC 7996 format. An author is obliged to discover how to regenerate the diagram with a different tool capable of respecting the profile.</li>
        <li>RFC 7996 forbids any colour except black or white, and therefore also forbids greyscale. Some people object to this restriction and assert that accessibility does not require it.</li>
        <li>Some drawing utilities generate colour or greyscale automatically. While a heuristic tool could fix this up (changing lighter shades to white and darker shades to black), this is a limiting factor.</li>
        <li>Some drawing utilities generate internal URLs, which are harmless, but the profile disallows all URLs.</li>
        <li>Some drawing utilities generate scripts for no apparent reason. We'd certainly want to forbid these anyway.</li>
        <li>Some drawing utilities manage to transform text into separate letters, or even letters into graphics, resulting in very bloated files that render badly.</li>
        <li>The S in SVG stands for 'Scalable' but the normal combination of a 'viewbox' element with a 'height' and 'width' element breaks scaling in most browsers.</li>
        <li>The existing tool chain, in particular the svgcheck module, fixes up non-conforming SVG as best it can, but sometimes this has alarming results such as completely black boxes in a diagram. <eref target="https://mailarchive.ietf.org/arch/msg/tools-discuss/StvU0GvMTwY0zEqt7I_cWLYcp_4">There's an example in the mail archive</eref> 
(you need to view the attachments).</li>
        <li>Authors who want to provide ASCII art alternatives struggle to find tools that
can generate acceptable SVG from ASCII art, or vice versa.</li>
        <li>Some quite basic elements such as 'marker' (commonly generated for arrowheads) are not allowed by RFC7996.</li>
        <li>Please email your issue and it can go here!</li>
      </ol>
      <section anchor="some-tedious-details">
        <name>Some tedious details</name>
        <t>RFC 7996 doesn't like 'stroke="none"' and 'stroke:none', even though they seem to be harmless and are often present.</t>
        <t>Colour is represented in various different ways and formats, depending on which drawing tool generated the SVG. So a heuristic to fix up colour has to deal with all of them.</t>
        <t>There are a number of ways in which RFC 7996 dislikes quite straightforward constructs that all browsers (the consumers of these SVG files) support. Just to give a few essentially random examples:</t>
        <artwork><![CDATA[
The element 'style' is not allowed as a child of 'svg'
The element 'path' does not allow the attribute 'marker-end'
Style property 'fill' promoted to attribute
Style property 'stroke-opacity' promoted to attribute
Style property 'stroke-miterlimit' removed
The element 'foreignObject' is not allowed as a child of 'g'
]]></artwork>
        <t>There's also some makework in the IETF toolchain:</t>
        <artwork><![CDATA[
The attribute 'stroke' does not allow the value 'rgb(0,0,0)', replaced with 'black'
The attribute 'stroke' does not allow the value 'rgb(0%,0%,0%)', replaced with 'black'
The attribute 'font-family' does not allow the value 'Arial, sans-serif', replaced with 'sans-serif'
]]></artwork>
        <t>And some things that we will always need:</t>
        <artwork><![CDATA[
The element 'script' is not allowed as a child of 'svg'
]]></artwork>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>None.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Any form of scripting should remain forbidden in the SVG included in any Internet Draft or RFC.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC7996" target="https://www.rfc-editor.org/info/rfc7996" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7996.xml">
        <front>
          <title>SVG Drawings for RFCs: SVG 1.2 RFC</title>
          <author fullname="N. Brownlee" initials="N." surname="Brownlee"/>
          <date month="December" year="2016"/>
          <abstract>
            <t>This document specifies SVG 1.2 RFC -- an SVG profile for use in diagrams that may appear in RFCs -- and considers some of the issues concerning the creation and use of such diagrams.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7996"/>
        <seriesInfo name="DOI" value="10.17487/RFC7996"/>
      </reference>
    </references>
    <section anchor="change-log">
      <name>Change Log</name>
      <section anchor="draft-00">
        <name>Draft-00</name>
        <ul spacing="normal">
          <li>Original version</li>
        </ul>
      </section>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+VZ72/cxhH9fsD9D1sbxUmAjpaVNKkEFKisOKlSxwksJ25a
FMEeuXfciOQyu8s7XYPkb+97s8u7k+Q0ab/WNmyT+2vmzZs3s9R8Pp9Ooo2N
uVB/7dymUzaEwQS1sbFWsTbq+uXbT9XNN5+p3rulbcx0ohcLb9YXj0by0umk
cmWnW+xYeb2M81L73nTR+LkPm9XcL8uPz88/mqfZ89PT6WQ6eapC1F31nW5c
h4XRD4avbe/lIcSz09Pz07PpZLO6UG9u3n02ndxuYAK37Uycf8KTppNSxwtl
u6Xj4t5eTCdKRVdeqC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