This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Detecting presence of attributes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]