This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Detecting presence of attributes
- To: peter at silmaril dot ie
- Subject: Re: [xsl] Detecting presence of attributes
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Sun, 4 Feb 2001 21:02:56 -0800 (PST)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Peter,
Your xsl:for-each below always selects just one node ( an element has
not more than one attribute with a given name)
Therefore,
not(position()=last)
is always false.
Therefore, this is not a bug in xt, but is exactly what you specified.
Cheers,
Dimitre Novatchev.
P.S. Just another minor error: must be last() -- not last.
Peter Flynn wrote:
<xsl:for-each select="@foo">
<xsl:value-of select="."/>
<xsl:if test="not(position()=last)">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:for-each>
I'm curious to know why the output contains the entity names separated
by spaces
instead of commas.
///Peter
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list