NO, the buffering is done regardless of the output method.
The Stylus Studio debugger uses some tricks to achieve its "back mapping" where it links elements in the result file to the instruction that created them; this is based on some pretty hairy analysis of the Saxon internals.
Michael Kay

From: [] On Behalf Of ROSSEL Olivier (CIMPA)
Sent: 14 April 2004 13:35
To: ''
Subject: RE: [saxon] Tracing a transformation

Do you see any trick to achieve "XSL instructions tracing" with Saxon?
Does the building of a *DOM* result also contain some buffering step? Or is it more straightforward?
-----Message d'origine-----
De : Michael Kay []
Envoyé : mercredi 14 avril 2004 14:03
À :
Objet : RE: [saxon] Tracing a transformation

Firstly, if you are doing this kind of interleaving, make sure that both trace streams are sent to the same output destination. If one goes to System.out and the other to System.err, then the relative order of the messages will depend on operating system buffering of the output streams.
Secondly, yes, you are right: events are buffered in the output pipeline. Here you are using SAX output. SAX has a single event, startElement(), to represent an element and all its attributes. This event can't be emitted until it's known that there will be no more attributes, which means when the first child node or the end tag is output, whichever comes first. Mapping back from emitter events to the tracing of the instructions in the stylesheet is therefore quite difficult.
Michael Kay