![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - To get unique attributes [Thread Next] Re: To get unique attributesTo: NULL Date: 7/6/2004 12:34:00 PM DotNetJunkies User wrote: > I have an xml that is as follows: > <School SchoolId="1"> > <Classes> > <Class ClassId="1"> > <Grade Section="A" Name="Robert" Percentage="85" /> > </Class> > <Class ClassId="1"> > <Class Section="B" Name="Robert" Percentage="75" /> > <Class Section="B" Name="John" Percentage="80" /> > </Class> > <Class ClassId="1"> > <Class Section="C" Name="Robert" Percentage="87" /> > <Class Section="C" Name="John" Percentage="85" /> > <Class Section="C" Name="Mary" Percentage="90" /> > </Class> > </Classes> > </School> > > How do I write an XSL to get the list of all students who scored 85 % (exact) ? <xsl:for-each select="/School/Classes/Class[@Percentage='85']"> <xsl:if test="position()!=1">, </xsl:if> <xsl:value-of select="@Name"/> </xsl:for-each> > With the node-set I get in the variable unique-Percentage, using a for loop I tried to build another XML but I am unable to get unique output. What is exactly a uniqueness you are talking about? What should be unique? -- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
