Generating documentation for UML Use Cases (XML,XSL,XSD example included)

Capturing Use Cases is not easy at all, the Use Case diagram items are scarce and simple for an obvious reason, to keep the diagram simple and understandable. Just make a quick search in Google images for 'use case diagram' to get an astounding amount of examples of how badly the theory has been understood by many...

Someone misunderstood basic theory here...


Every diagram should be accompanied by the corresponding documentation where every element has to be described and cross referenced.

I highly recommend using professional UML tools to generate diagrams, but as soon as you place documentation in them, you are linked to their brand, and even when xmi should allow easy export of project information, it seems not to. A workaround to this consists on using them to draw the diagrams and keeping the documentation, which becomes as valuable or more than the diagrams as it grows in size, in a separate easy-to-export-and-maintain format.

Keeping project documentation in XML is a good idea only if the corresponding XML is strongly typed and well defined in an XSD. To print the documentation  an XSL stylesheet is of great help.

Once these documents are defined, a general XML editing tool can be used to document use cases and link them to their diagrams in an easy and comfortable manner.

A free and useful tool is XML Notepad 2007, even being 7 years old now, it works nicely and makes working with XML easier. Sure there are good free and commercial alternatives for those who are in love with UNIX systems.


It can be downloaded from Download XML Notepad 2007 from Microsoft, hope they update it soon.

Given the XML file, it automatically uses the associated XSD and XSL to maintain its structure and provide a not-so-good visualization. For proper visualization I personally prefer using Firefox.

So here you have, a base template for capturing your requisites and publish the associated documentation, you may want to adjust the XSD and XSL to your specific needs.

Download the XML Schema Definition.
Download the XSL Stylesheet.
Download the example XML.

Hope you find them useful.

Comments

  1. How about using a UML maker or a desktop or online application that supports xml for drawing uml diagrams. I saw a tutorial somewhere regarding this.

    ReplyDelete
    Replies
    1. Sure, once the diagrams are generated they can be linked into their correspondig documentation easily.

      Delete

Post a Comment

Popular posts from this blog

Qt Signals and Slots, Connecting and Disconnecting

Vaadin 7: Detect Enter Key in a TextField

JAVA JPA WITH HIBERNATE AND H2 Tutorial