Re: strong typed variable with restriction ?
Or add a message in an xsl:otherwise...
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 Saxonica
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format