Transcript
Page 1: [IEEE 22nd International Conference on Data Engineering (ICDE'06) - Atlanta, GA, USA (2006.04.3-2006.04.7)] 22nd International Conference on Data Engineering (ICDE'06) - XPlainer:

XPlainer: An XPath Debugging Framework

Mariano P. ConsensUniversity of Toronto

[email protected]

John W.S. LiuUniversity of [email protected]

Bill O’FarrellIBM Toronto [email protected]

XML is an important practical paradigm in informationtechnology and has a broad range of applications. How toaccess and retrieve the XML data is crucial to these ap-plications. There are two standard ways for accessing andmanipulating XML data, the Simple API for XML (SAX)and the Document Object Model (DOM). However, whenan application needs to traverse through XML data, it is noteasy to retrieve the required data with these two standardways. XML data is impossible to be retrieved back andforth by SAX, and the graph-oriented DOM notation is noteasy to work with. With such limitation, the W3C super-vises the development of three important languages: XPath[3], XQuery and XSLT for exploring and querying XML.Among these three languages, XPath is the key and corner-stone language for the other two. XPath defines expressionsfor traversing an XML document and specifies the set ofnodes (XPath 1.0) or the sequence of nodes (XPath 2.0) inthe XML document.

However, XPath has limitation in the other direction. Be-sides the simple data typed result, the most important resultof XPath is the selected node set or node sequence in theXML tree. With the current XPath semantics, we can onlyaccess the final selected node set or sequence. Once theXPath evaluation is completed, those intermediate nodesthat are associated with the XPath steps are totally forgotten.It would be very useful in many applications if we could ob-tain all intermediate nodes to see how the XPath traversesin the XML tree.

Debugging XPath expressions is such an application thatcan make use of XPath path nodes information. In this sce-nario, we need to retrieve the intermediate path nodes inthe XML tree to explain how an XPath expression traversesthe XML tree while being evaluated and how the predicateexpression filters out those nodes. Just like showing the in-termediate variables during a debugging process, the XPathpath node information can help the user to retrieve the in-termediate results for each XPath step.

Based on this idea, we develop a visual XPath debuggingframework called XPlainer shown in the Figure 1. Froma data visualization point of view, we can consider XPathexpression as a filter to select relevant nodes to highlight

Figure 1. XPlainer Perspective within Eclipse

[1]. XPlainer utilizes the intermediate path node informa-tion to extend the XPath filter definition and then to supportvisual navigation in the XML tree. Comparing with otherXPath evaluators, XPlainer has the following distinct fea-tures. XPlainer Highlights the intermediate nodes that sat-isfy the XPath expression in an XML editor, showing thecorrespondence to the XPath steps as well; XPlainer ex-plains predicate sub-expressions by highlighting the XMLnodes that satisfy the predicate; The user can interactivelycollapse and expand the XPath expression within XPlainerand partially evaluates sub-expressions; XPlainer retainspolynomial time complexity while being capable of display-ing an exponential number of possible “explanation”; For-mal Semantics of the XPath extension for XPlainer is alsoprovided in the paper[2].

References

[1] M. P. Consens, F. C. Eigler, M. Z. Hasan, A. O. Mendelzon,E. G. Noik, A. G. Ryman, and D. Vista. Architecture andapplications of the hy+ visualization system. IBM SystemsJournal, 33(3):458–476, 1994.

[2] John W.S. Liu. XPlainer: An XPath Debugging Framework,2005. Master Thesis, University of Toronto.

[3] W3C. XML Path Language (XPath) 2.0, 2005.http://www.w3.org/TR/xpath20/.

Proceedings of the 22nd International Conference on Data Engineering (ICDE’06) 8-7695-2570-9/06 $20.00 © 2006 IEEE

Top Related