xsl-list
[Top] [All Lists]

Re: [xsl] Verifying large XSL transform output

2014-02-11 14:29:35
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.

Greg

On Wed, Feb 12, 2014 at 4:26 AM, Tony Graham <tgraham(_at_)mentea(_dot_)net> 
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(_at_)mentea(_dot_)net
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--