[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Verifying large XSL transform output

Subject: Re: [xsl] Verifying large XSL transform output
From: Greg Hunt <greg@xxxxxxxxxxxxxx>
Date: Wed, 12 Feb 2014 07:29:15 +1100

Another vote here for round tripping and comparing the result with the
source using a specifically built comparison tool.  I have a project
under way right now doing that.  Its a non-trivial amount of work, but
you have to test somehow, and I don't know how you would write and
execute comprehensive test cases otherwise. The comparison tool will
be a lot simpler than the transformations, so it is easy to test
manually.  This approach has the advantage that the entire body of
input XML can be the test data, leaving no corner cases uncovered.


On Wed, Feb 12, 2014 at 4:26 AM, Tony Graham <tgraham@xxxxxxxxxx> wrote:
> On Tue, February 11, 2014 4:31 pm, Matthew Stoeffler wrote:
>> On Feb 11, 2014, at 11:15 AM, Graydon wrote:
>> Are you trying to tell if the transformation worked to the specification
>> (as distinct from producing valid output!), or if you didn't lose any
>> text content?
>> The issue here is being certain I have all the source content, or at least
>> all the source content I require.
> For a large conversion project where some clients of the business have a
> long lead time for any changes in the format of XML they receive, we
> round-trip from the new format to the old for delivery to those clients
> and also use the round-tripped XML in development for checking that we
> hadn't missed anything in the conversion.
> We couldn't quite put Humpty-Dumpty together again in the round-tripping,
> so we normalise away the ignorable differences before doing the
> comparison, which boils down to deep-equal() plus counting comments.
> That approach may not be as much use if you're producing an archive format
> and aren't going back in the other direction, of course.
> Regards,
> Tony Graham                                         tgraham@xxxxxxxxxx
> Consultant                                       http://www.mentea.net
> Chair, Print and Page Layout Community Group @ W3C    XML Guild member
>   --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
> Mentea       XML, XSL-FO and XSLT consulting, training and programming

Current Thread