Subject: [xsl] how find out end position using 'for' loop From: "JS Rawat" <jrawat@xxxxxxxxxxxxxx> Date: Tue, 14 Jun 2011 10:17:57 +0530 |
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]). Input <link class="bibcit" rid="FileName_bib11">11–13</link> XSLT <xsl:template match="link"> <xsl:choose> <xsl:when test="@class='bibcit'"> <xsl:variable name="bibtext" select="."/> <xsl:choose> <xsl:when test="contains($bibtext, '–') and substring-before($bibtext,'–') castable as xs:integer"> <xsl:variable name="start" select="xs:integer(substring-before($bibtext,'–'))"/> <xsl:variable name="end" select="xs:integer(substring-after($bibtext,'–'))"/> <a class="bibcit" href="references.htm#{substring-after(@rid,'_')}" onmouseout="startTimeout()"> <xsl:attribute name="onmouseover">refpopup('REF',<xsl:value-of select="for $i in $start to $end return concat('RefArray[',$i,']+')"/>)</xsl:attribute><xsl:apply-templates/></a> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> </xsl:template> OUTPUT <a class="bibcit" href="references.htm#bib11" onmouseout="startTimeout()" onmouseover="refpopup('REF',RefArray[11]+ RefArray[12]+ RefArray[13]+)">11C"b,b13</a> Desired OUTPUT <a class="bibcit" href="references.htm#bib11" onmouseout="startTimeout()" onmouseover="refpopup('REF',RefArray[11]+ RefArray[12]+ RefArray[13])">11C"b,b13</a> Thanks in advance. ...JSR
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] WordML creating blank PDF, Paruchuri, Pardha | Thread | Re: [xsl] how find out end position, Brandon Ibach |
[xsl] WordML creating blank PDFs us, Paruchuri, Pardha | Date | Re: [xsl] how find out end position, Brandon Ibach |
Month |