Subject: Re: [xsl] i want no double xml records to be viewed From: r.devries@xxxxxxxx Date: Mon, 21 Jul 2003 12:25:23 +0200 |
Hi Nico, I assume you just started using XSL, because you're using <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> which is a nasty dialect from Microsoft. A beginners error most of us make I think. At least I did. As Jarno said: You should't use it!!! Furthermore there is a faq about unique grouping: http://www.jenitennison.com/xslt/grouping Here is a little help from me (I stole it from the site above ;-)) Thank Jeni for it!): <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns:fo=" http://www.w3.org/1999/XSL/Format"> <xsl:key name="records-by-ppn" match="record" use="ppn"/> <xsl:template match="root"> <xsl:for-each select="record[count(. | key('records-by-ppn',ppn)[1]) = 1]"> <xsl:sort select="ppn"/> PPN: <xsl:value-of select="ppn"/> Titel: <xsl:value-of select="titel"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> I don't know what your root-element was, so I called it "root"... Success!!! Greetings René {@ @} ^ \_/ "You don't need eyes to see, you need vision!" TJIP PCL Steenovenweg 3 5708 HN Helmond The Netherlands tel: +31(0) 492 502 222 fax: +31(0) 492 502 299 e-mail: R.deVries@xxxxxxxx internet: www.tjip.com ***************************DISCLAIMER******************************** Deze e-mail is uitsluitend bestemd voor de geadresseerde(n). Verstrekking aan en gebruik door anderen is niet toegestaan. TJIP PCL sluit iedere aansprakelijkheid uit die voortvloeit uit elektronische verzending. This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). TJIP PCL rules out any and every liability resulting from any electronic transmission. "Nico Noordhoek" <noordhoek@xxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent by: cc: owner-xsl-list@xxxxxxxxxxxx Subject: [xsl] i want no double xml records to be viewed rytech.com 21-07-2003 08:38 Please respond to xsl-list Hello, Please take a look at my problem. I have xml-records with a tag that have the same content, like this tag: <PPN>12345</PPN>, I want just one record to be shown in my ie-explorer, is it possible to add a line in my stylesheet to prevent this? Nico Noordhoek XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] i want no double xml reco, Jarno . Elovirta | Thread | [xsl] Is there a free XSL styleshee, Lyakas Alexander |
[xsl] need help with MAX and MIN fu, Ali Zain Banatwala | Date | Re: [xsl] rss, in all its guises, Kurt Cagle |
Month |