Subject: Re: [xsl] "Return" from a function? From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Thu, 1 Jun 2006 15:01:02 +0530 |
Though, thinking about it, I suppose I could do something like the following (thanks *Andrew*):
<xsl:template match="/subscriptions/item[renewaldate]"> <p>Your renewal date for <xsl:value-of select="subscriptionname" /> is: <xsl:value-of select="renewaldate" />.</p> </xsl:template>
<xsl:template match="/subscriptions/item[not(renewaldate)]"> <p>Sorry, there has been an error...</p> </xsl:template>
Feels weird though, because actions for the same element aren't being kept "together" (within the same template), but it does look more useful than a return.
<xsl:template match="/subscriptions/item"> <xsl:choose> <xsl:when test="renewaldate"> <p>Your renewal date for <xsl:value-of select="subscriptionname" /> is: <xsl:value-of select="renewaldate" />.</p> </xsl:when> <xsl:otherwise> <p>Sorry, there has been an error...</p> </xsl:otherwise> </xsl:template>
Regards, Mukul
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] "Return" from a function?, Phillip B Oldham | Thread | Re: [xsl] "Return" from a function?, Mukul Gandhi |
RE: [xsl] FO invisible data, Alan Boldock | Date | Re: [xsl] "Return" from a function?, Mukul Gandhi |
Month |