[qmtest] RFE: result annotations

Mark Mitchell mark at codesourcery.com
Thu Oct 2 15:49:35 UTC 2003


On Thu, 2003-10-02 at 07:46, Stefan Seefeld wrote:
> Mark Mitchell wrote:
> > On Tue, 2003-09-23 at 23:09, Nathaniel Smith wrote:
> 
> >>Do we even know that annotations are, in general, proper XHTML?
> >>We've documented them as being HTML (though they're not even properly
> >>treated as that ATM; we don't handle character entities right at all),
> >>and HTML in real life is rarely well-formed XML.  I'm worried that if
> >>we start parsing it as XML, we'll start getting parse errors
> >>who-knows-where...
> > 
> > 
> > Right now, we assume they are HTML, not XHTML.
> > 
> > And, we do handle character entities correctly in results files; they
> > are escaped.
> 
> yes, the current solution works, with a proper definition of 'works'.
> But why can't we require the annotation author to use valid xml (i.e.
> balancing start and end tags, properly escaping of special characters),

I do not have any objection to that requirement.  In a way, it's already
implicit -- if the annotation is not valid HTML, unpredictable things
will happen.  If we were to require it be XHTML (as you suggest), that
would be OK.

However, I'd still *store* it with escapes.  In other words, you want:

  <annotation name="foo.bar"><p>This is a paragraph.</p></annotation>

and I want:

  <annotation name="foo.bar"><p>This is a
paragraph.<p></annotation>

I am still not sure how to recover the data from your version using the
DOM API.

> I'm really just trying to enhance the output data structure to make
> automatic postprocessing more efficient.

I think what's really happening is that you're working around a
limitation in current versions of QMTest -- we don't have historical
results data.  There should a "ResultsDatabase" object that would store
multiple results streams.  Then, it would be easy to generate the kind
of historical/cross-run summary data you want.  We would like to add
this, but we need evidence that doing that work would be of (monetary)
value to a customer.

In the mean time, you could always make a variant of XMLResultStream
that did what you want. :-)

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com




More information about the qmtest mailing list