Subject: Re: [xsl] Filtering duplicated data problem From: Fanyin Wang <fanyinxslt@xxxxxxxxx> Date: Thu, 4 Nov 2004 06:52:14 -0800 (PST) |
That's very help for me to learn. Thanks again. Fanyin --- Geert Josten <Geert.Josten@xxxxxxxxxxx> wrote: > Fanyin Wang wrote: > > > I'm not quite understand the match expression of > > "item[@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 > - [@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[@title != ''] is not > allowed (the parser told me)... > > Grtz, > Geert > > -- > Geert.Josten@xxxxxxxxxxx > IT-consultant at Daidalos BV, Zoetermeer (NL) > > http://www.daidalos.nl/ > tel:+31-(0)79-3316961 > fax:+31-(0)79-3316464 > > GPG: 1024D/12DEBB50 > > __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Filtering duplicated data, Geert Josten | Thread | [xsl] RE: Collapsing run-on tag cha, Richard Bondi |
Re: [xsl] XSLT - update attribute w, David Carlisle | Date | [xsl] Grouping by key, gopinath . emmidiset |
Month |