There are a number of things that can legitimately change in the output - for example, the order of attributes within an element. Fortunately most such things don't tend to change even though it's permitted - so I'd be interested to see exactly what kind of change you are experiencing.
For testing, I think there are two approaches possible. One is to canonicalize the output using an XML canonicalizer - that's what I do in most of my testing. The other possibility is to do testing based on XPath assertions applied to the result, as is done in XSpec and in Selenium. Using XPath assertions is far more flexible, because it allows you to ignore things that you know are likely to vary in the output, such as timestamps.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|