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

RE: user functions with variable number of parameters

Subject: RE: user functions with variable number of parameters
From: "Bordeman, Chris" <Chris.Bordeman@xxxxxxxxxxxxxxxxx>
Date: Sat, 9 Aug 2008 23:05:23 -0500
RE:  user functions with variable number of  parameters
Not quite what I want, need a little more logic.  I've ALMOST got it
now.  I've figured out that I can just use a normal untyped parameter,
pass it as a set, such as:

fn:myconcat(('abc', '123', 'def'))

In the function figured out to use for-each on the parameter, but now
trying to figure out how to tell which element # I'm on inside the
for-each, especially to detect the last item.  Also need to discard the
'current' item if it's empty, which I can't quite get.

Chris Bordeman
Senior Software Developer
AppOne, Inc., a Wolters Kluwer Financial Services Company
"Connecting dealers & lenders"
http://www.appone.net
http://www.dmsone.net
225. 754. 5912 (P)
866. 422. 9910 (F)


-----Original Message-----
From: Liam Quin [mailto:liam@xxxxxx]
Sent: Saturday, August 09, 2008 10:32 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  user functions with variable number of parameters

On Sat, Aug 09, 2008 at 10:21:00PM -0500, Bordeman, Chris wrote:
> I want to create a function that accepts any number of strings, and
> concatenates them using carriage return/linefeeds.

string-join(expression, "&#xa;")

may already do what you want.

Liam

--
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/

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.