[qmtest] RFE: result annotations
Mark Mitchell
mark at codesourcery.com
Mon Sep 22 02:13:32 UTC 2003
On Fri, 2003-09-19 at 11:31, Stefan Seefeld wrote:
> hello,
>
> Working with the xml_result_stream, I notice that the 'TRACEBACK'
> annotation (which is decorated with '<pre>' and '</pre>' is escaped
> in the resulting xml output. Is that intended ?
Yes. If you do not quote special characters, then it is possible for
the XML to be invalid -- even if you assume that the annotation is valid
HTML. (That is true because HTML does not have XML's strict
requirements on matching beginning and ending tags.)
> What is the approach in general ? It seems lots of output text is
> assumed to be html. But then, putting it inside an xml output stream
> means some work is required. While escaping seems like a possibility,
> I don't believe it is the best option (see
> http://norman.walsh.name/2003/09/16/escmarkup).
Frankly, I don't think there's any other approach other than quoting.
We want to preserve particular strings -- byte-for-byte. I don't know
of any other way to do that.
> I'm post-processing the output with xslt to generate a 'test matrix',
> and as it is now I can't recover the '<pre>' tag.
I'm not sure what that's true. The value of the text node contains the
string "<pre>"; not the string "<pre>". The externalized
representation is the quoted form, but the value is the unquoted form.
It may be that you want do disable output escaping (with
xsl:disable-output-escaping), but I'm not sure.
> Also, I'm wondering whether the annotation could be enhanced by
> providing the name of the suite a test is part of. Of course, the suite
> is implicitely given as 'foo.bar', but here, again, I'd like to be
> able to access this bit of meta-info from within xslt, so I can
> use suites to classify tests.
The problem here is that the naming convention isn't standard across
test classes -- for good reasons. I suppose we could provide both the
full name of the test and the sequence of path components that make it
up, but that seems redundant. I'm not sure exactly what to suggest.
--
Mark Mitchell <mark at codesourcery.com>
CodeSourcery, LLC
More information about the qmtest
mailing list