XML 2007 Conference
Marriott Copley Place
Boston, Massachusetts, USA
3-5 December 2007
Add to your personal schedule

Testing XSLT

Tony Graham (Menteith Consulting Ltd)
XML Training Arlington
Presentation: Testing XSLT Presentation [PDF]

Creating a working stylesheet may seem like an end in itself, but once it’s written you may want it to run faster or you may not be sure that the output is correct (And if you are sure, how sure are you?).

Profilers, unit test frameworks, and other tools of conventional programming are similarly available for XSLT but are not widely used. This presentation surveys the available tools for ensuring the quality of your XSLT.

There is no one-size-fits-all solution when looking for tools. For example, if you are using Saxon and Ant, then you are looking for a different set of tools than if you are using libXSLT and Makefiles.

This training is for people familiar with XSLT – either XSLT 1.0 or XSLT 2.0 – who want to improve the reliability and accuracy of their stylesheets.

Overview of XSLT testing tools

Overview of the categories of XSLT and XSL FO testing tools

XSLT profilers

More detailed look at XSLT profilers and some of the potential for inaccuracy in the reported results

XSLT unit testing frameworks

A look at the available XSLT unit testing frameworks and their differing technologies and differing approaches.

Black box unit testing

What tests can you infer from the input and desired output?.

White box unit testing

Writing tests when you can see the code being tested.

The roles of both “clean” tests and “dirty” tests, where the template is supposed to throw an error.

How many tests are enough?

XSLV Static Validation tool

A different approach to testing transformations

Errors not caught by unit testing or static validation

Review of the types of errors – misleading comments, off-by-one errors, empty #PCDATA, etc. – that are not caught by either unit testing or static validation.

Concluding Remarks

Review of the tool types and their strengths and weaknesses.

Tony Graham

Menteith Consulting Ltd

Tony Graham is an independent consultant specialising in XSL, XSLT, and XML. He has been working with markup since 1991, with XML since 1996, and with XSL/XSLT since 1998.

Tony is an invited expert on the W3C XSL FO subgroup and a previous member of the W3C XML Protocol WG. He is the author of Unicode: A Primer and the developer of the xmlroff XSL Formatter. He is a member of the XML Guild.

Tony is interested in applying the tools for ensuring software quality – unit testing, code coverage, profiling, and other tools – to XML and XSL/XSLT processing.

Your account


(?)

Premiere sponsor

Microsoft Interoperability

Platinum sponsors

JustSystems
DataDirect
IBM

Gold sponsors

Intel
Antenna House

Produced by

IDEAlliance

Event sponsor

RSuite CMS

Co-hosts

OASIS
Philly XML
XML Guild
Event software by Expectnation