Re: [xsl] XSL Choose inside a function??

Subject: Re: [xsl] XSL Choose inside a function??
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 24 Oct 2002 18:09:34 +0100
> I'm a xsl newbie, just to let you know.

Then just to make clear. There is no <xsl:function in XSLT.
You are using an implemenation of a draft of XSLT 2 perhaps?
Note that the XSLT2 draft is not finished and so the definition of that
part of the language may change greatly, it's probably not teh best
place for a beginner to be.

You appearto be defining a function that is in the XSLT namespace, that
would not be allowed (I think, I'd need to check the xslt 2 draft)

however to anwser your question

> So my question is, is it really not possible to use a choose in a function??

The _current_ definition of xsl:function in the XSLT 2 draft is

  name = qname
  override = "yes" | "no">
  <!-- Content: (xsl:param*, (xsl:variable | xsl:message)*, xsl:result) -->

so you can not have xsl:choose, and you can only have one xsl:result.
to get the effect you want first define a variable containing teh
xsl:choose then just xsl:return that variable. (But as I say if you
really are a beginner it would be best to stay with xslt 1 for now)


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread