Lists Home |
Date Index |
For those who uses Java and XSLT at the same time, it might be useful
to know about Juxy.
Juxy is a Java unit testing library for XSLT. It allows you to write
JUnit tests for XSLT stylesheets. You can easily setup transformation
context (parameters, variables, current node) and then invoke the
transformation. There are corresponding methods to call or to apply
templates and you can even pass parameters to these templates, or
apply templates in different modes.
Result of the transformation can be verified in a number of ways. You
can evaluate XPath expression (Juxy depends on Jaxen for XPath
support) and compare its result with your expectation, or you can
compare XML canonically.
Juxy does not depend on any XSLT processor specific functionality. If
your XSLT processor supports TRaX API, it should work with Juxy. For
now Juxy has been tested with two most popular processors: Xalan and
Latest release of Juxy (0.6.5) brings support for URIResolver (you can
now pass your custom resolver and it will be used during
transformation) and better support for XSLT 2.0.
Juxy is available under the terms of the Apache License 2.0.
More details about Juxy can be found here: http://juxy.tigris.org/