![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - RE: To get unique attributes To get unique attributesTo: NULL Date: 7/5/2004 9:23:00 AM Hi
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) ?
I tried as follows:
<xsl:variable name="unique-Percentage" select="//Class[not(Grade/@Percentage=preceding-sibling::Class/Grade/@Percentage)]"/>
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.
Please help me regarding this.
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
