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

Re: value-of w/separator and nodes

Subject: Re: value-of w/separator and nodes
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Fri, 2 Feb 2007 23:07:33 +0530
Re:  value-of w/separator and nodes
On 2/2/07, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
returns 1|1| etc, but:

<xsl:value-of select="(for $i in 1 to 100 return my:test())"
separator="|" />

   <xsl:function name="my:test" >
       <xsl:text>1</xsl:text>
   </xsl:function>

returns 11111

I suspect it has to do with the result being a node() of type text.
However, still the normal casting rules should apply to each item, not?

The function result is returned using an <xsl:sequence> instruction. So if you use,

<xsl:function name="my:test">
 <xsl:sequence select="'1'" />
</xsl:function>

You'll get output as 1|1|1|1|1 ...


-- Regards, Mukul Gandhi

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.