There is no xpath function which can calculate top three. Probably you can do it combining some xpath operator. But my question is what would you do if top value is same for Tata Rallis and Bayer say 100, second top value also same for Syngenta and UPL say 80. Which three-item you would pick in this case? Again all of the items have probability scoring top 3 in a single entry. What would you do in this scenario?
Hi
What you are asking for requires quite a detailed logic. I have tried getting it out here but you have to enhance the yellow ones for it to work perfectly. This will only give you the highest correctly otherwise use same logic to make it work for you.
Unfortunately, the max function only allows a pure nodeset, but nothing like if, numeric or calculation. So, probably max can’t be used to find also top 2 and top 3 value.
Furthermore, it might be difficult to implement the limit (of khasab) to get only 3 top cases in total…
Another idea: Might it be interesting to think about changing the whole structure with the q-questions to a repeat structure?
Update: I tried to deploy the Ranking 02 example, which works well in preview. But creates an error for deployment. I a sorry and forwarded the issue to development.