Forum Moderators: open
The xml file/feed comes from a servlet. (I can not get this changed, allready asked.)
<?xml version="1.0" encoding="UTF-8"?>
<Irace msg="WCResultResponse">
<Header>
<ReturnCode>0</ReturnCode>
<ReturnString>Success</ReturnString>
<TimeStamp>2006-08-04 14:16:39.00</TimeStamp>
</Header>
<Result EId="25423754" RaceNum="1" Track="Concours St. Tropez ">
<First FinishTime="59421" Name="Westerly Winds" PLC="4.1" SHW="2.9" Trap="1" WIN="7.4"/>
<Third FinishTime="59866" Name="Handsome" SHW="1.6" Trap="2"/>
<Second FinishTime="59820" Name="Surf Up" PLC="3.7" SHW="2.4" Trap="6"/>
<Exacta Desc="(1,6)" Payout="63.1"/>
</Result>
</Irace>
I want to use the nodes Trap="1" Trap="2" Trap="3" to display a gifs in my xsl doc.
normal? way of displaying an image
...
<td align="center" width="34" height="36">
<img hspace="0" src="D:\work\codere\xsl\1.gif"/>
</td>
...
What I want to do...
...
<td align="center" width="34" height="36">
<img hspace="0" src="D:\work\codere\xsl\<xsl:value-of select="Irace/Result/First/@Trap"/>.gif"/>
</td>
...
I get an "Expected Whitespace" error. I have spent the last few days trying to find example of what I want to do on the web and come up with nothing.
How do I turn,
<xsl:value-of select="Irace/Result/First/@Trap"/> (Trap="1")
into "1.gif"?
Forgive me if this question has allready been asked.
R. Kline
What worked for me is to use
{Irace/Result/First/@Trap}
instead of
<xsl:value-of select="Irace/Result/First/@Trap"/>
whenever your inside another tag.
So, basically put whatever would have been in your select attribute inside curly braces and you should be good.
Sorted and working now, I guess I still have lots more to learn.
I've learned all I know from;
[w3schools.com...]
Is there another online tutorial that's clean and simple to read that goes abit more indepth?
Thank you again