Sep 282015
 28th September 2015  Posted by at 9:05 am 1 Response »

In this blog post I describe how to generate a basic standalone HTML report from an XML file exported in The Open Group’s ArchiMate exchange format using an XSLT stylesheet.

In my last blog post I wrote about The Open Group’s ArchiMate exchange format and how its main purpose is to allow the exchange of ArchiMate models between conforming tools. I also mentioned that it could be possible to do more with an ArchiMate exchange file, and use XSLT (Extensible Stylesheet Language Transformations) to display the contents of the file in a human readable format. XSLT is a language for transforming XML documents into other documents or other formats such as HTML, plain text or PDF, and as an ArchiMate exchange file is in a fairly straightforward XML format this should be possible.

This idea was first brought to my attention (via Andrew Josey of The Open Group) by Thorbjørn Ellefsen, Security Architect for the Agency for Public Management and eGovernment (Difi) in Norway. Thorbjørn had suggested that this would be an avenue worth exploring and provided a simple XSLT file that demonstrated the process. This piqued my interest and so I took Thorbjørn’s XSLT file and played around with it to see if I could produce some interesting HTML that could be used as a proof-of-concept ArchiMate report. In this blog post I want to share the results of my experiments.

Generating the ArchiMate Exchange XML file

The first thing we need is an ArchiMate model saved in the correct format. In Archi I exported the “Archisurance” example model to The Open Group’s exchange format:


I named the output file as “Archisurance.xml”. You can download a copy of the file here.

Here are the first few lines of the file:

As you can see, it’s not exactly user-friendly, but we can use this file as the data input for something more useful. If you have exported the file yourself and viewed it, you may notice a slight difference between your copy and the one above. Note that the following line has been added near the start of the file:

This line is important. I manually inserted it in my copy of “Archisurance.xml” in order to denote that the contents of the XML file should be processed using the “elements.xsl” XSLT stylesheet. If you are using your own copy of the file, you also need to manually insert this line into the file using a text editor.

Adding the XSLT stylesheet

Next we need the XSLT stylesheet that will transform the data in the XML file into HTML. For this first example, we’ll display a table of all the elements (concepts) in the model. The file is called “elements.xsl” and you can download it here. Here’s what it looks like:

This stylesheet is basically an XML file with some HTML tags and XPath queries that will generate HTML using data from the “Archisurance.xml” file. There is a <style> section for some simple CSS, a <html> and <body> section for the HTML structure, and a <table> to display all of the ArchiMate elements. If we put the two files together we should see a result. But how do we do that?

Displaying the result

Normally, we would use a special processor or tool to combine the two files in order to generate an HTML file (the command line tool xsltproc on Linux/Mac, for example) but for this demonstration we can very easily display the result in a browser. However, be warned that this may only render correctly in Firefox or Internet Explorer. If the two files, “Archisurance.xml” and “elements.xsl” are in the same directory on your computer you can open the “Archisurance.xml” file in Firefox or Internet Explorer. It should look like this:


We can see the model name and description, the ArchiMate elements, their IDs, name, documentation (if any) and their type. The XSLT code generates a table of elements by looping through each <element> tag in the XML file and displaying the contents of the “identifier” attribute, the <label> tag, the <documentation> tag, and the “type” attribute. The table is sorted alphabetically on the “type” attribute because it is specified in this line:

Note that XPath is used as the query language for selecting the elements in the XML file.

It’s a good start. Perhaps we could also display the relationships in the model? Yes we can, by applying the same principles as we did with the elements. To demonstrate this I’ve created another XSL stylesheet, a file named “elements_relations.xsl” and you can download it here. This file is the same as the first XSL file, but I’ve added some code to display the ArchiMate relationships:

The code iterates through each <relationship> tag in the XML file and, using an XPath query, finds the relevant tags and attributes needed to display the data. Notice that there are two XPath queries that reference elements elsewhere in the file in order to display the Source and Target element names of each relationship. The code uses XSLT variables, “Source” and “Target”, to make things a little easier to create the XPath queries.

In order to display the results of this new XSLT stylesheet, we need to replace the line in the “Archisurance.xml” file so it references this new file:

Open up “Archisurance.xml” in Firefox or Internet Explorer again (or refresh).

Here’s a sample of some of the output that is generated:


As before, we can see the ArchiMate relationships, their IDs, name, source and target elements, and their type.

Displaying the structure

One of the features of The Open Group’s ArchiMate exchange format is to be able to (optionally) represent and exchange a given structure of the ArchiMate elements and relationships in the model. By this we mean an organization of elements, relationships, and views much like a table of contents in a book. Most ArchiMate tools allow you to organise ArchiMate elements and relationships in some kind of hierarchical structure. In Archi this is the tree in the “Models View”. This is something that can be usefully exported and imported into another tool.

So far we have displayed the elements and relationships as flat lists, but we can use this structural, or “organization”, information in the XML file to display a tree of links to the elements and relationships.

We need to use a new XSL file containing the new code, named “structure.xsl”, and you can download it here.

Once again, we have to replace the line in the “Archisurance.xml” file so it references the new file:

I won’t show the new code here this time, but you can take a look at it in a text editor. The XSLT code iterates recursively through each <item> tag in the XML file and then generates a hierarchical HTML list of elements, relationships and views with links to the corresponding entry in the tables of elements and relationships.

Open up “Archisurance.xml” in Firefox or Internet Explorer again (or refresh).

Here’s a sample of some of the output:


If you click on one of the links, it will jump to the corresponding element or relationship in the tables.

Further experiments – displaying the diagrams

Once I’d reached this point with my XSLT experiments I felt ready for a new challenge. I wanted to know if it would be possible to generate the actual ArchiMate diagrams (views) using XSLT. It turns out that it is possible, to a certain extent, by using SVG (Scalable Vector Graphics). What I achieved is only proof of concept, and I only got as far as displaying the elements as coloured boxes without connections, but it may be possible to take this further, or even come up with an alternative method perhaps by using a combination of Javascript and CSS.

To demonstrate this, we need another XSLT file, this time it’s named “views_experimental.xsl” and you can download it here.

Once again, we need to replace the line in the “Archisurance.xml” file so it references this new file:

Open up the “Archisurance.xml” file in Firefox (sadly, the SVG does not display in Internet Explorer). If you scroll to the end you should see some basic diagrams. Here’s an example:


As I said, this is very much proof of concept, and it needs much more work. It may turn out to be too onerous to generate the full diagrams using SVG, particularly when it comes to creating connections (they need bend-points, anchor points and so on) and I’m sure there is a better way to do this. This does, at least, demonstrate the possibility of generating diagrams from the raw XML file.


I’ve tried to show that it’s possible to use The Open Group’s ArchiMate XML exchange file and display some of the data as HTML using XSLT stylesheets. I’ve also shown that it’s possible to generate some basic diagrams from the data. All of this needs much more work, and I’m aware that this work is at proof-of-concept level.

But for me the important thing is that this clearly demonstrates that by using existing technologies based on XML, XSLT, HTML, and CSS one doesn’t have to resort to a proprietary tool in order to display and share that data. Both the data and the representations of that data can exist in an open, standalone format.

Personally, I think this is very cool and it would be nice to see some XSLT stylesheets created to display ArchiMate models in more interesting ways. For example, one might display a summary and preview of a model. Or it may be possible to take advantage of a model’s Properties (attributes) and use them as variables that could be parsed conditionally for output formatting. I think that the potential inherent in The Open Group’s ArchiMate exchange format is very exciting and I’d love to see if anyone can take this further.

Many thanks to Thorbjørn Ellefsen for drawing my attention to the potential power of utilising XSLT with The Open Group’s ArchiMate exchange format.

(All files can be found in GitHub)

Sep 142015
 14th September 2015  Posted by at 12:34 pm Comments Off on The Open Group’s ArchiMate Exchange Format and Archi 3.3

Some of you might have noticed that Archi 3.3 has been released. This latest version of Archi includes a new plug-in which supports The Open Group’s ArchiMate file exchange format. This represents the fruits of some years and months’ labour! I’ve been collaborating with The Open Group, and representatives from associated parties and tool vendors, for some time now to produce a file format that can be used to exchange single ArchiMate models between conforming toolsets. Finally, version 1.0 has been released!

The file format uses XML, which is backed by a validating XSD Schema. Why is this? Wouldn’t XMI be better? Well, yes it would if we had a MOF representation of ArchiMate. Currently, one doesn’t exist. Also, it’s very hard to agree exactly what should be formally represented in a persistence format, as against what can be usefully represented and exchanged using a persistence format. For example, ArchiMate symbols use colour to denote the different layers, and custom colour schemes can be employed to convey meaning. Clearly, this is not something that can be enforced in a specification. Probably the only things that can be enforced are the ArchiMate concepts and relations themselves. Views, viewpoints, and visual arrangements of those concepts and relations are, arguably, optional. A valid ArchiMate model could simply consist of a set of concepts and relations. However, this is probably not very useful in the real world, and so the exchange format seeks to provide a file format for describing and exchanging the most used aspects of ArchiMate models, optional aspects as well as mandatory aspects.

So, simply put, the aim of The Open Group’s ArchiMate file exchange format is to provide a pragmatic and useful mechanism for exchanging ArchiMate models and visual representations between compliant toolsets. It does not seek to create a definitive representation of an ArchiMate model. For that to happen, I believe many things would have to be formally declared in the ArchiMate specification. For this reason, many of the components in the exchange format are optional. For example, the ArchiMate 2.1 specification describes the use of attributes as a means to extend the language and provide additional properties to the concepts and relations. The specification does not rigidly mandate their use. However, many toolsets do support and encourage the use of attributes to create model profiles, for example. To support this, the exchange format provides a properties mechanism, consisting of typed key/value pairs. This allows implementers to (optionally) represent additional information for all of the concepts, relations and views.

Even though I have emphasised that the main use for the exchange format is exchange (the name is a bit of a giveaway here ;-)), another advantage of using XML/XSD for the file format is that it is possible to use XSLT to transform the XML ArchiMate model instances into HTML documents, reports, as input for a database, and so on. I would say that the potential for exploiting ArchiMate data in this way is huge.

The exchange format could also help with learning the ArchiMate language and Enterprise Architecture – imagine a repository of ArchiMate models (tagged with Dublin Core metadata to facilitate search and description) that could be used as a resource pool of model patterns and examples for those new to the language. One thing that I personally would like to see is an extensive pool of example models and model snippets as examples of good modelling practice. And using the exchange format, these models and snippets can be loaded into any supporting toolset.

Here are my five “winning features” for the ArchiMate exchange format:

  • Transparent
  • Simple
  • Well understood format
  • Pragmatic
  • Open

I’m sure that The Open Group’s ArchiMate exchange format will contribute to, and encourage the use of ArchiMate, and perhaps reassure users that their valuable data is not locked into any one vendor’s proprietary tool format. I personally think that this is a great initiative and that we have achieved a great result. Of course, nothing is perfect and the exchange format is still at version 1.0, so user feedback is welcome. With greater uptake the format can be improved, and we may see it being exploited in ways that we have not yet thought of!

(For more information about the exchange format, see here)

Mar 252015
 25th March 2015  Posted by at 2:44 pm Comments Off on Archi 3.2

We’re very happy to announce the release of Archi 3.2. This latest release of Archi adds some great new features to help you view and validate your models.

A new and improved HTML reporting feature allows you to interactively view your models in a browser. This feature has been developed by Jean-Baptiste Sarrodie and Quentin Varquet who use Archi in their work at Lafarge in Paris.

Also new is the Model Validator so you can check whether your models align with the ArchiMate 2.1 specification.

Dec 222014
 22nd December 2014  Posted by at 5:23 pm Comments Off on Solstice Update

Solstice Greetings! I thought I’d write a review of the latter half of 2014 and a brief update of where we are now before we move into 2015. So, what’s happened since the last blog post in July?

New Forums

In August we moved the forums to a new home at The Google Groups that we had been using before were cumbersome to manage and not very user-friendly. We hope that the new forums offer a better experience in sharing your discussions related to Archi and ArchiMate. The new forums allow you to upload screen-shots, share models, and open polls. If you’ve not already joined the new forums, we invite you to do so.

Archi 3

Archi version 3 was released at the end of September. This was the biggest and most important event of this year as we had been working on this version of Archi for some time. The main reason why this update is so important is that previous versions of Archi had been built upon the older Eclipse 3.x framework. However, Eclipse 3.x is no longer supported since version 3.8.2 released in 2013. Eclipse 4.x is now the new supported version and, after the elimination of some bugs in Eclipse, we managed to migrate the Archi code-base to this new Eclipse framework with only a relatively few changes. This means that we can move forward with development. At the same time we introduced some great new features including a new look and feel, import and export to CSV files, an improved Magic Connector, Find/Replace, export image to PDF and many other features and fixes. Personally, the migration to Eclipse 4.x has been a great relief because there was a point where I wasn’t sure if it was going to be possible due to a range of issues and bugs in the Eclipse code.

Archi 3.1

Archi 3.1 was released at the beginning of December and represents a fine-tuning of the work delivered in Archi version 3. This is a maintenance release that fixes a number of bugs and adds some useful, new features. The focus of Archi 3.1 has been to improve the user interface response time when working with larger models, and to implement stronger integrity checking when loading and saving models to disk. This work came about at a time when I was working with a relatively large ArchiMate model. I noticed a sluggishness in response in the Models Tree when many nodes were open and when changing Viewpoints in the diagrams. I spent about three or four weeks experimenting with different threading techniques and algorithms before finding the perfect combination that improved overall response times. At the same time I added some defensive measures that checked the integrity of models and files before saving to disk. Archi 3.1 provides a more robust and smoother user experience.

The Open Group ArchiMate Model Exchange File Format

An important initiative concerning ArchiMate itself has been the ongoing development of The Open Group’s ArchiMate Model Exchange File Format. This initiative is being led by Andrew Josey of The Open Group, and I have been contributing to the development process, as have some other ArchiMate tool vendors. The exchange format is a specification for a standard file format for the exchange of ArchiMate models between different tools. It is not intended to be a definitive persistence representation of an ArchiMate model as you might find for a UML model, for example, since the ArchiMate language has not been formalised enough to create something like a MOF or XMI representation. It is, however, an XML format (validated by a XSD Schema) that so far has proved that it is possible to exchange basic ArchiMate models and diagrams between ArchiMate-aware tools. To date these tools are Archi, BiZZdesign Architect, and Corso’s System Architect ArchiMate plug-in. Clearly this is good news for all stakeholders and I think is important for the ArchiMate language itself, particularly from the point of view of those learning the language. The exchange format will allow users to exchange their models without worrying about target tools and proprietary formats, which is very important for those who may be new to ArchiMate and who do not want to be locked into one tool or framework.


What now for Archi? As it is, Archi is great for the single, file-based, user. But of course the number one request is for repository and multi-user support. This is not a trivial feature to implement, and one that would require many months of hard work. In order to support a transactional-based and multi-user work-flow Archi will need to be re-implemented in a new (Eclipse-based) framework. This has been under investigation over these last few months and we are moving slowly towards this goal. This will be our focus in 2015. Archi 3.x will continue to be supported with bug fixes and small features, but at the same time we will shift our focus onto the longer term aim – Archi 4.


And finally I’d like to offer some thanks. I’d like to thank all Archi users for their support and encouragement in 2014. Also, a special thank-you is due to Jean-Baptiste Sarrodie for his incredible support, encouragement, evangelism, contributions and vision. I’d also like to thank Gerben Wierda, author of the essential book, Mastering ArchiMate, for his support and advice. Thanks are also due to David Rose, and Andrew Josey of The Open Group who have allowed me to participate in The Open Group’s ArchiMate Exchange Format project. And finally, I’d like to say a big thank-you to everyone who has kindly donated to Archi by Paypal. These donations have kept the wolf from the door and encouraged me to continue developing new features in Archi. So, once more…thank-you!

Dec 012014
 1st December 2014  Posted by at 2:38 pm Comments Off on Archi 3.1 Released and Plug-in Support

We’re pleased to announce the release of Archi 3.1. This is a maintenance release that fixes a number of bugs and introduces some small, new features. The focus of Archi 3.1 has been to improve the user interface response time when using large models, and to implement stronger integrity checking when loading and saving models to disk.

Archi 3.1 is available at the Download page.

We’ve also created a new Plug-ins Page where we will be able to offer additional functionality to Archi. The first plug-in available is an implementation of The Open Group’s ArchiMate Model Exchange File Format (Phase 1). This plug-in will be updated as the implementation progresses.

Sep 292014
 29th September 2014  Posted by at 2:34 pm Comments Off on Archi 3 Released

Archi 3 is here! It seems to have taken a long time to arrive but we’re pleased to be able to release it in time for the Autumn. We’ve worked hard to bring you a new version that is built on the latest version of the Eclipse platform. This ensures that Archi will continue to work on the latest versions of Windows, Mac OS X, and most Linux distributions.

New features include support for a new look and feel, import and export to CSV, an improved Magic Connector, find/replace, export image to PDF and many other features and fixes.

I’d like to thank all our users for their support and encouragement these last few months, and to Jean-Baptiste Sarrodie for his incredible support, encouragement, evangelism, contributions and vision. I’d also like to say a big thank-you to those people who have kindly donated by Paypal. These donations have kept the wolf from the door and encouraged me to continue developing new features.