Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Duplicate XSLT Output [Thread Next] Re: Duplicate XSLT OutputTo: NULL Date: 5/3/2005 8:16:00 PM thomas wrote: > I'm building a guitar website which uses XML and XSLT. > http://www.madtim67.com/guitar/index.html You can search either by artist or > song. I used the <xsl:if test="contains(artist ,$text1)"> line which worked > OK except now I get some duplicate output (go to the website and enter 'a' > to see what I mean. I included a unique id node in my xml file to make every > record unique. Is there a way that I can check the output the unique id > field only once. > > > <xsl:for-each select="cat/links[contains(artist,$text1)]"> > <xsl:for-each select="cat/links[contains(song,$text1)]"> You could simply write one for-each loop here <xsl:for-each select="cat/links[contains(artist, $text1) or contains(song, $text1)]"> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
