RE: [xsl] Aborting XSL processing during a run....

Subject: RE: [xsl] Aborting XSL processing during a run....
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Fri, 11 Feb 2005 15:19:54 -0000
> Apologies. By +irregularity+ I do NOT mean an error in the
> XML. I should
> have said that , + in some particular case + we wish to bring the XSL
> processing to a close.
>
> Any ideas?

I think what you are asking for is that the output to be generated up to
the point that the stylesheet processes the 'irregularity'?

The problem for you here is that the transformation builds a result
tree, which is then serialised/linearised to output a string.  The
string isn't constructed by the transformation, it's created by the
serialiser operating on the result tree.

If you want to stop processing based on some condition in the source XML
couldn't you just do:

  <xsl:if test="some condition">
    <!-- continue processing -->
    <xsl:apply-templates/>
  </xsl:if>
  <!-- otherwise do nothing -->

If this isn't what you mean then you will have to post an example...

cheers
andrew

Current Thread