One document matched: draft-brownlee-svg-rfc-03.xml


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY rfc2119 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
]>

<rfc category="info" ipr="trust200902"
  docName="draft-brownlee-svg-rfc-03">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc iprnotified="no" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no" ?>

<front>
  <title>SVG Drawings for RFCs: SVG 1.2 RFC</title>

  <author initials="N." surname="Brownlee (Ed.)" fullname="Nevil Brownlee">
    <organization>The University of Auckland</organization>
    <address><email>n.brownlee@auckland.ac.nz</email></address>
  </author>
  <author  surname="IAB" fullname="Internet Architecture Board">
    <organization></organization>
    <address><email>iab@iab.org</email>
    </address>
  </author>

  <date day="14" month="April" year="2014" />

  <keyword>RFC</keyword>
  <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>

<middle>
  <section title="Introduction">
    <t>
      Over the last two years the RFC Editor has worked with the
      Internet community to develop specifications for changes in
      the format of RFCs.  An outline of the resulting
      specifications was published as <xref target="RFC6949"/> in May 2013.
      Since then a Design Team has been working with the RFC Editor
      to flesh out those specifications.
      One aspect of the changes is to allow line drawings in RFCs;
      <xref target="RFC6949"/> says
        <list style="empty"><t>
        "Graphics may include ASCII art and a more complex form to be
         defined, such as SVG line art [SVG].  Color and grayscale will
         not be accepted.  RFCs must correctly display in monochromatic
         black-and-white to allow for monochrome displays, black-and-
         white printing, and support for visual disabilities."
	</t></list>
    </t><t>
      SVG (Scalable Vector Graphics) has been developed by W3C, the
      World Wide Web Consortium; its current standard is SVG 1.1 Full
      <xref target="W3C.REC-SVG11-20110816"/>.
      This document defines SVG 1.2 RFC, an SVG profile (i.e. a subset
      of SVG) that is suitable for RFC line drawings.
    </t><t>
      Note that in RFCs, the text provides normative
      descriptions of protocols, systems, etc.  Diagrams may be
      used to help explain concepts more clearly, but they are
      informative, not normative.
    </t>
  </section>

  <section title="SVG 1.2 RFC: An SVG profile for RFCs">
    <t>
      As a starting point for SVG 1.2 RFC, the Design Team decided to
      use SVG 1.2 Tiny <xref target="W3C.REC-SVGTiny12-20081222"/>.
      SVG 1.2 Tiny is an SVG subset intended to be implemented on
      small, mobile devices such as cellphones and smartphones.
      That should allow RFCs to be rendered well on such devices,
      especially those that have small screens.  However, RFCs are
      self-contained documents that do not change once they are
      published.  The use of SVG drawings in RFCs is intended to allow
      authors to create drawings that are simple to produce, and
      easier to understand than our traditional 'ASCII Art' ones.
      In short, we are also trying to improve access to the content in
      RFCs, so SVG drawings need to be kept as simple as possible.
    </t><t>
      SVG can provide a complete User Interface, but within RFCs, all
      we need are simple diagrams that do not change once the RFC is
      published.  Therefore, SVG RFC does not allow anything from the
      following sections in SVG Tiny 1.2
      <xref target="W3C.REC-SVGTiny12-20081222"/>:
<?rfc subcompact="yes" ?>
      <list style='hanging'>
        <t hangText="12  Multimedia"></t>
        <t hangText="13  Interactivity"></t>
        <t hangText="15  Scripting"></t>
        <t hangText="16  Animation"></t>
        <t hangText="18  Metadata"></t>
        <t hangText="19  Extensibility"></t>
      </list>
      Note that SVG Tiny 1.2 elements may have many properties or
      attributes that are needed to support aspects of the above sections.
      Those are not allowed in SVG 1.2 RFC.
    </t><t>
    Considering the other sections in SVG Tiny 1.2
      <xref target="W3C.REC-SVGTiny12-20081222"/>:
      <list style='hanging' hangIndent='5'>
        <t hangText=" 9 Basic Shapes"></t>
        <t hangText="10 Text"><vspace />
          Everything in these sections is allowed in SVG 1.2 RFC.
        </t>
<?rfc subcompact="no" ?>
        <t hangText="11 Painting: Filling, Stroking, Colors and Paint Servers">
          <vspace />
          Anything relating to 'color' is not allowed in SVG 1.2 RFC,
          everything else is allowed.
        </t>
        <t hangText="14 Linking"><vspace />
	  SVG Tiny 1.2 allows internationalized IRIs in references.
	  In SVG 1.2 RFC such links must be ASCII only. That should
	  not cause problems, since one can just use the URI form of
	  any IRI.  Authors should try to use links only to URIs
	  that are long-trem stable.<vspace />
        </t>
        <t hangText="17 Fonts"><vspace />
         SVG 1.2 RFC only allows 'serif', 'sans-serif' and 'monospace'
         generic font families from the WebFonts facility, described
         in CSS 2.1,
	 <!-- <xref target= "W3C.REC-CSS2-20110607"/>, -->
          section 15,
         Fonts. In particular, the SVG 'font' element is not allowed.
        </t>
      </list>
    </t>
  </section>

  <section title="How to create SVG drawings">
    <t>Many drawing packages can be used to create SVG drawings,
      for example Open Source packages Inkscape and Dia.
      Be aware that such packages may use SVG elements or attributes
      that are not allowed in SVG 1.2 RFC.  For example, the 
      'marker' attribute is often used to place symbols such as
      arrowheads on lines, but 'marker' is not allowed in SVG 1.2
      Tiny or SVG 1.2 RFC.  In such cases one has to draw the
      arrowhead in another, simpler way.
    </t><t>
      We will need to provide a tool to check that a diagram
      only uses elements and attributes that are allowed in SVG 1.2
      RFC.  These are listed in the Appendix below.
    </t><t>
      Diagrams produced with these packages may produce large SVG
      files that are hard to read or understand directly.   We
      should provide a tool to strip out unnecccessary attributes;
      authors could run that tool over their drawings, and see
      whether such stripping causes any visible changes.
      If such changes occur, authors may find it difficult to 
      work out how to fix any such changes.  The tool should 
      produce a list of non-allowed keywords and the context in which
      they were found.
    </t><t>
      Another way to create SVG drawings is to write programs to draw
      them.  For example, using python and its svgwrite module is
      a pleasant environment (for those who like writing code).
    </t>
  </section>

  <section title="Meta-language for diagrams common in RFCs">
    <t>This section presents a few examples of possible language(s)
      which could be used to create the kinds of diagrams 
      that are most common in RFCs.</t>
    <t>The SVG diagrams produced from the following examples can be seen at
    <vspace/>https://www.cs.auckland.ac.nz/~nevil/SVG_RFC_1.2/
    <vspace/>along with an html version of this draft that includes
      the svg diagrams.
    </t>

    <section title="Packet Layout Diagrams">
      <t>Example: Figure 3 from RFC 793.
      </t><t>
	In these examples the first line specifies the generated 
        SVG filename.  The scale factor determines the size
        of the SVG drawing; it needs to be set so that the drawing
        fits nicely into the final document.
      </t><t>
        'packet;' starts the packet description;
	it's followed by a description of the fields in each row.
      </t>
<figure><artwork><![CDATA[
info;
  output "tcp-header.svg", scale 0.65;

packet;
  row 0;
    field "Source Port", 0 to 15;
    field "Destination Port", 16 to 31;
  row 1;
    field "Sequence Number", 0 to 31;
  row 2;
    field "Acknowledgement Number", 0 to 31;
  row 3;
    field "Data Offset", 0 to 3;
    field "Reserved", 4 to 9;
    field "Urg", 10 to 10, fsize 14;  # 14 px font so the flags fit
    field "Ack", 11 to 11, fsize 14;
    field "Psh", 12 to 12, fsize 14;
    field "Rst", 13 to 13, fsize 14;
    field "Syn", 14 to 14, fsize 14;
    field "Fin", 15 to 15, fsize 14;
    field "Window", 16 to 31;
  row 4;
    field "Checksum", 0 to 15;
    field "Urgent Pointer", 16 to 31;
  row 5;
    field "Options", 0 to 23;
    field "Padding", 24 to 31;
  row 6;
    field "Data", 0 to 31;
]]></artwork></figure>
    </section>

    <section title="Sequence Digrgams (1)">
      <t>Example: Figure 6 from draft-loreto-httpbis-trusted-proxy20-00.
      </t><t>
	In this example, columns are vertical lines with a text
	header above them.  There are three columns, and columns 1
	and 2 are spaced 250 pixels apart.
      </t><t>
        The rest of the file describes objects to be drawn; most of them
	are plines (polylines) from one colun to another, but object
	3 only extends across to 0.3 of the distance between columns
	1 and 2.
      </t>
<figure><artwork><![CDATA[
info;
  output "httpbis-proxy20-fig6.svg", scale 0.9;

#Thu, 30 Jan 14 (NZDT)

#Figure 6 of draft-loreto-httpbis-trusted-proxy20-00.txt

column 1 width 250;  # columns have vertical line to bottom
  text above "user-agent";

column 2 width 250;
  text "Proxy";

column 3; # Last col
  text "Server";

object 1;  # Only need polylines
  pline 1 to 2, arrowhead at end;
  text above "(1) TLS ClientHello";
  text below "(ALPN ProtocolName: http)";

object 2;
  pline 1 to 2, arrowhead at start;
  text above "(2) TLS Error";
  text below "(Proxy Cert)";

object 3;
  pline 1 to 1.3, down, back to 1, arrowhead at end;
  text seg 2 centre "(inform user of the SecureProxy)";

object 4;
  pline 1 to 2, arrowhead at end;
  text above "(3) TLS ClientHello";

object 5;
  pline 1 to 2, arrowhead at start;
  text above "(4) ServerHello";

object 6;
  blank 1 to 2;

object 7;
  block 1 to 2, objects 8 to 15, colour "grey";
  text above "HTTP2.0";

object 8;
  pline 1 to 2, arrowhead at end;
  text seg 1 centre "(5) stream(X) GET";

object 9;
  pline 2 to 3, arrowhead at end;
  text seg 1 above "(6) TLS ClientHello";

object 10;
  pline 2 to 3, arrowhead at start;
  text seg 1 above "TLS ServerHello";

object 11;
  blank 2 to 3;

object 12;
  block 2 to 3, objects 13 to 15, colour "grey";
  text seg 1 above "HTTP2.0";

object 13;
  pline 2 to 3, arrowhead at end;
  text seg 1 centre "(7) stream(Z) GET";

object 14;
  pline 2 to 3, arrowhead at start;
  text seg 1 centre "(8) stream(Z) 200 OK";

object 15;
  pline 1 to 2, arrowhead at start;
  text seg 1 centre "(9) stream(X) 200 OK";
]]></artwork></figure>
    </section>

    <section title="Sequence Digrgams (2)">
        <t>Example: Figure 3 from RFC 4321
        </t><t>
	  This example uses (x,y) coordinates to specify points in in
	  plines.  For these, the x units are columns and the y units
	  are lines (positive means 'down the diagram').
        </t><t>
          both x and y may be absolute, e.g. 4.3, or relative, e.g.
	  +1.5).  For the first point of a pline, relative means 
	  'relative to the starting point of the previous pline,'
	  for other points in a pline it means 'relative to the 
	  last point.'
        </t><t>
	  Note that column 1 is drawn in white, i.e. nothing is
	  drawn for it.  It's simply used to make a blank area where
	  objects 8 and 9 can place text.  For both those objects
	  a pline is used to specify the text's position.
        </t><t>
	  Last, the metalanguage allows simple macros, introduced
	  by 'define foo = '.  These make it easier to
	  re-use definitions, for example of line types.
	</t>
<figure><artwork><![CDATA[
info;
  output "rfc4321-fig3.svg", scale 0.9;

# Sat,  5 Apr 14 (NZDT)

#Figure 3 of RFC 4321

define hw = width 110;  # Hop width

column 1 width 130, colour "white";  # No heading or vertical line

column 2 hw;  text above "UAC";

column 3 hw;  text "P1";

column 4 hw;  text "P2";

column 5 hw;  text "P3";

column 6 hw;  text "UAS";

define tgrey = colour "lightgrey" width 5;  # Thick grey
define ahe = arrowhead at end;

object 1;
  pline 1.8
    to 2.3 tgrey, to (2.4,+0), to (2.6,+1.5), to (2.7,+0) ahe,
    to 3.3 tgrey, to (3.4,+0), to (3.6,+1.5), to (3.7,+0) ahe,
    to 4.3 tgrey, to (4.4,+0), to (4.6,+1.5), to (4.7,+0) ahe,
    to 5.3 tgrey, to (5.4,+0), to (5.6,+1.5), to (5.7,+0) ahe,
    to 6.3 tgrey;

object 2;
  pline (1.8,+10) to 2.3 tgrey;

object 3;
  pline (3.3,+2)
    to 2.85 tgrey, to (2.7,+0) tgrey,
    to (2.5,+0), to (2.25,+1.5), to (2.0,+0) ahe;
  text seg 2 centre "408";

object 4;
  pline (4.3,+1.5)
    to 3.9 tgrey, to (3.7,+0) tgrey,
    to (3.5,+0), to (3.3,+1.5), to (3.1,+0) ahe,
    to 2.9 tgrey, to (2.7,+0) tgrey,
    to (2.5,+0), to (2.25,+1.5), to (2.0,+0) ahe;
  text seg 2 centre "408";
  text seg 7 centre "408";

object 5;
  pline (5.3,+1.5)
    to 4.9 tgrey, to (4.7,+0) tgrey,
    to (4.5,+0), to (4.3,+1.5), to (4.1,+0) ahe,
    to 3.9 tgrey, to (3.7,+0) tgrey,
    to (3.5,+0), to (3.3,+1.5), to (3.1,+0) ahe,
    to 2.9 tgrey, to (2.7,+0) tgrey,
    to (2.5,+0), to (2.25,+1.5), to (2.0,+0) ahe;
  text seg  2 centre "408";
  text seg  7 centre "408";
  text seg 12 centre "408";

object 6;
  pline (6.3,+1.5)
    to 5.9 tgrey, to (5.7,+0) tgrey,
    to (5.5,+0), to (5.3,+1.5), to (5.1,+0) ahe;
    to 4.9 tgrey, to (4.7,+0) tgrey,
    to (4.5,+0), to (4.3,+1.5), to (4.1,+0) ahe;
    to 3.9 tgrey, to (3.7,+0) tgrey,    
    to (3.5,+0), to (3.3,+1.5), to (3.1,+0) ahe;
    to 2.9 tgrey, to (2.7,+0) tgrey,
    to (2.5,+0), to (2.25,+1.5), to (2.0,+0) ahe;
  text seg  2 centre "408";
  text seg  7 centre "408";
  text seg 12 centre "408";
  text seg 17 centre "408";

object 7:
  pline (1.63,4.1) to (1.73,+0);

object 8;
  pline (1.68,4.1) to (+0,14) arrowhead at end;
  text centre "64*T1";

object 9;
  pline (1.2,13.1) to (1.5,+0) colour "white";
  text centre "(timeout)";
]]></artwork></figure>
    </section>
  </section>

  <section title="IANA Considerations">
    <t>
     This document does not create a new registry nor does it register any
     values in existing registries; no IANA action is required.
    </t>
  </section>

  <section title="Acknowledgements">
    <t>
      Thanks to the Design Team members for their helpful comments
      and suggestions for SVG 1.2 RFC.
    </t>
  </section>

  <section title="Revision History [RFC Editor please delete]">
    <t><list style="hanging" hangIndent="3">
      <t hangText="version -03, 14 Apr 14:">
         <vspace/>Added two more example diagrams; a simple packet
	   layout, and a diagram that uses lots of diagonal lines.</t>
      <t hangText="version -02, 12 Feb 14:">
         <vspace/>Added metalanguage example to make time-sequence
	   drawings.</t>
      <t hangText="version -01, 11 Feb 14:">
         <vspace/>Allow links to 'long-term stable URIs'
         <vspace/>Link URIs must be ASCII only
	 <vspace/>Need for tools to check SVG 1.2 RFC compatibilty
	   and to strip 'unneccessary' attributes explicitly stated.
	 <vspace/>Statement that drawings can't be normative removed;
	   Postscript-only RFCs already exist.
         <vspace/>Added most attributes and elements to 
           the Appendix.</t>
      <t hangText="version -00, 29 Jan 14:">
         <vspace/>Initial version, using content from Nevil's
         <vspace/>emails to the Design Team.</t>
    </list></t>
  </section>

  <section title="Appendix: Elements and attributes allowed in SVG 1.2 RFC">
    <t> Elements, properties and attributes selected for SVG 1.2 RFC
      from <xref target="W3C.REC-SVGTiny12-20081222"/>. 
<figure><artwork><![CDATA[
 In the list  below, elements and properties are listed on the
 left,and  their allowed values are given in parentheses on the
 right.
 <color>, the list of allowed colours, is a black-and-white
 subset of  the SVG colour names.

 Elements:

   svg              (version, baseProfile=tiny, width, viewBox,
                     preserveAspectRatio, snapshotTime)
   g
   defs
   title
   desc
   use              (x, y, xlink:href)

   rect             (x, y, width, height, rx, ry)
   circle           (cx, cy, r)
   ellipse          (cx, cy, rx, ry)
   line             (x1, y1, x2, y2)
   polyline         (points)
   polygon          (points)

   text             (x, y, rotate)
   tspan
   textArea         (x, y, width, height, auto)
   tbreak 

   solidcolor
   linearGradient   (gradientUnits, x1, y1, x2, y2)
   radialGradient   (gradientUnits, cx, cy, r)
   stop             (offset)

 Properties:  (most allow inherit as a value)

   stroke
   stroke-width 
   stroke-linecap   (butt, round, square)
   stroke-linejoin  (miter, round, bevel)
   stroke-mitrelimit
   stroke-dasharray
   stroke-dashoffset
   stroke-opacity
   vector-effect    (non-scaling-stroke, none)
   viewport-fill    (none, currentColor)
   viewport-fill-opacity

   display          (inline, block, list-item, run-in, compact,
                      marker, table, inline-table, table-row-group,
                      table-header-group, table-footer-group,
                      table-row, table-column-group,
	              table-column, table-cell, table-caption,
                      none)
   visibility       (visible, hidden, collapse)
   color-rendering  (auto, optimizeSpeed, optimizeQuality)
   shape-rendering  (auto, optimizeSpeed, crispEdges,
		      geometricPrecision)
   text-rendering   (auto, optimizeSpeed, optimizeLegibility,
		      geometricPrecision)
   buffered-rendering  (auto, dynamic, static)

   <color>   (black, grey, darkgrey, dimgrey, lightgrey,
	       gray, darkgray, dimgray, lightgray, white)
   opacity
   solid-opacity
   solid-color    (currentColor, <color>)
   color          (currentColor, <color>)

   stop-color     (currentColor, <color>)
   stop-opacity

   line-increment (auto)
   text-align     (start,end, center)
   display-align  (auto, before, center, after)

   font-size
   font-family    (serif, sans-serif, monospace)
   font-weight    (normal, bold, bolder, lighter)
   font-style     (normal, italic, oblique)
   font-variant   (normal, small-caps)
   direction      (ltr, rtl)
   unicode-bidi   (normal, embed, bidi-override)
   text-anchor    (start, middle, end)
   fill           (none, black or grey)
   fill-rule      (nonzero, evenodd)
   fill-opacity
]]></artwork></figure>
</t>
  </section>

</middle>

<back>
  <references title='Normative References'>
    <?rfc include="reference.RFC.6949"?> <!-- RFC Series Format Requirements -->
    <?rfc include="reference.W3C.REC-SVGTiny12-20081222.xml"?>
    <!-- Celik spells his name starting with a tilde under C
    <?rfc include="reference.W3C.REC-CSS2-20110607.xml"?> -->
    <reference anchor='W3C.REC-CSS2-20110607'
      target='http://www.w3.org/TR/2011/REC-CSS2-20110607'>
      <front>
        <title>Cascading Style Sheets Level 2 Revision 1
          (CSS 2.1) Specification</title>
        <author initials='B.' surname='Bos' fullname='Bert Bos' />
          <!-- <author initials='T.' surname='Çelik' 
            fullname='Tantek Çelik'> -->
        <author initials='T.' surname='Celik' fullname='Tantek Celik' />
        <author initials='I.' surname='Hickson' fullname='Ian Hickson' />
        <author initials='H.' surname='Lie' fullname='HÃ¥kon Wium Lie' />
        <date month='June' day='7' year='2011' />
      </front>
      <seriesInfo name='World Wide Web Consortium Recommendation'
        value='REC-CSS2-20110607' />
      <format type='HTML'
        target='http://www.w3.org/TR/2011/REC-CSS2-20110607' />
    </reference>
  </references>
  <references title='Informative References'>
    <?rfc include="reference.W3C.REC-SVG11-20110816.xml"?>
  </references>
</back>

</rfc>

PAFTECH AB 2003-20262026-04-24 08:57:55