Design
-
Several XSLT stylesheets (for formatting) managed via several xsl-stylesheet
processing instructions
-
two stylesheets applied to the document: one for querying the data, one
for formatting
-
the XPath generator GUI makes use of object-orientated Javascript programming
(Reference book: Javascript - the definite guide, by David Flanagan - O'Reilly
publisher); it has an object model of an XPath string
-
use of the terminal part of the URL to obtain the URL of the XML data,
e.g..:
http://wwbota.free.fr/Generic/XMLClient.htm?URL=http://www.mycom.com/mydata.xml
This is in the reverse way to the normal use (i. e. from URL to browser,
instead of from browser to server via URL).
-
the analysis of the document ("implicit schema") makes use of a generic
DOM iterator following the Visitor design pattern (function applyRecursive);
since in Javascript a function is also an object it allows to gather any
information in the visiting function itself.
Possible enhancements
Functional enhancements:
-
enhance ergonomy
-
better representation of the schema (maybe with embeded HTML lists)
-
Add buttons : "Remove XPath Step" "Remove XPath constraint";
-
make a pulldown menu for n possible XSLT stylesheets associated to the
XML data;
-
update the generated XPath string at each user input, or very often via
a setTimeout() call
Code and design enhancements:
-
suppress IE non-portable Javascript items: document.all , for= , ...
-
It should be possible to adapt this page for other browsers, either with
the Xalan applet, or with Mozilla's new XSLT functionalities;
-
Also desirable would be the generation of a skeleton DOM document to record
the structure of the instance document, instead of the simple associative
array with XPath strings that is currently used.
-