Summary: Embed UML Sequence Diagrams in your wiki pages
Version: 1.0
Prerequisites: sdml2txt, Content v1.2 or above
Status: beta
Maintainer: Martin Fick
Categories: Markup

Questions answered by this recipe

  • How can I write and embed UML Sequence Diagrams in my wiki pages?
  • What is SDML?


This recipe allows you to easily create UML Sequence Diagrams in your wiki pages using a simple markup, SDML.

SDML or Sequence Diagram Markup Language

SDML is an extremely simplistic UML Sequence Diagram Markup Language. Here is some sample SDML along with a textual representation of the diagram it describes:

[Client, Proxy, DNS, Server
Query Name->
Answer IP<-
http GET >->

Sequence Diagram:

  Client          Proxy           DNS         Server
     |              |              |             |     
     |----------Query Name-------->|             |
     |<---------Answer IP----------|             |
     |--http GET -->|----------http GET -------->|

As you can see, there isn't much to describing a diagram. SDML is simple but flexible and aims to facilitate creating sequence diagrams with minimal effort and typing. SDML is inspired by abc music tablature notation language. For more information about writing SDML, visit here.


Download sdml.phpΔ, content.phpΔ and markupsamepass.phpΔ, copy them to cookbook directory and install them by adding to config.php:


Download the sdml2txt script, give it execute permissions and put it in your webservers path (or edit the sdml.php recipe file and harcdode its location).

Surround your SDML with the (:sdml:) and (:sdmlend:) tags.

The sdml markup pairs normally creates 3 output types: sdml, sd and inline. The first two types become links below the inline type. You may customize exactly which types you would like to display with the types= option to the (:sdml:) tag. So if you only want the inline text without the sdml and sd links, use: (:sdml types=inline:)

The default path for temporary and cache files is set to /var/tmp/content. If you would like to change this, do so with the $ContentCfgCacheDir variable in your config.php.

If you want to secure your sdml2txt converter from data entered by non authorized authors, you can set a preview key with $ContentCfgPreviewKey.


Release Notes

  • Version 1.0 - 2008/02/15 - Initial Version

See Also

  • Content v1.2 or above is required by this recipe
  • sdml2txt is also required by this recipe
  • Example Site where you can see this recipe in action and experiment with it



User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.