|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: Introducing a comma.
Sorry if another version of this appears without the stylesheet. I expected this stylesheet to work just the way the example shown in the spec does, but the comma appears after all instances of <in>. Can anyone see what I'm missing?
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" encoding="UTF-8" />
<xsl:template match="/signature">
<signature>
<xsl:apply-templates />
</signature>
</xsl:template>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="name() = 'in'">
<xsl:copy-of select="." />
<xsl:if test="not(position() = last())">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
--
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From: David Carlisle <davidc@xxxxxxxxx>
Sent: Tue, 18 Nov 2003 17:33:38 GMT
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Introducing a comma.
The code to do exactly that example is in the xslt spec.
http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:if
David
--
http://www.dcarlisle.demon.co.uk/matthew
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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








