xsl-list
[Top] [All Lists]

Re: Filtering duplicated data problem

2004-11-03 23:18:28
Fanyin Wang wrote:

I'm not quite understand the match expression of
"item[(_at_)title !=
''][following-sibling::item[itemmetadata/qtimetadata/qtimetadatafield[fieldlabel
 =  'item_type_code'][fieldentry ='OE']]]"

Take a close look. The expression consists of three main parts:
 - item
 - [(_at_)title != '']
 - [following-sibling::item[.........]]

The index collects item elements with non-empty title attributes. This is what your template selects as well, by the combination of the template match and if test.

But I added a second condition to the item elements that are collected. The second requirement is that there must be a _following-sibling::item_ that has a fieldentry = 'OE'.

That is why I called the index 'OE-related-items' instead of 'OE-items'.

In your own code you select the OE-items first and then look for the related items, but I had to reverse this for the index. preceding-sibling outside a predicate as in: item[fieldentry = 'OE']/preceding-sibling::item[(_at_)title != ''] is not allowed (the parser told me)...

Grtz,
Geert

--
Geert(_dot_)Josten(_at_)Daidalos(_dot_)nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50


<Prev in Thread] Current Thread [Next in Thread>