Subject: Re: [xsl] Looping through attributes.. From: "Karl Stubsjoen" <karl@xxxxxxxxxxxxx> Date: Thu, 20 Mar 2003 14:48:54 -0700 |
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@xxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Looping through attribute, Karl Stubsjoen | Thread | RE: Re: [xsl] Looping through attri, cknell |
Re: [xsl] Looping through attribute, Robert P. J. Day | Date | [xsl] Re: Re: questions about XSLT , Dimitre Novatchev |
Month |