|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPATH restricting preceding nodes
Hi, I have something like the following XML document: <top> <page> <entry text='aaa'/> <entry text='bbb'/> <entry text='aaa'/> </page> <page> <entry text='ccc'/> <entry text='bbb'/> *** <entry text='ccc'/> </page> </top> I only want to select entries with the same text once for each page. For the first page I want to get only one aaa-entry and one bbb-entry. For the second page I want to get only one ccc-entry and ond bbb-entry. I did this with the following XPATH expression : <xsl:for-each select="ancestor::page/descendant::entry[not(@text = preceding::entry/@text)]"> but then I don't get the bbb-entry for the second page. I cannot figure out a way to restrict the preceding::entry result set to the current page. What am I doing wrong? Thanks .............................. Erwin Kloeck Produktentwicklung Oestreicher + Wagner Medientechnik GmbH Frankenthaler Strasse 20 D-81539 Muenchen Fon +49 (0)89-68961 216 Fax +49 (0)89-68961 271 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








