Hi,
I am attempting to use preceding-sibling to select unique elements from a group.
Using the folliwng xml as an example..
<items>
<item>
<options>
<option>
<option-data>
<data-ab>TEST1</date-qualifier>
<date>20101026</date>
</option-data>
<option-data>
<data-ab>TEST2</date-qualifier>
<date>20101026</date>
</option-data>
</option>
<option type="2">
<option-data>
<data-ab>TEST1</date-qualifier>
<date>20101026</date>
</option-data>
</option>
</options>
</item>
<item>
<options>
<option>
<option-data>
<data-ab>TEST1</date-qualifier>
<date>20101026</date>
</option-data>
</option>
<option type="2">
<option-data>
<data-ab>TEST1</date-qualifier>
<date>20101026</date>
</option-data>
</option>
</options>
</item>
</items>
I want to be able to select unique option-date elements (distinct is by date and data-ab). I only want to select the option-data/date that is uniqueu for each item i.e not by option.I have used combinations of preceding-sibling but as it returns to the parent I can only guarentee the dates will be unique for each option where I need it by item.
Racking my brains over this for hours and cannot come up with an elegant solution.
Regards, Andy