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

Re: help with recursive function

Subject: Re: help with recursive function
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 6 May 2008 17:27:14 +0100
Re:  help with recursive function
2008/5/6 Mario Madunic <hajduk@xxxxxxxx>:
>  I'm having a problem with a recursive function in 2.0.

>  [xslt] e:\XSLT\cleanUp.xsl:259: Fatal Error! A sequence of more than one item is
>  not allowed as the first argument of concat()

>   <xsl:value-of select="concat(f:f_UpperLowerCaseFix(.), if (not(position() =

Without looking too closely, first you should always declare the type
and cardinality of the function's return value, so change:

>   <xsl:function name="f:f_UpperLowerCaseFix">

to <xsl:function name="f:f_UpperLowerCaseFix" as="xs:string">

(a single string)

>     <xsl:param name="p_String" />

...you should also declare the type and cardinality of the param but
that's likely to be a side issue here.

So, with the function's return type declared as a single string, the
processor will throw an error as soon as the second item in the
sequence is added (before it ever gets to the concat function) - with
good xsl:message output or the help of a debugger you should be able
to determine where the problem is.

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

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.