Try looping through your variable to see if it really only contains 1 node?
On 10/18/07, Joe Fawcett <joefawcett(_at_)hotmail(_dot_)com> wrote:
----- Original Message -----
From: "Dan Vint" <dvint(_at_)dvint(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, October 18, 2007 7:30 PM
Subject: [xsl] Only selectingn first occurance?
I have the following variable defintion:
<xsl:variable name="builds"
select="/project/target[contains(@name, '_stuff')]/@depends"/>
If I use this in Stylus studio and use the XPath evaluator, the XPath
gives me all instances of the Ant targets where the name attribute has
_stuff as part of the name. But when I use this this as part of my
stylesheet, I only get the first occurance.
Here is the contents of the variable:
"common92, confgwiz92, smart_update92, tempbuild92"
And this is the XPath evaluator window results, it shows 4 hits on this
path with results of
common92 configwiz92 smart_update92 tempbuild92
common100 common100_smart_update
wli92 wlibc92 adminhelp92 ...
wli102-alint wli102 wlibc102 ....
How do I change the <xsl:variable> to find the content of all the targets
and not just the first one?
..dan
---------------------------------------------------------------------------
Danny Vint
Specializing in Panoramic Images of California and the West
http://www.dvint.com
Why do you think it's only selecting the first attribute?
If you use xsl:value-of to show the result it will only show the first node
in the variable.
Show how you are using $builds.
Joe
http://joe.fawcett.name
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--