[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL Choose inside a function??

Subject: Re: XSL Choose inside a function??
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 24 Oct 2002 18:09:34 +0100
define xsl function
> 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

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


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)

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.