How can this be done programmatically. I am using Sax based transformation
using the SAX2SAX sample
of Xalan. I am first compiling the Stylesheet of XSL using Xalan
TemplatesHandler.
Actually I have a simple UI in which I ask for source and target XML files
and I read XML using
the ContentHandler of XML. Once the transformation starts I show an
Indefinite progress bar which the user can escape at any time.
The data that is being processed is really large and could take several
minutes to process.
Once the user has interrupted the transformation I needed to stop the
process.
I could just add another Class as content handler instead of the class I use
of handling RTree events and check for a flag to check the user feedback and
propagate the events if the user does not interrupt.But I am not sure if
this is the proper way to do this as the resources would be consumed by the
Transformer even on user interrupting this process.
> -----Original Message-----
> From: David Marston/Cambridge/IBM [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 26, 2002 8:22 PM
> To: [EMAIL PROTECTED]
> Cc: Suresh Babu Koya
> Subject: Re: Stopping transformation
>
>
>
> The stylesheet can reach a point where further processing is useless,
> in which case it could invoke:
> <xsl:message terminate="yes">Your message here</xsl:message>
>
> The above addresses the scenario where the author of the stylesheet
> can make the determination to stop transformation. I hope that helps.
> .................David Marston
>
>