XSLT++ is an enhanced version of XSLT. XSLT is a language for transforming XML documents; a typical application of XSLT is to tranform XML documents into HTML documents, which are suitable to be displayed by the majority of web browsers.
XSLT is based on XPath, a specification language for nodes and node sets of the source XML document; using XPath it is possible to select attributes, elements or even entire subtrees of a document. XSLT uses XPath to associate transformation templates to patterns of nodes in the source XML document.
Although XPath is very powerful, it does not allow the selection of arbitrary fragments of documents; for example, with XPath it is not possible to select an arbitrary string, but only the entire text node which it belongs.
XPointer is an extension of XPath that overcomes this limitation. XPointer introduces the concepts of point and range. With XPointer, for example, it is possible to select a range that starts in the middle of a text node and that ends within a different text node, even in a part completely different of the document tree.
XPointer was designed having on mind sophisticated hypertext linking. Yet, XML transformations could greatly benefit from enhanced patterns.
XSLT++ is our XSL engine with support for XPointer instead of XPath for the selection of patterns. With XSLT++ it is possible to apply transformations to portions of text, and not only to elements, attributes or text nodes.
For example, in XSLT++ you could write
<xsl:text-template match="string-range(/doc/chapter/para,'hello there')">
and obtain the substitution of all the expressions "hello there" in the second paragraph of the first chapter of the document with the string "hello guys".
This project extends the functionalities of XSLT by increasing the expressivity of the pattern language. This is done by providing support for:
A possible application of XSLT++ is the extraction of meta-information out of a large set of documents. By providing XSLT++ templates looking for typical patterns in the content as well as the structure of the XML documents, you are able to extract relevant meta-information with simple rules immediately derived by XSLT.
Our current implementation of XSLT++ is written in Java and is based on Xalan, the XSLT engine by the Apache group. This implementation is released as free software under the terms of the GNU General Public License.
A web interface for XSLT++ is available, which allows transformations of documents using XPointer expressions. You can also try the XPointer implementation; in fact an API for XPointer was developed, so external applications can evaluate XPointer expressions. Please note that the server could be down.
The source code of XSLT++ will be available for download as soon as possible.
If you have any questions or suggestions, please contact Claudio Tasso. This project is under the supervision of Fabio Vitali.