Comparison between XML to SVG Transformation Mechanisms

The GraphML format use-case

Christophe Jolif (ILOG S.A.)

As XML formats become more and more widespread, a web developer has high probabilities ending up using XML at both extremities of his development workflow. If he needs rich display on his client he will use SVG, an XML grammar for vector graphics, for building the web user interface to his business data. These data themselves will probably be provided through an XML document using a business oriented XML grammar. Taking as example the workflow monitoring or modeling business, these data could be provided using the BPML XML language that would be translated to SVG to display the workflow as a graph on the end user web client.

The purpose of this paper is to present to the developers the alternatives they have when transforming business XML data to SVG for their presentation to the end user. In order to avoid sticking to a particular industry (such as the workflow one), which would require in-depth explanation of its language, we will take the example of a more abstract XML format that is able to describe graphs (and thus represents workflows): the GraphML format. We could easily see GraphML as a kind of intermediary format in-between the workflow XML document and the final SVG document. On the contrary of a lot of conversions from one XML grammar to another one, these two examples (BPML and GraphML) are interesting use cases because they are not straightforward transformations, they require more than a mapping from one format XML elements to the other one. For example BPML (or GraphML) only provides information about the workflow (or graph) structure and not the positioning or visual representation of the workflow activities (or graph nodes). That means the conversion will have to take that into account and organize the activities (or nodes) on the screen such that they are presented in a usable manner to the end user without being able to get that information from the original data.

In a first part we will describe in a nutshell what GraphML is, and how SVG can represent the content of a GraphML document.

We will then list the following main alternatives the developers have to translate GraphML documents to SVG providing some examples based on existing SVG technologies:

Finally we will conclude by summarizing the advantages and drawbacks of the different solutions and describing how several of them can be mixed to benefit from their complementary advantages.