How do I render DotML into a chart? According to the website here:
Getting graphs from your data is a three-step process. First, generate or manually type a >XHTML (or any other XML) file that contains DotML elements.
Use "http://www.martin-loetzsch.de/DOTML" as the namespace identifier for DotML elements. >If you want to validate your DotML elements, use the DotML Schema.
Second, apply the script "generate-svg-graphics.bash" on the input file. It applies the >dotml2dot.xsl stylesheet and generates a SVG chart and a CSS file containing the size of >the SVG chart for each DotML graph element. Please have a look into "generate-svg->graphics.bash" for required environment variables and parameters.
Third, if the DotML graph is embedded into an XHTML document, the XSLT stylesheet "embed->svg-graphics.xsl" replaces the DotML graph elements by the inclusion of the generated >SVGs. Please look into "embed-svg-graphics.xsl" for details.
I have the typed XML already, but I do not know what the rest of the steps mean. If anyone could explain how to do this at a very simple level that would be fantastic.
DotML is an alternative XML-based syntax for the dot language used to drive the GraphViz program. The normal way of using it is to convert the DotML to dot, and then run GraphViz to generate SVG. The way I do it (from Ant) is here:
<target name="dot-files" depends="merge-catalog" if="build.spec" unless="spec.exists">
<xslt in="${merged-spec.xml}" out="${dist.dir}/Overview.html" style="style/xslt-diff.xsl"
force="yes" classpathref="saxon9.classpath">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/initialMode" value="make-dot-files"/>
</factory>
<param name="baseline" expression="${baseline}"/>
<param name="show.diff.markup.string" expression="0"/>
</xslt>
</target>
<target name="diagrams" description="Process all the diagrams in the img directory"
depends="dot-files">
<foreach target="diagram" param="diagram">
<path>
<fileset dir="${dist.dir}/img">
<include name="*.dot"/>
</fileset>
</path>
</foreach>
</target>
<target name="diagram">
<echo message="Converting diagram ${diagram}"/>
<basename property="name" file="${diagram}" suffix=".dot"/>
<echo message=" to ${dist.dir}/img/${name}.svg"/>
<!-- Requires "dot" to be on the path. dot is part of GraphViz. Location might be GraphViz2.24/bin/dot-->
<exec executable="dot">
<arg line="-o${dist.dir}/img/${name}.raw.svg -Tsvg ${diagram} "/>
</exec>
<xslt in="${dist.dir}/img/${name}.raw.svg" out="${dist.dir}/img/${name}.svg" style="style/tidy-graphviz-svg.xsl"
force="yes" classpathref="saxon9.classpath"/>
</target>
My case is a bit different because I'm starting with a document that contains multiple diagrams in an XML vocabulary that first needs to be transformed to DotML.