|
Subject: Re: concat string From: Ian Davis <iand@xxxxxxxxxxxxxxxxxxx> Date: Thu, 30 Nov 2000 17:53:06 +0000 |
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
| Current Thread |
|---|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: concat string, Jon Payne | Thread | String size in a schema, David Delgranche |
| check if nodes match xpath expressi, Christian Nentwich | Date | RE: sum() of nodeset, Pendakur, Ramesh |
| Month |