| ZVON > Graphotron > download |
| Intro / Search / ZVON |
| | graphotron | daVinci | vcg | dot | tutorial | >> download << | about | |
ZvonGraphotron is the reference implementation of Graphotron. It can be used and freely modified without any restriction as long as the contribution of ZvonGraphotron is acknowledged and the following link is mentioned: http://www.zvon.org/ZvonSW/ZvonGraphotron/
At this moment the Zvon Graphotron supports following outputs:
Zvon Graphotron is implemented in XSLT. It requires a processor which lifts result tree fragment restrictions (it uses XPaths like "$XXX/aaa/bbb"). This restrictions will be lifted in XPath 2.0 and so any XPath 2.0 compatible processor should work with ZvonSchematron. This implementation has been developed using Saxon 6.x (http://saxon.sourceforge.net/). If there are other processors which were confirmed to work, please, let me know.
All application specific outputs share a common stylesheet: graphotronShare.xsl and
an output specific part: graphotronDot.xsl, graphotronDaVinci.xsl, graphotronVCG.xsl, and graphotronProlog.xsl.
They can be all downloaded as a single file: zvonGraphotron.zip or zvonGraphotron.tar.gz.
The compilation proceeds in two steps. In the first step an intermediate stylesheet is generated by application of ZvonGraphotron on a graphotron XML file, e.g.:
saxon -o tmp.xsl graph1.xml graphotronDaVinci.xsl
The generated XSLT stylesheet (it also uses XPath selections in variables, and so it will not work with XSLT 1.0) is then applied to one or many XML source files:
saxon -o final.daVinci source.xml tmp.xsl
In our example the file final.daVinci can be now opened with the daVinci program:
daVinci final.daVinci
Similarly, a dotty ( a part of Graphviz package) graph is generated in following steps:
saxon -o tmp.xsl graph1.xml graphotronDot.xsl
saxon -o final.dot source.xml tmp.xsl
dotty final.dot
Graphiz package supports also output to SVG. Using the example above the SVG output would be generated as :
saxon -o tmp.xsl graph1.xml graphotronDot.xsl
saxon -o final.dot source.xml tmp.xsl
dot -Tsvg final.dot
I am running graphotron using a very simple Python script. If you write your own scripts or other tools simplifying ZvonGraphotron execution, please, send it to me. I will publish it as a part of this section.