Re: [xsl] XSLT Unit testing

Subject: Re: [xsl] XSLT Unit testing
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Thu, 18 Aug 2011 14:46:08 +0100 (BST)
davep wrote:

  Hi,

> > For what its worth, I've not used xslt specific test
> > frameworks, instead using standard junt tests that run the
> > transform
and then use xpaths on the result (well, xquery).

> Ever thought about using
Schematron here Andrew?

  The fundamental difference is that Schematron is
aimed at
representing assertions to be always true in all instance
documents
but are not representable in a schema (like "there must
be as much children as
the value of @count").  While unit tests
want to provide a specific input, to
perform a specific treatment
on it, then to compare the result to a specific
output or to
evaluate specific assertions on it (like "my:square(2) must be 4"
or "transforming <input><a/></input> must give something deep
equal to
<result>...</result>").

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

Current Thread