A Visualization Tool for XPath
Date: Wed, 15 Dec 1999 10:52:35 -0500 From: Khun Yee Fung <kyeefung@extend.com> To: xsl-list@mulberrytech.com Subject: Announcement: A Visualization Tool for XPath
I have written an XPath visualization tool. The tool allows you to choose an XML file as the initial XML document. The XML document is then shown as a tree (JTree in Swing). After that, you can specify XPath expressions and step through the execution of the expressions. The nodes selected in each step (can be a big step, a small step, or a baby step, or no stepping at all) are highlighted on the tree. A context tree is also presented so that the context of an XPath expression (like the context of a location path inside a predicate of another location path) can be shown. The execution stack of the context is also displayed when a context is chosen.
The user can also select a node of the JTree as the initial context node of an XPath expression. This is how relative location paths are handled.
The tool is meant as a learning tool for XPath. It implements nearly all the features of XPath, including the additional functions in XSLT. I am adding the additional functions from XPointer very soon. The only missing feature right now is the key() function. The document() function has been implemented and all documents included by the function are shown as JTrees as well (in different tabs of a tabbedpane).
The tool uses the SAX and SAX2 interfaces from Xerces-1.0. If there is a better choice than that I would like to know. I changed from using DOM to SAX and SAX2 after realizing that I would need my own internal representation for the trees in any event. Java 1.2.2 is my JVM and Xerces is the only other package you need to install to run the program.
The program is in alpha quality. Error checking and recovery are not good at all. But it is fun to see how XPath works step by step. I will get it to beta quality and produce a user guide and a JavaDoc by January 14.
I don't have a web site to put the program on so for now if you are interested, send me an email and I will send you the program. Please send it to khunyee@hushmail.com as it is the address that I can access from home and work.
[Note on access: The tool is available for download.]
Regards,
Khun Yee
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Prepared by Robin Cover for the The SGML/XML Web Page archive.