[thelist] XSL / XPath

aardvark roselli at earthlink.net
Tue Nov 4 10:00:01 CST 2003


drew... i don't have time to write up the code that you'd need, but 
take a look at the count() or position() functions...

while looping (for-each), do a count on the nodes where the 
count()/position() is less than or equal to 2...

that help at all?

> From: Drew Shiel <ashiel at sportsinteraction.com>
[...]
> <headline>
>          <furtherdetails>
>                  <event id="248914" eventtypeid="94" betlive="0"
> bettingtype="Outright" numrunners="20">2003 World Cup -
> Outright</event>
>                  <runner id="847157" handicap="0" currentprice="1.25"
> fractionprice="5/4 ">New Zealand</runner>
>                  <runner id="847158" handicap="0" currentprice="1.5"
> fractionprice="3/2 ">England</runner>
>                  <runner id="847159" handicap="0" currentprice="5"
> fractionprice="5/1 ">Australia</runner>
>                  <runner id="847160" handicap="0" currentprice="12"
> fractionprice="12/1 ">France</runner>
>          </furtherdetails>
> </headline>
> 
> I'm trying to work out the XSL/XPath stuff to say "Take the first two
> runner nodes and do THIS with them", where THIS is dropping some of
> the values into a HTML table.

--
my latest book project:
  Web Graphics for Non-Designers
  http://www.amazon.com/exec/obidos/ASIN/1590591712/evoltorg02-20
  ISBN: 1590591712


More information about the thelist mailing list