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

Re: strong typed variable with restriction ?

Subject: Re: strong typed variable with restriction ?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 02 Feb 2011 13:49:45 +0000
Re:  strong typed variable with restriction ?
On 02/02/2011 12:43, Michel Hendriksen wrote:
Or add a message in an xsl:otherwise...

<xsl:message terminate="yes|no">

<!-- Content:template -->


No, that won't solve the problem. If the declared type of the function is element(), then the otherwise branch (whether explicit or implicit, whether executed or not) must return an element.

(It's not like Java, where you can declare a function to return String, and still return null. If you want to allow a "null" return in XSLT, you need to declare the result as "xs:string?").

Michael Kay

Current Thread


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.
First Name
Last Name
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.