BizTalk Utilities CV ,   Jobs ,   Code library
Home Page

Add/Edit your code items
Search the code library
Browse for the code library

The Magic of xsl:key
max() function in xslt
Re: max() function in xslt
max() function, by msxsl:script
Padding with XSLT
Preceding-subling XSL
Basic Shapes to Paths with TinyLine
XML to CSV using XSLT
Cross-Browser display of XML/XSL
Cross Reference Lookup in XSLT using XML file as Xref table
Recursion reminds me of Recursion (9 XSLT Recursion examples)
XSLT Sort - output entire xml file with new sort order
Variable Variables
Cross Reference Lookup in XSLT using embedded XML
XTrans 1.0
XML Explorer 2.5
Create an N-Column Table from XML node-set
XSLT Select Option Example
XSLT Date filtering, sorting, comparing, and evaluating


<< XQuery.NET and XML >>

By Dimitre Novatchev
First Posted 12/21/2002
Times viewed 5782

XPath Visualizer for the Mozilla browser

This post contains attachments 

Summary This is an implementation of the popular XPath Visualizer, which now can work with a Mozilla browser

This is an implementation of the popular XPath Visualizer, which now can work with a Mozilla browser.

To use, download the attached zip file, uncompress it in a separate folder and follow the guidelines in the Readme.txt file.

Here's the text of the Readme.txt file:

XPath Visualiser for Mozilla,
by Dimitre Novatchev, Dec. 2002.

This is a full blown Visual XPath Interpreter for the evaluation of XPath expressions and visual presentation of the resulting nodeset or scalar value.

The XPath Visualiser's value as an XSLT and XPath learning and authoring tool results from its ability to present the results of any XPath expression in an immediate, appealing and straightforward visualization. 

The source XML Document is displayed with any node hi-lighted that satisfies the XPath expression. 

In case the expression evaluates to a scalar (string | number | boolean) then the result is displayed in a separate window.

The expandable/collapsible syntax colour-coded display of the source
XML Document is the same as the one of the XPath Visualizer for Internet Explorer.

This tool will best be used for:
1. Composing the exact XPath expression when designing an XSLT 
2. As a nodeset view in a watch window of an XSLT debugger.
3. Obtaining any quantitative measures of the xml source 
by evaluating expressions that return a scalar.
4. Learning and playing with XPath expressions. 
5. As a good example how to process completely un-anticipated XML 
documents using push processing.

Files in this distribution (XPathVisualiser for Mozilla -- Ver. 1.0):
799 authors.xml
813 authors3.xml
2,256 back42.jpg
11 error.html
1,136 errorTest.htm
9,132 MB_crossBrowserXML.js
17,063 mozDss4.xsl
3,901 Readme.txt
552 test1.xml
2,489 topFrameNS.htm
129 viewFrame.htm
6,896 XPathMainNS.htm 

To start the XPath Visualiser:
1. Unzip the distribution file you downloaded in a separate directory.

2. Double-click on XPathMainNS.htm

This is a customisation of the original XMLPrettyPrint.xsl 
written by Jonas Sicking .

The changes that had to be made are listed below:

1. The CSS styles were modified, so that the fonts and colours used are the same as those of XPath Visualizer's IE version.

2. The modifications above include detecting namespace nodes, although in a limited way, because Transformiix does not implement the namespace axis nor does it implement a mechanism for user-defined extension functions.

3. A global parameter named selectedNodes was added.

4. Additional logic was added to all templates 
to recognise whether the current match belongs to
the $selectedNodes nodeset.

5. All nodes that belong to the $selectedNodes nodeset 
are treated in a special way - hi-lighted.

Used is a variant of cross-browser Javascript interface to Mozilla's 
implementation of XSLT, kindly made available to me by Manos Batsis 

1. Many thanks to Manos Batsis for his help in getting aquainted with the interfaces of Mozilla's implementation of XSLT .

2. Many thanks to Jonas Sicking for allowing me to use and modify his XML Prettyprinting stylesheet.

1. Mozilla 1.2 or later

Plans for the future:
1. Remember entered XPath expressions -- as in the IE version.

2. Allow the user to specify xsl:variable-s and reference their names in XPath expressions -- as in the IE version.

3. Allow the user to specify xsl:key-s and reference their names as arguments of the key() function in XPath expressions -- as in the IE version.

Change History:

21 Dec. 2002. Submitted initially to

Rate this article on a scale of 1 to 10 (2 votes, average 6)

Your vote :  

<< XQuery.NET and XML >>

Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:


    Email TopXML