xsl-list
[Top] [All Lists]

Re: Introducing a comma.

2003-11-18 10:44:25
Youll have to tweak this to get the exact output you want but this will give
you the commas where you want them..
.......

<xsl:template match="signature">

 <xsl:apply-templates/>

</xsl:template>

<xsl:template match="in">

 <xsl:value-of select="."/><xsl:if test="position() != last()">,</xsl:if>

</xsl:template>

........

Best of luck!

M.

----- Original Message ----- 
From: "Ram" <sram_30(_at_)yahoo(_dot_)com>
To: <XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, November 18, 2003 10:09 AM
Subject: [xsl] Introducing a comma.


Hi,
Can anyone help me out in introducing a comma?
The xml source is:
<signature>signature <identifier>DNSQuery</identifier>
   <in>in<long>long</long><identifier>a</identifier></in>
   <in>in<string>string</string><identifier>b</identifier></in>
   <in>in<float>float</float><identifier>c</identifier></in>
</signature>

I've to introduce a comma between the first and second 'in',and between
the second and third 'in' but not after the third 'in'.

Thanks and regards,
Ram


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list