cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <>
Subject Re: [C2] (hopefully) last sitemap major changes
Date Tue, 04 Jul 2000 08:10:53 GMT
Giacomo Pati wrote:

> I see some cases where a serializer fires events to the trace stream before a
> generator/transformer does (because of the semi parallel mechanism of the assembled sitemap
> components). Does this gives us any problems (I personaly do not know because I've not
made many
> thought about that trace/error streams)?

Yes there will be very tricky 'sequencing' design problems.

The most interesting one;
The SAX model allows for the document to 'fly-through' the whole processing chain, and output
generated before the whole of the input has entered the system. One would then, in the Http
feeding the return stream with the result. If now, an error condition is raised, such as an
exception, the Http stream can not be reset(), but must be completed.
On top of this, we have complex SAX Consumers, such as Xalan, which may or may not buffer
N events
prior to bursting out M events to the next SAX Consumer.
What I am saying is, that a call to the TraceHandler on the line after the call to the
ContentHandler, could be delayed into the TraceHandler by any number of other calls to the
This would lead to an trace output that bears little ressemblance with what a human can possibly
decode in any lengthier document and less than trivial sitemaps. One could argue that it would
possible to create a tool that can decode the trace and visualize it into something understandable,
and I will honorably acknowledge such an attempt.

While thinking about it at this particular moment, one probably need to 'encapsulate' a traced
segment of code, such as

with ... is all the location stuff.
This look rediculously weird coding (assuming that most 'encapsulations' will be a single
but behind the ch.startElement() could be thousands or more other SAX events.
The tracer could then generate hierarchy, which both humans (although I don't think people
have any
chances at this) and tools might easier understand.

But again tracing is a very desirable but complex subject, and I don't claim I have any good
solutions at hand.

And my angle is that the trace is generated in parallel with the Content, and not at a later
in time.


View raw message