Xml2RFC Documents

By Sylvain Fargier (EN-SMM-APC)

image/svg+xmlENGINEERING DEPARTMENT

19 March 2019

Introduction

image/svg+xmlENGINEERING DEPARTMENT
image/svg+xmlENGINEERING DEPARTMENT

A tool to write technical documents:

  • Focus on content not style
  • Keep track of changes and versions

 

A publication tool:

  • Style according to latest group guidelines
  • Reference, index, search

Introduction: goals

image/svg+xmlENGINEERING DEPARTMENT

Introduction: preview

Documents

image/svg+xmlENGINEERING DEPARTMENT
image/svg+xmlENGINEERING DEPARTMENT

A "stream" regroups a set of documents:

  • Written by a working-group or a team (section, group, department ...)
  • Defines statuses statements depending on the document's category and state, ex:

Documents: Streams

image/svg+xmlENGINEERING DEPARTMENT

5 Categories: (STD, EXP, BCP, Info, Historic)

  • A low variety to keep things simple and yet sufficient
  • A color code to quickly identify the document

Documents: Categories

image/svg+xmlENGINEERING DEPARTMENT

Standard Tracks

  • A  specification for which significant implementation and successful operational experience has been obtained.

 

Experimental

  • a specification that is part of some research or development effort.
  • Published for examination, experimental implementation and evaluation.

Document Categories: STD & EXP

image/svg+xmlENGINEERING DEPARTMENT

Best Current Practices (BCP)

  • A way to standardise practices, recommendations on what is believed to be the best way to perform some operations.

 

Informational (Info)

  • Aggregates informational facts
  • ! not a specification or recommendation document.

Document Categories: BCP & INFO

image/svg+xmlENGINEERING DEPARTMENT

Historic

  • A specification that has been superseded by a more recent specification or is for any other reason considered obsolete.

Document Categories: Historic

image/svg+xmlENGINEERING DEPARTMENT

Pre-publication documents: Drafts

  • 6 months lifespan until expiry
  • can be promoted to regular document (using EDMS)

 

Pair-reviews: Consensus

  • A simple state that indicates whereas the review status
  • Additional information about reviewers in a dedicated section

Documents: Status

image/svg+xmlENGINEERING DEPARTMENT

In document versioning and ChangeLog

  • For document readers
  • Additional information and context in a dedicated section

 

Using an SCM (git)

  • for writers and in-depth investigation

Documents: Versions

Format and Syntax

image/svg+xmlENGINEERING DEPARTMENT
image/svg+xmlENGINEERING DEPARTMENT

The "xml2rfc" Version 3 Vocabulary [RFC7991]

  • Widely used by RFC writers
  • A limited set of tags (66), only a small subset frequently used (<10)
  • Tools and validation schemas available

 

There will be examples ... and more

Format and Syntax

image/svg+xmlENGINEERING DEPARTMENT

The "rfc" tag

  • Main tag describing the document itself

Format and Syntax: tags

<rfc
    category="std"
    consensus="true"
    docName="en-smm-apc-doc-guidelines-01"
    submissionType="en-smm-apc" ...>

Documents split in 3 parts:

  • front : description, authoring, abstract ...
  • middle : main content
  • back : changelog, annexes, reviews ...
image/svg+xmlENGINEERING DEPARTMENT

The "section" tag

  • Split the document in sections and sub-sections

Format and Syntax: tags

<section>
    <name>Historic</name>
    <t>This is some text</t>
</section>

Yes, sounds awesome,

But ... I have an XML allergy ... and my doctor won't let me use it ...

image/svg+xmlENGINEERING DEPARTMENT

A more user friendly syntax : PUG templating engine

  • A lot less error prone than XML
  • Keeps documents simple and human readable

Format and Syntax: PUG

section
  name Historic
  t This is some text
<section>
    <name>Historic</name>
    <t>This is some text</t>
</section>
image/svg+xmlENGINEERING DEPARTMENT

Quick PUG tour:

Format and Syntax: PUG

// This is a tag with an attribute
section(anchor='MY_ANCHOR')
  // This is a tag with text content, inside our section
  name Content examples

  // This is another tag with text content inside our section
  t This section will show a couple of RFC examples.

  // This tag has several line of text
  t
    | Full syntax documentation can be found here:
    | #[xref(target='RFC7991' format='default') RFC7991]

    // The #[] is a short-hand for small tags (refs, quotes ...)

There's more, but this really all what you need to know !

image/svg+xmlENGINEERING DEPARTMENT

One last example for the skeptical :

Format and Syntax: PUG

section
  name Content examples
  t This section will show a couple of RFC examples.
  t
    | Full syntax documentation can be found here:
    | #[xref(target='RFC7991' format='default') RFC7991]
<section>
  <name>Content examples</name>
  <t>This section will show a couple of RFC examples.</t>
  <t>Full syntax documentation can be found here:
    <xref target="RFC7991" format="default">RFC7991</xref>
  </t>
</section>

Honestly, the logo is the best argument ever, look at that dog !

image/svg+xmlENGINEERING DEPARTMENT

And what about diagrams, pictures, drawings

  • Writers should use line-art : focus on content, not styling
  • External documents may also be used

Format and Syntax: artwork

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Prio. |                   Flow Label                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+------+        +-----------+           +--------------+
|      | UP     |           | OPENED    |              | SUCCESS/NONE
| Dead |------->| Establish |---------->| Authenticate |--+
|      |        |           |           |              |  |
+------+        +-----------+           +--------------+  |
   ^               |                        |             |
   |          FAIL |                   FAIL |             |
   +<--------------+             +----------+             |
   |                             |                        |
   |            +-----------+    |           +---------+  |
   |       DOWN |           |    |   CLOSING |         |  |
   +------------| Terminate |<---+<----------| Network |<-+
                |           |                |         |
                +-----------+                +---------+
image/svg+xmlENGINEERING DEPARTMENT

Drawing "line art" diagrams can be tedious:

Format and Syntax: artwork

figure
  name Figure title
  artwork(align="center" type="ascii-art")
    | <![CDATA[
    |  +-------+      +---------------+
    |  |       |      |               |
    |  | Jave5 <------> asciiflow.com |
    |  |       |      |               |
    |  +-------+      +---------------+
    | ]]>

figure
  name External figure title
  artwork(align="center" type="svg" src="template-long/pug.svg")

Tools

image/svg+xmlENGINEERING DEPARTMENT
image/svg+xmlENGINEERING DEPARTMENT

Xml2RFC CERN version

  • Supports xml and pug files
  • Available as a docker image (gitlab-registry.cern.ch/apc/common/xml2rfc)
  • See the README file for additional details

Tools: Xml2RFC

# Generate pdf/html/txt files
xml2rfc "example.pug"

# Watch for a file and generate documents on modification
xml2rfc-watch "example.pug"

(pre)-Publication

image/svg+xmlENGINEERING DEPARTMENT
image/svg+xmlENGINEERING DEPARTMENT

Documents from the EN-SMM-APC stream:

  • Are pre-published when pushed or merged on master branch of the docs gitlab
  • pre-published documents are available on DFS (\\cern.ch\dfs\Websites\a\apc-dev\docs)
  • Also browsable from apc-dev website
  • And ...

(pre)-Publication: EN-SMM-APC stream

image/svg+xmlENGINEERING DEPARTMENT

Indexed and pre-published on apc-dev website :

(pre)-Publication: EN-SMM-APC stream

Questions ?

image/svg+xmlENGINEERING DEPARTMENT

Xml2RFC Documents

By Sylvain fargier

Xml2RFC Documents

  • 294