|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: concat string
On Thursday, November 30, 2000, 3:06:49 PM, YueMa wrote:
> Hi there,
> In my XML I have:
> ..
> <keys>key1</keys>
> <keys>key2</keys>
> <keys>key3</keys>
> ..
> And I would like to have a stylesheet to generate things like:
> <META http-equiv="Keywords" name="Keywords" content="key1, key2, key3">
> How can I do that ?
Try this:
<meta http-equiv="Keywords" name="Keywords">
<xsl:attribute name="content">
<xsl:for-each select="key">
<xsl:value-of select="." />
<xsl:if test="position() != last()>
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:attribute>
</meta>
Regards,
Ian
http://www.calaba.com [work]
http://InternetAlchemy.org [play]
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








