Name

cx:ditaa — Draws diagrams with ditaa.

Synopsis

Input portPrimarySequenceContent types
source✔  text 
Output portPrimarySequenceContent types
result✔   
Option nameTypeDefault value
content-typexs:string?'image/png'
parametersmap(xs:QName, item()*)?()
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
  |   <p:input port="source" content-types="text"/>
  |   <p:output port="result"/>
  |   <p:option name="content-type" as="xs:string?" select="'image/png'"/>
5 |   <p:option name="parameters" as="map(xs:QName, item()*)?"/>
  |</p:declare-step>

Description

The cx:ditaa step constructs diagrams with ditaa (DIagrams Through Ascii Art).

The supported content types are the content types supported by the javax.imageio.ImageWriter class. At the time of this writing: image/png (or image/x-png), image/gif, image/jpeg, image/tiff, and image/bmp (or image/vnd.wap.wbmp)

XML Calabash is built with ditaa version 0.9.

Example

The ditaa user guide includes the example shown in Example 1, “Example ditaa source”. It renders to the image show in Figure 1, “Example ditaa”.

+--------+   +-------+    +-------+
|        | --+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+
Example 1Example ditaa source
Figure 1Example ditaa