[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] removing duplicates in loops
i have the following xsl and want to remove repeated education and honor elements. how should i achieve that? <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="rowset"> <xsl:for-each select="/rowset/row/resumeid[not(preceding::resumeid=.)]"> <xsl:sort select="."/> <resume id="{.}"> <name> <first_name><xsl:value-of select="/rowset/row/fname"/></first_name> <middle_initial><xsl:value-of select="/rowset/row/middle"/></middle_initial> <last_name><xsl:value-of select="/rowset/row/lname"/></last_name> <maiden_name><xsl:value-of select="/rowset/row/maiden"/></maiden_name> <suffix><xsl:value-of select="/rowset/row/suffix"/></suffix> </name> <objective><xsl:value-of select="/rowset/row/objective"/></objective> <xsl:for-each select="/rowset/row[resumeid = current()]"> <education> <school><xsl:value-of select="school"/></school> <department><xsl:value-of select="dept"/></department> <school_address> <school_city><xsl:value-of select="city"/></school_city> <school_state><xsl:value-of select="state"/></school_state> <school_country><xsl:value-of select="country"/></school_country> </school_address> <degree><xsl:value-of select="degree"/></degree> <major><xsl:value-of select="major"/></major> <minor><xsl:value-of select="minor"/></minor> <grad_date><xsl:value-of select="gdate"/></grad_date> <gpa> <major_gpa><xsl:value-of select="magpa"/></major_gpa> <minor_gpa><xsl:value-of select="migpa"/></minor_gpa> <overall_gpa><xsl:value-of select="ovgpa"/></overall_gpa> <class_standing><xsl:value-of select="cs"/></class_standing> </gpa> </education> </xsl:for-each> <xsl:for-each select="/rowset/row[resumeid = current()]"> <honor> <honor_name><xsl:value-of select="hname"/></honor_name> <honor_date><xsl:value-of select="hdate"/></honor_date> </honor> </xsl:for-each> </resume> </xsl:for-each> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|