[xsl] "Return" from a function?

Subject: [xsl] "Return" from a function?
From: Phillip B Oldham <phillip.oldham@xxxxxxxxxx>
Date: Wed, 31 May 2006 11:59:17 +0100
Hi all

<rant type="pointless" mood="whimsical">

One thing I've found annoying when moving from OOP to functional
programming is the lack of "return". It would be extremely useful to do
something like the following:

<xsl:function match="/subscriptions/item">
<xsl:if test="not(renewaldate)">
    <xsl:return />
<!-- otherwise execute the rest of the stuff below -->

I'm using XSL as a templating language for PHP5, and having lots of
if/choose statements is starting to bloat the templates. I know I should
be trying to use <xsl:apply-templates /> more, but sometimes its a
little difficult. And generally, as a developer, I would love to be able
to simply return/exit from a template.

</rant> ;)

Current Thread