This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have this set of elements stored in a variable say colList.
Now I would like to do some summing operation for which I need to access some elements of the above list. For example, I may have to sum up all the values for elements whose position is less than 3. so, I would write something like this. sum($colList/col[position()<3]) But, i am getting an error saying that attribute value may not contain '<'.It works fine for '>'. Does it mean I cant select elements which are below some position value?? From the XPath specs,I found this
child: ara[position()>1] selects all the para children of the context node other than the first para child of the context node
But is there no way to do something like this: child: ara[position()<5] selects all the para children of the context node from position 1 to 4e Or maybe I am missing something here!! Regards, Shankar.