[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Duplicate Elimination

Subject: Duplicate Elimination
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Wed, 12 Mar 2014 20:34:48 +0000
 Duplicate Elimination
I have Date elements coming from 2 different parents.

<A>
  <Date>blah</Date>
</A>

<B>
    <Date>blah</Date>
</B>

I am doing

<xsl:apply-templates select="A/Date | B/Date>
   <xsl:sort select="." order="ascending"/>
</xsl:apply-templates>

and

<xsl:template match="Date">
 etc
</xsl:template>

I have noticed that when A and B have a child element of the same date
the Date template gets fired on each occasion, whereas I only want it
fired once

I  thought the union operator in the apply-templates would have the
effect of  eliminating duplicates or aren't they duplicates if they
have the same content but come from different parents.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.