<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO8859-1"> <title>Vizant examples</title> <link rel="stylesheet" href="main.css" media="all"> </head> <body> <h1>Vizant Examples</h1> <p class="updated">$Date: 2002/06/17 13:15:55 $ - [ English | Japanese ]</p> <h2>About this page</h2> <p>This page shows some examples of <a href="index.html">Vizant</a> output.</p> <ul> <li><a href="#ant">Ant 1.5beta1 - build.xml</a></li> <li><a href="#log4j">Log4J 1.2 - build.xml</a></li> <li><a href="#tomcat">Tomcat 3.3.1 - build.xml</a></li> </ul> <h2><a name="ant">Ant 1.5beta1 - build.xml</a></h2> <p>The most simple way to create image from buildfile is like this.</p> <blockquote> <target name="main"><br> <strong><vizant antfile="build.xml" outfile="build.dot"/></strong><br> <exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec><br> </target> </blockquote> <p>The vizant task creates <a href="./ant15b1/ant15b1_1.dot.txt">build.dot</a>, then the <a href="http://www.research.att.com/sw/tools/graphviz/" target="_blank">Graphviz</a> <a href="http://www.research.att.com/~erg/graphviz/info/command.html" target="_blank">dot command</a> produces the next image.</p> <p><a href="./ant15b1/ant15b1_1.png"><img src="./ant15b1/ant15b1_1s.png"></a></p> <p>The <strong>from</strong> attribute cut down the branches that the target doesn't depend on. </p> <blockquote> <target name="main"><br> <vizant antfile="build.xml" outfile="build.dot" <strong>from="distribution"</strong>/><br> <exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec><br> </target> </blockquote> <p><a href="./ant15b1/ant15b1_2.png"><img src="./ant15b1/ant15b1_2s.png"></a></p> <p>In the same way, the <strong>to</strong> attribute cut down the branches that the target isn't depended from. </p> <blockquote> <target name="main"><br> <vizant antfile="build.xml" outfile="build.dot" <strong>to="prepare"</strong>/><br> <exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec><br> </target> </blockquote> <p><a href="./ant15b1/ant15b1_3.png"><img src="./ant15b1/ant15b1_3s.png"></a></p> <p>You can set <a href="http://www.research.att.com/~erg/graphviz/info/attrs.html" target="_blank">DOT attribute</a> using nested elements: <strong>attrstmt</strong>, <strong>attr</strong> and <strong>subgraph</strong>. </p> <blockquote> <target name="main"><br> <vizant antfile="build.xml" outfile="build.dot"><br> <br> <strong> <attrstmt type="node"><br> <attr name="URL" value="javascript:alert('\N');"/><br> <attr name="color" value="grey90"/><br> <attr name="style" value="filled"/><br> </attrstmt><br> <br> <attrstmt type="edge"><br> <attr name="color" value="grey70"/><br> </attrstmt><br> <br> <attrstmt type="edge.antcall"><br> <attr name="label" value="antcall"/><br> <attr name="fontcolor" value="gray70"/><br> <attr name="fontsize" value="9"/><br> </attrstmt><br> <br> <attrstmt type="node.default"><br> <attr name="color" value="pink"/><br> </attrstmt><br> </strong> <br> </vizant><br> <br> <exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec><br> <exec executable="dot" ><arg line="-T<strong>svg</strong> build.dot -o <strong>build.svg</strong>"/></exec><br> </target> </blockquote> <p>The above target creates <a href="./ant15b1/ant15b1_4.dot.txt">build.dot</a> and the next image.</p> <p><a href="./ant15b1/ant15b1_4.png"><img src="./ant15b1/ant15b1_4s.png"></a></p> <p>This sample also creates <a href="./ant15b1/ant15b1_4.svg">SVG format file</a>.</p> <h2><a name="log4j">Log4J 1.2 - build.xml</a></h2> <p><a href="./log4j12/log4j12_1.png"><img src="./log4j12/log4j12_1s.png"></a></p> <p><strong>from</strong>="chainsaw"</p> <p><a href="./log4j12/log4j12_2.png"><img src="./log4j12/log4j12_2s.png"></a></p> <p><strong>to</strong>="init"</p> <p><a href="./log4j12/log4j12_3.png"><img src="./log4j12/log4j12_3s.png"></a></p> <p>with the attributes same with above Ant sample.</p> <p><a href="./log4j12/log4j12_4.png"><img src="./log4j12/log4j12_4s.png"></a></p> <p><a href="./log4j12/log4j12_4.svg">SVG file</a></p> <h2><a name="tomcat">Tomcat 3.3.1 - build.xml</a></h2> <p><a href="./tomcat331/tomcat331_1.png"><img src="./tomcat331/tomcat331_1s.png"></a></p> <p><strong>from</strong>="dist"</p> <p><a href="./tomcat331/tomcat331_2.png"><img src="./tomcat331/tomcat331_2s.png"></a></p> <p><strong>to</strong>="prepare"</p> <p><a href="./tomcat331/tomcat331_3.png"><img src="./tomcat331/tomcat331_3s.png"></a></p> <p><strong>from</strong>="dist" <strong>to</strong>="prepare"</p> <p><a href="./tomcat331/tomcat331_5.png"><img src="./tomcat331/tomcat331_5s.png"></a></p> <p>The next example add some more attributes.</p> <blockquote> <target name="main"><br> <vizant antfile="build.xml" outfile="build.dot"><br> <br> <strong> <attrstmt type="graph"> <!-- make graph larger --><br> <attr name="ranksep" value="1.2"/><br> <attr name="nodesep" value="0.5"/><br> </attrstmt><br> </strong> <br> <attrstmt type="node"><br> <attr name="URL" value="javascript:alert('\N');"/><br> <attr name="color" value="grey85"/><br> <attr name="style" value="filled"/><br> </attrstmt><br> <br> <attrstmt type="edge"><br> <attr name="color" value="grey70"/><br> </attrstmt><br> <br> <attrstmt type="edge.antcall"><br> <attr name="label" value="antcall"/><br> <attr name="fontcolor" value="gray70"/><br> <attr name="fontsize" value="9"/><br> </attrstmt><br> <br> <attrstmt type="node.default"><br> <attr name="color" value="pink"/><br> </attrstmt><br> <br> <strong> <subgraph><br> <attrstmt type="graph"><br> <attr name="style" value="filled"/><br> <attr name="color" value="grey95"/><br> </attrstmt><br> </subgraph><br> </strong> <br> </vizant> <br> <exec executable="dot" ><arg line="-Tpng build.dot -o build.png"/></exec><br> <exec executable="dot" ><arg line="-T<strong>svg</strong> build.dot -o <strong>build.svg</strong>"/></exec><br> </target> </blockquote> <p>The above creates <a href="./tomcat331/tomcat331_4.dot">build.dot</a> file and the next image and SVG file.</p> <p><a href="./tomcat331/tomcat331_4.png"><img src="./tomcat331/tomcat331_4s.png"></a></p> <p><a href="./tomcat331/tomcat331_4.svg">SVG file</a></p> <hr> <address><a href="http://www.teria.com/~koseki/index_en.html">KOSEKI Kengo</a> <<a href="mailto:kengo@tt.rim.or.jp">kengo@tt.rim.or.jp</a>></address> </body> </html>