configviz
This is a little tool that can visualize your configuration. It is a set of xsl stylesheets that can convert a configuration into a "dot" file which can be process by graphviz (http://www.graphviz.org
). Graphviz is a tool that draws directed graphs as hierarchies. It takes a "dot" file as input and can generate various kinds of resulting output like jpg, ps, png and much more.Which stylesheet
The tool includes three different stylesheets. It depends on the type of configuration that you use.
- default: config2dot.xsl
- advanced: advanced_config2dot.xsl
- nested: nested_config2dot.xsl
Examples
You can see an example for every configuration format when you open this pdf file
. These three examples are also part of the release.How to use it
Actually this is only a set of xsl stylesheets. One stylesheet for every kind of configuration. All you need is to take any kind of tool that can transform an xml file with an xsl file. Choose the right xsl stylesheet for your configuration and that's it.
Using ANT
ANT has a built in task for transforming xml files. This example assumes that you have your configuration file (called advanced_config.xml) and the correct xsl file in the same directory. When you have graphviz installed you can put in the following into your build.xml:
<property name="dot.dir" value="/usr/local/graphviz/bin"/>
<target name="advanced-transform">
<style basedir="." destdir="."
extension=".dot"
style="advanced_config2doc.xsl"
includes="advanced_config.xml"/>
<exec executable="${dot.dir}/dot" >
<arg line="-Tjpg advanced_config.dot -o advanced_config.jpg"/>
</exec>
</target>
Please adjust the property called "dot.dir" to the bin directory of your graphviz installation.
The first step in the target will transform the configuration into a dot file. Next step is to call dot to generate a jpg-file of the generated dot. Now you have an image that shows your configuration.
Download
Please refer to the download section to download the latest version. The release includes examples for each kind of configuration formats.