XSLT applications, Using xslt

Applications

1. Are there any applications of XSLT
2. XSLT ide
3. ANN Schematron 1.5
4. [ANN] Zvon XSLTracer
5. The XPath Visualiser
6. XSLT applications
7. Applications for Learning XPATH
8. ANN: XSLTDoc
9. [ANNOUNCE] XSLT-process 2.1 available
10. XMLStarlet Command Line XML Toolkit

1.

Are there any applications of XSLT

DaveP

This is an announcement for "The Schematron", which is a tree-pattern schema language built on top of XSL.

Example of error browser: www.ascc.net/xml/resource/schematron/DavidCarlisle/schematron-frame.html

Schematron home page: http://www.ascc.net/xml/resource/schematron/schematron.html The basic idea is to piggyback on top of XPath. I think the resulting language is pretty good: trivial to implement, easy to use, and very powerful. It allows validation of structures that cannot be found using regular grammar-based schema languages.

It is an open source project; I am in particular trying to get a language that is useful for "overlaying" schemas (e.g. for best practise, variants and debugging) rather than "defining" schemas (which XML Schemas is addressing.) Anyone who wants to contribute some code or ideas to this, please feel free.

To which Nic Miloslav added: Schematron tutorial at Zvon I have just published the first version of Schematron tutorial at: http://zvon.vscht.cz/HTMLonly/SchematronTutorial/General/contents.html

There is a lot of work to be done to make it really useful but it demonstrates some strength of Schematron.

If I can speak for myself with Schematron a dream come true. This was precisely the tool I was looking for. And I actually missed it the first time. I had seen the announcement some time ago. Then, on this Friday, I have seen it mentioned in a message at comp.text.xml, peeped in and was trapped. This week I have started to play with it and I have realized that it solves many problems I had so far with XML validation. It is superbly simple, elegant, XPath based and already implemented!

More recently, Rick announced:

The Topologi Schematron Validator is a tool for checking XML documents against the assertions in a Schematron schema.

You can validate one or several XML documents using DTDs, W3C XML Schemas and Schematron, view the results in a convenient linked-view browser, automatically generate RDF statements or Topic Maps, edit the results, print the results, and save the results. A variety of Schematron schemas have been included in this distribution, including RSS, RDF, SOAP, SMIL, WSDL, QAML, XTM, XLink, WAI XHTML, RDDL XHTML, CALS tables and, of course, Schematron 1.5 itself.

See topologi.com

Percussion Rhythmyx - virtual XML data server, visual designer maps relational databases to XML, run-time engine serves data as either XML, HTML (via XSL), or binary content.

Rhythmyx XSpLit - goes "backwards" from HTML files to XSL and XML. You start with an HTML file containing both content and format, then add labels to define the content on the page (using straight text or the "id" attribute of existing HTML tags). XSpLit parses the page, separating the content definition into an XML DTD and the formatting into an XSLT style sheet. The style sheet will thus produce an HTML page that looks like the original HTML but with any other XML content that conforms to the associated DTD. Supports repeated formatting for repeated XML fields, nested formatting, attributes, etc. XSpLit currently ships as part of Rhythmyx but can be run separately after the Rhythmyx installation.

More info and free evals available. http://www.percussion.com

2.

XSLT ide

Martin Rowlinson

Marrowsoft Limited announced the public Beta release of their Xselerator product - a fully integrated XSLT IDE. Xselerator Beta is available as a 30-day trial from...Marrowsoft

Some of the rich features of Xselerator are:-

XSLT debugger:-
Full stepping capability;
Breakpoints on both XSLT and input XML;
Conditional breakpoints;
View template call stack;
Watch values (including full XPath expression watches);
Optional stepping into built-in rules
Uses MSXML3 transformations (so that debugging session behaviour matches a real, production environment transformation engine);
Clear and easy to use IDE;
XSL/XSLT element and attribute intuitive (like 'intellisense' or 'code insight') drop-downs;
HTML element and attribute intuitive drop-downs;
Automatic tag completion - in XSL/XSLT tag completion follows model and, optionally, fills element with mandatory attributes;
Wizards for building tables, selects/listboxes and XSLT grouping/distinct expressions;
XPath query analyser (test XPath queries to see the resulting node sets - click on resulting list item to view position to node in source/tree view);
One click transformation test;
Use of alternative command line transformation engines (e.g. Instant Saxon, XT, etc.) Full transformation testing (including XSL parameter passing, start mode and output test path);
Full XSL,XSLT,XML and HTML colour syntax highlighting (fully customisable);
All the usual editor capabilities (cut, copy, paste, find, replace) plus special 'Copy as RTF' and 'Copy as HTML' features allowing syntax highlighting to be preserved when copying and pasting to word-processors, presentation slides, html editors and newsgroups etc.;
Source edit, tree and browser view (requires IE5.x) modes;
Files opened history (re-open previous files from menu - re-opened XSLT files restore previous parameters/start mode);
Project files (holding .xml and .xsl files);
Print and print preview (with selectable highlighting options);
HTML Tidying (using HTMLTidy/TidyCOM);

3.

ANN Schematron 1.5

Rick Jelliffe

After a long gestation, I am very happy to announce a new, complete implementation of Schematron 1.5, with an accompanying meta-stylesheet to generate the conformance language. SeeSchematron news

* Same version works with both namespace and non-namespace schematron
* Implements phases, diagnostics, inherited abstract rules, value-of.
* Command-line options to select the active phase or turn off diagnostics.
* Better compile-time error messages.
* Uses Oliver Becker's architecture, so should be compatible with existing 1.3 meta-stylesheets.
* Extends the architecture to make available more attributes.
* Uses conservative subset of XSLT so is still compatible with XP (providing key() is not used in schema). Also tested on SAXON, Instant SAXON and Sablotron (OK but does not support import yet, so metastylesheets have to be merged by hand.) See Implementation Notes for diary of some issues.

The Schematron 1.5 Schema for Schematron 1.5 has been upgraded to use diagnostics, phases and an abstract element to demonstrate the usage of these. Existing 1.3 Schematron schemas should be compatible with the new 1.5 skeleton. This is a beta, please report any problems and suggested fixes/enhancements. I will be successively testing it on other XSLT implementations over the next few weeks (anyone want to tackle MS XSLT?)

Special thanks to all who have contributed bits: Miloslav Nic, Ludwig Svenonius and Francis Norton may all find familiar-looking blocks of code. As well, thanks for everyone who has contributed bug reports, fixes and encouragement.

4.

[ANN] Zvon XSLTracer

Jiri Jirat

We have released a new tool - XSLTracer.

It enables to visualize the processing of an XML file by an XSLT stylesheet:

Features

Traces the evaluated XSLT instructions there and back.
Simultaneously shows the XML node being currently processed.
During tracing it also displays: name of the currently processed XML element or attribute, full XPath of the currently processed XML element or attribute - values of parameters and variables - all nodes of node-set which is matched by select expression in
xsl:apply-templates or xsl:for-each - value returned by xsl:value-of

The package can be downloaded at: zvon

I will appreciate your comments, suggestion and also contributions.

5.

The XPath Visualiser

Dimitre Novatchev

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

Composing the exact XPath expression when designing an XSLT stylesheet.

As a "nodeset view" in a watch window of an XSLT debugger.

Learning and playing with XPath expressions.

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 vbxml

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

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 Jonathan 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.

Right now (Nov 2000) 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.

6.

XSLT applications

Oliver Becker

I've put two XSLT transformations on my homepage. that are of general interest I hope.

An XML to HTML Verbatim Formatter with Syntax Highlighting -> generates a verbatim HTML representation of a given XML document

An XSLT Loop Compiler -> allows usage of special loop elements (for and while) within stylesheets. This compiler translates them into 100% XSLT.

In between there is a little prime number computing stylesheet ... I leave it to you to decide how useful it is :-)

7.

Applications for Learning XPATH

Aaron Skonnard

Here are a couple of new IE/DHTML utilities for XPath. The first is an interactive XPath/XSLPatterns expression builder. If you saw my previous one, this one is a big improvement because it highlights the selected nodes as you type. If you're trying to learn XPath, it might be helpful. It also places a dot in front of the selected nodes to help identify the selection if you type something like this: //*. Find it at xpath builder. (requires IE5 and MSXML 3.0)

The second utility automatically abbreviates a verbose XPath expression. It collapses 'child::', 'attribute::', '/descendant-or-self::node()/', 'self::node()', 'parent::node()', and [position() = 5] variants into their corresponding abbreviations. See [2] compress. (only requires IE4, I think)

If you find these useful, you may want to check out this similar XSLT utility - Command line app to transform using msxml: [3] utility Any feedback is appreciated,

8.

ANN: XSLTDoc

Jeni Tennison

I've been working on a little XSLT application to help people browse their stylesheets. For beginners, it gives a description of what each instruction is doing in theory (it doesn't trace the actual running of the stylesheet), including a summary of any XPaths. For people writing complex stylesheets, it provides summary views.

To use it:

Download it from: my website, unzip it into a directory, load xslt-doc.xsl in MSIE, and you will be prompted for a stylesheet to load; enter its file name relative to the XSLTDoc directory

As an alpha, I'd welcome testing and feedback. Let me know what you think, and especially if you find any bugs or have good ideas for improvements.

The XSLTDoc application gives you:

1. links to the called template from any xsl:call-template instruction
2. links to the definitions of the variables/parameters wherever they're used
3. sortable summary tables giving template matches and modes

It's all import/include aware, and tells you when a particular named template, variable declaration and so on are overridden in importing stylesheets.

Getting linking done with matching/moded templates is a goal, but it's pretty tricky especially as there may be *several* templates that match in a particular case, and it's really impossible to know which will do so without having a specific source XML instance.

9.

[ANNOUNCE] XSLT-process 2.1 available

Ovidiu Predescu

What is it?

XSLT-process is a minor mode for GNU Emacs/XEmacs which transforms it into a powerful editor with XSLT processing and debugging capabilities. With this mode you can:

- run an XSLT processor on the Emacs buffer you edit, and view the results either in another Emacs buffer or in a browser.

- run an XSLT processor in debug mode and view what happens during the XSLT transformation. You can set breakpoints, run step by step into your stylesheet, view global and local XSLT variables and many more. In this mode you effectively use GNU Emacs/XEmacs as an XSLT debugger.

- when used with the DocBook-XSL package, GNU Emacs/XEmacs becomes a powerful DocBook processing system.

Currently the Saxon and Xalan Java XSLT processors, and Apache FOP are supported, and the mode comes out of the box configured to use them.

The package has been tested on XEmacs, versions 21.1.14 and 21.4.3, and GNU Emacs 20.7.1, under both Linux and Windows 2000.

The package is free software and is distributed under GPL. The home page of XSLT-process is located at sourceforge/



10.

XMLStarlet Command Line XML Toolkit

??

XMLStarlet Command Line XML Toolkit 0.1.0 has been released - see sourceforge

This project pursues a goal to create command line XML toolkit to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using grep/sed/awk/tr/diff/patch.

This toolkit can be used by those who deal with many XML document on UNIX shell prompt as well as for automated processing with shell scripts.

The toolkit's feature set includes options for:

Validating XML files (simple well-formedness check, DTD, XSD, RelaxNG)

Calculating values of XPath expressions on XML files (such as running sums, etc)

Searching XML files for matches to given XPath expressions

Applying XSLT stylesheets to XML documents (including EXSLT support, and passing parameters to stylesheets)

Querying XML documents (ex. querying for value of some elements of attributes, sorting, etc)

Modifying XML documents (ex. deleting some elements)

Re-formatting XML documents (as changing indentation, etc)

Fetching XML documents using http:// or ftp:// URLs

Browsing structure of XML documents (in similar way to 'ls' command for directories)

Including one XML document into another using XInclude

XML c14n canonization

XMLStarlet command line toolkit is written in C and uses libxml2 and libxslt from http://xmlsoft.org/.

Implementation of extensive choice of options for XMLStarlet was only possible because of rich feature set of libxml2 and libxslt (many thanks to the developers of those libraries for great work).

XMLStarlet is linked statically to both libxml2 and libxslt, so generally all you need to use it is one executable file.

XMLStarlet is open source freeware under MIT license which allows free use and distribution for both commercial and non-commercial projects.

New binaries for Solaris8-sparc/RedHat-7.3/Mandrake-9.1/ has been released. (i586 rpm are for Mandrake-9.1 and i386 are for RedHat 7.3)

We welcome any user's feedback on this project which would greatly help us to improve its quality. Comments, suggestions, feature requests, bug reports can be done via SourceForge project web site (see XMLStarlet Sourceforge forums at sourceforge)