[rfc-i] Graphics and XML
Dave Crocker
dhc at dcrocker.net
Tue Jul 10 08:17:27 PDT 2012
On 7/10/2012 8:07 AM, Julian Reschke wrote:
> On 2012-07-10 16:57, Paul Hoffman wrote:
>> On Jul 10, 2012, at 6:39 AM, Yoav Nir wrote:
>>
>>> The other problem that keeps coming up is people wanting to add
>>> images, graphs and formulas to documents. XML2RFC as it currently
>>> stands is just as ill-suited for this as nroff.
>>
>> Adding an image to an XML document is trivial: you use a stable URL.
>> See draft-hoffman-rfcformat-canon-others for more detail.
>> ...
>
> That's a *bit* misleading; it's sufficient to specify the location
> relative to the source text file (or even to inline it as data: URI).
>
> Example:
> <http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#rfc.section.12.2>
>
>
> But yes, a stable, absolute URI would work as well.
I've cited this before, but to provide a real-world example for an
existing RFC, take a look at the three versions of RFC 5598:
http://bbiw.net/recent.html#emailarch
All were generated from a single xml2rfc source, using a construct form
that I think is pretty straightforward. It contains a citation to a
'local' file and then an ascii-art version of the diagram. The pdf and
html versions use the pretty form and the txt version uses the ascii
art. xml2rfc generates these automatically.
For example:
> <figure
> align="center"
> anchor="Basic"
> title="Basic Internet Mail Service Model">
>
> <?rfc needLines="28" ?>
> <artwork
> align="center"
> alt="[ User, MHS, User Service Model ]"
> name="Basic Internet Mail Service Model"
> src="email-arch-fig-svcmodel.png"
> type="image/png">
> <![CDATA[
> +--------+
> ++================>| User |
> || +--------+
> || ^
> +--------+ || +--------+ .
> | User +==++=========>| User | .
> +---+----+ || +--------+ .
> . || ^ .
> . || +--------+ . .
> . ++==>| User | . .
> . +--------+ . .
> . ^ . .
> . . . .
> V . . .
> +---+-----------------+------+------+---+
> | . . . . |
> | .................>. . . |
> | . . . |
> | ........................>. . |
> | . . |
> | ...............................>. |
> | |
> | Message Handling Service (MHS) |
> +---------------------------------------+
>
> Legend: === lines indicate primary (possibly indirect)
> transfers or roles
> ... lines indicate supporting transfers or roles]]></artwork>
> </figure>
--
Dave Crocker
Brandenburg InternetWorking
bbiw.net
More information about the rfc-interest
mailing list