Skip to main content

SVG Drawings for RFCs: SVG 1.2 RFC
draft-brownlee-svg-rfc-02

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Replaced".
Author Nevil Brownlee
Last updated 2014-02-11
Replaced by draft-iab-svg-rfc, RFC 7996
RFC stream (None)
Formats
Reviews
Additional resources
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-brownlee-svg-rfc-02
Network Working Group                                  N. Brownlee (Ed.)
Internet-Draft                                The University of Auckland
Intended status: Informational                                       IAB
Expires: August 16, 2014
                                                       February 12, 2014

                   SVG Drawings for RFCs: SVG 1.2 RFC
                       draft-brownlee-svg-rfc-02

Abstract

   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.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on August 16, 2014.

Copyright Notice

   Copyright (c) 2014 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 1]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  SVG 1.2 RFC: An SVG profile for RFCs  . . . . . . . . . . . .   2
   3.  How to create SVG drawings  . . . . . . . . . . . . . . . . .   4
   4.  Meta-language for diagrams common in RFCs . . . . . . . . . .   4
     4.1.  Sequence Digrgams . . . . . . . . . . . . . . . . . . . .   4
     4.2.  State Diagrams  . . . . . . . . . . . . . . . . . . . . .   6
     4.3.  Packet Layout Diarrams  . . . . . . . . . . . . . . . . .   6
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   6
   7.  Revision History [RFC Editor please delete] . . . . . . . . .   6
   8.  Appendix: Elements and attributes allowed in SVG 1.2 RFC  . .   7
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   9
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .   9
     9.2.  Informative References  . . . . . . . . . . . . . . . . .   9

1.  Introduction

   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
   [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; [RFC6949] says

      "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."

   SVG (Scalable Vector Graphics) has been developed by W3C, the World
   Wide Web Consortium; its current standard is SVG 1.1 Full
   [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.

   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.

2.  SVG 1.2 RFC: An SVG profile for RFCs

   As a starting point for SVG 1.2 RFC, the Design Team decided to use
   SVG 1.2 Tiny [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

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 2]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

   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.

   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 [W3C.REC-SVGTiny12-20081222]:

   12  Multimedia
   13  Interactivity
   15  Scripting
   16  Animation
   18  Metadata
   19  Extensibility

   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.

   Considering the other sections in SVG Tiny 1.2
   [W3C.REC-SVGTiny12-20081222]:

    9 Basic Shapes
   10 Text
        Everything in these sections is allowed in SVG 1.2 RFC.

   11 Painting: Filling, Stroking, Colors and Paint Servers
        Anything relating to 'color' is not allowed in SVG 1.2 RFC,
        everything else is allowed.

   14 Linking
        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.

   17 Fonts
        SVG 1.2 RFC only allows 'serif', 'sans-serif' and 'monospace'
        generic font families from the WebFonts facility, described in
        CSS 2.1 [W3C.REC-CSS2-20110607], section 15, Fonts.  In
        particular, the SVG 'font' element is not allowed.

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 3]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

3.  How to create SVG drawings

   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.

   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.  [Need to take the lists from SVG Tiny
   1.2 and prune them for SVG 1.2 RFC.  TBD]

   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.

   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).

4.  Meta-language for diagrams common in RFCs

   This section presents some examples of possible language(s) which
   could be used to create several kinds of diagrams that are common in
   RFCs.

4.1.  Sequence Digrgams

   Example: Figure 6 from draft-loreto-httpbis-trusted-proxy20-00.

    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)"

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 4]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

    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
    #  block 1 to 2, objects 5 to 6, grey
    #  text above "Extra block"

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

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

    object 7
      blank 1 to 2

    object 8
      block 1 to 2, objects 8 to 16, "grey"
      text above "HTTP2.0"

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

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

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

    object 12
      blank 2 to 3

    object 13
      block 2 to 3, objects 13 to 16, grey
      text seg 1 above "HTTP2.0"

    object 14

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 5]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

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

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

    object 16
      pline 1 to 2, arrowhead at start
      text seg 1 centre "(9) stream(X) 200 OK"

   The SVG diagram produced from this can be seen at
   https://www.cs.auckland.ac.nz/~nevil/http-proxy-dwg.svg

4.2.  State Diagrams

4.3.  Packet Layout Diarrams

5.  IANA Considerations

   This document does not create a new registry nor does it register any
   values in existing registries; no IANA action is required.

6.  Acknowledgements

   Thanks to the Design Team members for their helpful comments and
   suggestions for SVG 1.2 RFC.

7.  Revision History [RFC Editor please delete]

   version -00, 29 Jan 14:
      Initial version, using content from Nevil's
      emails to the Design Team.

   version -01, 11 Feb 14:
      Allow links to 'long-term stable URIs'
      Link URIs must be ASCII only
      Need for tools to check SVG 1.2 RFC compatibilty and to strip
      'unneccessary' attributes explicitly stated.
      Statement that drawings can't be normative removed; Postscript-
      only RFCs already exist.
      Added most attributes and elements to the Appendix.

   version -02, 12 Feb 14:
      Added metalanguage example to make time-sequence drawings.

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 6]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

8.  Appendix: Elements and attributes allowed in SVG 1.2 RFC

   Elements, properties and attributes selected for SVG 1.2 RFC from
   [W3C.REC-SVGTiny12-20081222].

    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

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 7]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

      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

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 8]
Internet-Draft     SVG Drawings for RFCs: SVG 1.2 RFC      February 2014

9.  References

9.1.  Normative References

   [RFC6949]  Flanagan, H. and N. Brownlee, "RFC Series Format
              Requirements and Future Development", RFC 6949, May 2013.

   [W3C.REC-SVGTiny12-20081222]
              Grasso, A., Ferraiolo, J., Neumann, A., Jackson, D.,
              Berjon, R., Schepers, D., Lilley, C., McCormack, C.,
              Hardy, V., Emmons, A., Hayman, S., Dahlstroem, E.,
              Shellshear, A., Ramani, N., Northway, C., Andersson, O.,
              and A. Quint, "Scalable Vector Graphics (SVG) Tiny 1.2
              Specification", World Wide Web Consortium Recommendation
              REC-SVGTiny12-20081222, December 2008,
              <http://www.w3.org/TR/2008/REC-SVGTiny12-20081222>.

   [W3C.REC-CSS2-20110607]
              Celik, T., Hickson, I., Bos, B., and H. Lie, "Cascading
              Style Sheets Level 2 Revision 1 (CSS 2.1) Specification",
              World Wide Web Consortium Recommendation REC-
              CSS2-20110607, June 2011,
              <http://www.w3.org/TR/2011/REC-CSS2-20110607>.

9.2.  Informative References

   [W3C.REC-SVG11-20110816]
              Dahlstroem, E., Dengler, P., Grasso, A., Lilley, C.,
              McCormack, C., Schepers, D., Watt, J., Ferraiolo, J.,
              Fujisawa, J., and D. Jackson, "Scalable Vector Graphics
              (SVG) 1.1 (Second Edition)", World Wide Web Consortium
              Recommendation REC-SVG11-20110816, August 2011,
              <http://www.w3.org/TR/2011/REC-SVG11-20110816>.

Authors' Addresses

   Nevil Brownlee
   The University of Auckland

   EMail: n.brownlee@auckland.ac.nz

   Internet Architecture Board

   EMail: iab@iab.org

Brownlee (Ed.) & IAB     Expires August 16, 2014                [Page 9]