Click to See Complete Forum and Search --> : Some XPath axes ("preceding::", etc.) in don't seem to work with Yahoo Widget engine!


loverich
01-23-2009, 07:24 AM
I asked on Yahoo Widget engine forums, but none answered yet, so I'll ask here. I have this xml:
<editions>
<project name="Radar">
<ed number="227"/>
<ed number="361"/>
</project>
<project name="Simobil">
<ed number="88"/>
<ed number="346"/>
<ed number="9"/>
<ed number="111"/>
</project>
<project name="Miss Universe">
<ed number="56"/>
</project>
</editions>

First I select a "project", for example "Simobil" and its first child - ed[@number='88'].

I have a left and right arrow in my widget. When I click on the RIGHT arrow, I want to select the next node ed[@number='346'], and when I click the LEFT arrow, I want to select the previous node (back to ed[@number='88']).

If I reach the end of project "Simobil" (ed[@number='111']), the right arrow shouldn't do anything... Same if I'm on the first one ed[@number='88'], the left arrow shouldn't do anything

I wanted to do this with xpath axes "following-sibling::ed" and "preceding-sibling::ed", but they DON'T SEEM TO WORK with the Yahoo Widget engine... (just "following::ed" works, but "following-sibling::ed" doesn't! "preceding::ed" also doesn't work!):( I tried everything on Xpath testbed at http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm - and it worked. But not with the widget!

So, what other way can I use to achieve this? THANK YOU!!!

jkmyoung
01-23-2009, 11:31 AM
Try filing a bug with the Yahoo Widget team. They've probably heard of this one before.