[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Looping through attributes..

Subject: Re: Looping through attributes..
From: "Karl Stubsjoen" <karl@xxxxxxxxxxxxx>
Date: Thu, 20 Mar 2003 14:48:54 -0700
xsl select attribute
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.