Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


To get unique attributes

From: DotNetJunkies User <User@---------------------.--->
To: 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.


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent