Cover Pages Logo SEARCH
Advanced Search
ABOUT
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

NEWS
Cover Stories
Articles & Papers
Press Releases

CORE STANDARDS
XML
SGML
Schemas
XSL/XSLT/XPath
XLink
XML Query
CSS
SVG

TECHNOLOGY REPORTS
XML Applications
General Apps
Government Apps
Academic Apps

EVENTS
LIBRARY
Introductions
FAQs
Bibliography
Technology and Society
Semantics
Tech Topics
Software
Related Standards
Historic

Announcement: The XPath Visualiser


Date: Sun, 29 Oct 2000 16:40:45 -0400 (EST)
From: Dimitre Novatchev <dnovatchev@yahoo.com>
Reply-To: xsl-list@mulberrytech.com
To: xsl-list@mulberrytech.com
Subject: RE: RE: Announcement: The XPath Visualiser


README is here; announcement details follow

<!--    XPath Visualiser,
	 by Dimitre Novatchev, Apr. 2000.
	 mailto:dnovatchev@yahoo.com

This is a simple yet powerful tool for the evaluation of an XPath expression
and visual presentation of the resulting nodeset.

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

The expandable/collapsible syntax colour-coded display of the source
XML Document is the same as done by default by Internet Explorer.

This tool will best be used for:
-------------------------------
1. Composing the exact XPath expression when designing an XSLT stylesheet. 
2. As a "nodeset view" in a watch window of an XSLT debugger.
3. Learning and playing with XPath expressions.
4. As a good example how to process completely un-anticipated XML documents
   using "push processing".

Files in this distribution:
--------------------------
      623 authors.xml
    2,256 back42.jpg
   20,144 myDefaultss50.xsl
    3,371 Readme.txt
      496 topFrame.htm
      102 viewFrame.htm
    2,414 XPathMain.htm

To start the XPath Visualiser:
-----------------------------
1. Unzip the XPathVisualiser.zip file in a separate directory.
2. Double-click on XPathMain.htm


This is a customisation of the original DEFAULTSS.XSL 
written by Johnatan Marsh. 
The changes that had to be made are listed below:
------------------------------------------------

1. The original stylesheet was modified to work 
with the XSLT default namespace uri: 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

2. A global parameter named "selectedNodes" was added.

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

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

Known issues:
------------
A bug in all MSXML processors, including the July one, sometimes
prevents the correct finding and hilighting of nodes that are 
specified by the XPath expression.

What happens is that sometimes, according to MSXML 
count(nodeset | member-node) != count(nodeset)

I have reported this bug to Microsoft twice (every month since June)
and every time got their assurance that the bug will be fixed...
Hopefully this will happen in the not so distant future.

Plans for the future:
--------------------
1. Provide a remote, web-server based XPath Visualiser.
2. Change the user interface into Netscape-compatible.
3. Integrate the XPath Visualiser into an existing editor/debugger 
(hopefully Corey Haines and Chris Stefano will be interested... :o))) )
 -->

Here are the title comments of Johnatan Marsh -- the author of the
original Microsoft default stylesheet:
-------------------------------------
<!--
  IE5 default style sheet, provides a view of any XML document
  and provides the following features:
  - auto-indenting of the display, expanding of entity references
  - click or tab/return to expand/collapse
  - color coding of markup
  - color coding of recognized namespaces - xml, xmlns, xsl, dt
  
  This style sheet is available in IE5 in a compact form at the URL
  "res://msxml.dll/DEFAULTSS.xsl".  This version differs only in the
  addition of comments and whitespace for readability.
  
  Author:  Jonathan Marsh (jmarsh@microsoft.com)
-->
------------------------------------

Change History:

28 Sep. 2000. 
Fixed a bug that hi-lighted the end-tag (in addition to the
start tag of a selected element.

27 Sep. 2000.  Fixed the following bugs found by Aung Aung (aaung@microsoft.com):
> 1. one thing, if I
> hit 'Enter' key  when my coursor is in the browse box, it flip to a 
> "This page is unable to display" page, I think you might want to fix it
>
> 2. <!-- ************** use apply-templates instead of value-of, or the text
> node won't be colored ************-->  
>  <xsl:apply-templates/>
>  <!--
>    <SPAN class="tx"><xsl:value-of select="."/></SPAN>
>    -->
> <!-- ************** END ************-->  


26 Sep. 2000. Fixed the following bugs found by Aung Aung (aaung@microsoft.com):

> 1. async property on the documents (style and source) should set to
> false
> before loading, or "attempt to modify a read-only node" error occurs.
> ( need
> to fix in htm file)
>
> 2. If the fileName is invalid the loadFile() got called infinately
> which
> crash IE. (need to check and not call doQuery() from inside
> loadFile()).
> 


 9 Sep. 2000. Submitted initially to vbxml.com.


--------------------------------------------------------------

Bryan,

> This is a useful tool.  It's easy to set up and use.  

Thank you for your high appreciation of the usefulness 
and ease of use of the XPath Visualiser.

Right now the latest drop contains an even enhanced version.
With the new functionality added, the XPath Visualiser 
is more of a full-blown XPath Interpreter, than just the 
node-set browser it was in the previous release.

In addition to XPath expressions that are evaluated to nodesets
the user can now enter expressions that are evaluated to scalars
(number or boolean or string).

Now it's possible not only to find a specific node-set within the
source xml document, but also to obtain its quantitative 
characteristics -- counts, sums, arithmetical and relational 
results, strings, substrings etc.

One good consequence is that info about hidden nodes (not present in
the text of the xml source) can now be obtained in this way.

>The URL in the note didn't work for me though. Thankfully Dimitre
>straightened me out.  I  actually had to go to:
>
>http://www.vbxml.com/downloads/files/xpathvisualiserseptember.zip
>
>to download it.

Yes, the links consist of all lowercase letters:
http://www.vbxml.com/files/downloads/xpathvisualiserseptember.zip
http://www.vbxml.com/downloads/files/xpathvisualiser.zip 

Once again, thank you for your interest in the XPath Visualiser.

Cheers,

----------------------------------------------

Date: Fri, 27 Oct 2000 14:02:17 -0700
From: bryan.s.schnabel@exgate.tek.com
Subject: RE: Announcement: The XPath Visualiser

This is a useful tool.  It's easy to set up and use.  

The URL in the note didn't work for me though. Thankfully Dimitre
straightened me out.  I  actually had to go to:

http://www.vbxml.com/downloads/files/xpathvisualiserseptember.zip

to download it.

- -----Original Message-----
From: Dimitre Novatchev [mailto:dnovatchev@yahoo.com]
Sent: Wednesday, October 25, 2000 6:22 PM
To: xsl-list@mulberrytech.com
Subject: Announcement: The XPath Visualiser


The XPath Visualiser is an interactive tool that hilights all nodes 
of a user-specified XPath expression's result-nodeset in a colour-coded

collapsible display of an xml source document. 

This tool is very convenient for anyone who is a stylesheet author, 
is interested to learn or just curious about building XPath
expressions. 

The XPath Visualiser can be used in different scenarios:
 1. Composing the exact XPath expression when designing an XSLT
stylesheet. 
 2. As a "nodeset view" in a watch window of an XSLT debugger. 
 3. Learning and playing with XPath expressions. 
 4. As an example how to process completely un-anticipated XML
documents using "push processing". 

The latest version of the XPath Visualiser can be downloaded at 
http://www.vbxml.com/files/downloads/XPathVisualiserSeptember.zip

Requirements: 
  The September release of MSXML 3.0 and IE 5.

The following works with earlier releases of MSXML 3.0, 
but has relatively limited functionality: 
http://www.vbxml.com/downloads/files/xpathvisualiser.zip 

Many thanks to Mike Kay -- this work was extremely influenced 
by the continuous help provided in all his answers to my questions.

Also thanks to Johnatan Marsh -- a customised version of his IE
defaultss.xsl stylesheet is the basis for this work. 
Any errors in the customised stylesheet are entirely mine.

I'd greatly appreciate any observations, remarks and suggestions 
for improvement of the functionality and efficiency of the tool.

Thanking you in advance,

Dimitre Novatchev.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Prepared by Robin Cover for The XML Cover Pages archive.


Globe Image

Document URL: http://xml.coverpages.org/xpathvisualiserAnn.html