Re: report writer for XML

Tolkin, Steve wrote:
> We are thinking about storing a collection of XML instance documents,
> that will all conform to a particular DTD.  But we do not understand
> how to run traditional control break reports on these documents.

Do you have a short summary of what you mean by "traditional control
break reports"?  If so, it might be useful to post that.

Way back I had a little experience in the field of "report generation"
(when I was a Cobol progremmer).  My guess as to what you might mean,
in an xml context:  You have a long list of elements of the same basic
type.  You want to group elements that have the same value for some
attribute or child element, and after processing those elements, add
a summary elements, which could include things like a total for
the elements of that group as well as a running total for all the
groups seen so far.  You might also want want to break the list of
elements into chunks of 50 or a pageful, and add a running total at
the end of the page?
If so, there is the "Grouping" example in the XQuery specification
and probably some in the use cases that might be of interest.  However,
they don't seem to be quite appropriate - at the very least they would
be difficult to implement efficiently.  (I assume you want to be able
to make a single pass over the data, without storing it all in
memory as a DOM.)

As an implementor (www.qexo.org) I've done some very preliminary
thinking and work on single-pass processing of a subset of xqueries.
(The query 'document("mydoc.xml")/book/chapter)' is automatically
processed by my implementation in a single pass without creating an
in-memory DOM.)  It should be possible to generate more inteesting
reports, including group summary elements, in a single pass, but I
haven't really investigated it yet.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/

Received on Thursday, 24 January 2002 11:16:08 UTC