XSLT
XSLT Contents
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. mailto:dnovatchev@yahoo.com 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 stylesheet. 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 (mbatsis@users.sourceforge.net, http://sourceforge.net/projects/bb-xedit/) Acknowledgements: ---------------- 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. Requirements: ------------ 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 topxml.com.
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting