Re: [xsl] junit test... for xslt2?

Subject: Re: [xsl] junit test... for xslt2?
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 8 Mar 2010 10:43:05 +0000
>  I'd just like to insist on the fact I said "for a few
> components".  More precisely, I'd say very rarely for my own
> components, but people seem to need that (for better or worse).

Sure, its just impractical when comparing HTML... seems reasonable to
start with, but in the end is far to much pain.


>  Here is a simplified exerpt of a test suite for the EXPath HTTP
> Client:
>
>    <t:call function="http:send-request">
>       <!-- some param here... -->
>    </t:call>
>    <t:expect test="count($t:result) eq 2"/>
>    <t:expect test="$t:result[1] instance of element(http:response)"/>
>    <t:expect test="$t:result[1]/xs:integer(@status) eq 200"/>
>    <t:expect test="$t:result[2]/*">
>       <pass>...</pass>
>    </t:expect>

Ok this is a good example of the concept behind xchecker... that test
can easily be rewritten in XSLT - what you gain from the framework you
also lose in it restrictions (failure messages, variables etc).
There's nothing wrong with that at all by the way, I just think a
slightly different (and better) approach is possible.



--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread