Is there a way to use data from the current context to filter nodes somewhere else in the statsource.
For instance, if I have this XML:
<root>
<group1>
<inst>
<type>Foo</type>
<value>First Foo</value>
</inst>
<inst>
<type>Bar</type>
<value>The Bar</value>
</inst>
<inst>
<type>Foo</type>
<value>Second Foo</value>
</inst>
</group1>
<group2>
<Filter>
<FilterType>Foo</FilterType>
</Filter>
<Filter>
<FilterType>Bar</FilterType>
</Filter>
</group2>
</root>
Assuming my context is one of the Filter tags, I want to return get the number of instances of the specified type in group1. I would like to write XPATH that looks something like this:
count(/root/group1/inst[type = **FilterType**])
Is there anything I can use to get the FilterType in the original context?