working with the xml result stream
Stefan Seefeld
seefeld at sympatico.ca
Tue Sep 30 16:18:45 UTC 2003
I'v run into a little issue with the generated xml output using
xml-result-stream.
I run qmtest on a variety of platforms, and I generate one xml
result file for each. Then I process these files with xslt to
generate a 'result matrix'. At some point I'm determining the
number of failures/passes/etc., and the xslt way to do this is
with an xpath expression such as
"count($target/results/result[outcome='FAIL'])"
The problem is that the content of 'outcome' nodes varies
between platforms, i.e. on linux it may be
<outcome>PASS</outcome>
and on windows
<outcome>
PASS
</outcome>
This means that I can't just compare the string values that
easily, since the content differs in whitespace.
Thus my question: wouldn't it be more natural to put the outcome
value into an attribute ?
A temporary workaround for my xpath expression may be to use
"contains(outcome, 'FAIL')", but that seems quite hackish.
Checking with the document type definition for result files
I think it would be perfectly fine to make such a change,
i.e. the outcome is actually an enum, so the dtd / schema could
well be tightened a bit to make processing easier.
Any thoughts ?
Stefan
More information about the qmtest
mailing list