|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how find out end position using 'for' loop
Le 14/06/2011 06:47, JS Rawat a C)crit :
Hi Everybody, Have anyone any idea about the below problem. I want + sign between two RefArray (RefArray[11] + RefArray[12]) but not in the last (RefArray[12]+ RefArray[13]+ should be RefArray[12]+ RefArray[13]). Hi Another (better?) answer: <xsl:value-of select="string-join(for $i in $start to $end return concat('RefArray[',$i,']'), '+')"/> string-join() does exactly what you want : add a separator between strings. You could also use <xsl:text> for your text values. Doing that allows you to (auto-)indent your text, it's a lot easier to read: <a class="bibcit" href="references.htm#{substring-after(@rid,'_')}" onmouseout="startTimeout()"> <xsl:attribute name="onmouseover"> <xsl:text>refpopup('REF',</xsl:text> <!--<xsl:value-of select="for $i in $start to $end return concat('RefArray[',$i,']+')"/>--> <xsl:value-of select="string-join(for $i in $start to $end return concat('RefArray[',$i,']'), '+')"/> <xsl:text>)</xsl:text> </xsl:attribute> <xsl:apply-templates/> </a> -- Regards, Olivier Jeulin
|
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
|

Cart








