Hi;
In our program we will get an XPath statement such as:
${data}/SalesProject[customer/CUSTCAT=${series}/customer/CUSTCAT]
Where ${data} and ${series} both stand for a XPathNavigator so each is
basically a specific node in a list of nodes that another XPath statement is
returning.
To evaluate this we basically build from the right to the left, stripping
off ]) fromt he far right to keep it balanced. So we do:
string str = navSeries.SelectSingleNode("self::node()/customer/CUSTCAT");
object value =
navData.SelectSingleNode("self::node()/}/SalesProject[customer/CUSTCAT=" +
str);
And the above works great. But, the whle thing falls apart when the XPath
passed in is:
count(${data}/SalesProject[customer/CUSTCAT=${series}/customer/CUSTCAT])
because that becomes count("abc") - if the first node that matches the inner
part above is "abc".
So, any idea on how to handle this so that count will work?
We are iterating through navSeries and for each navSeries entry we create
and iterate through navData and for each of those iterations we need to run
the inner XPath and return it's value (to place in a report).
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm