Hmm....
There is an attribute name and an attribute value. Won't this be comparing
the attribute value:
<xsl:for-each select="@*[starts-with(.,'S')]">
I'm interested in all attributes who's "name" starts with 'S'.
Karl
----- Original Message -----
From: "David N Bertoni/Cambridge/IBM"
<david_n_bertoni(_at_)us(_dot_)ibm(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, March 20, 2003 2:30 PM
Subject: Re: [xsl] Looping through attributes..
Okay, I'm looping through attributes. Now I need to determine if the
name
of an attribute starts with a particular text expression. I have the
following (and it doesn't work):
<xsl:for-each select="@*">
<xsl:if test="starts-with(@,'S')">
...
</xsl:if>
</xsl:for-each>
Am I close???
Yes:
<xsl:for-each select="@*">
<xsl:if test="starts-with(.,'S')">
...
</xsl:if>
</xsl:for-each>
or even:
<xsl:for-each select="@*[starts-with(.,'S')]">
...
</xsl:for-each>
if you're just going to ignore the attributes which don't start with 'S'.
Hope that helps.
Dave
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list