xsl-list
[Top] [All Lists]

[xsl] Duplicate Elimination

2014-03-12 15:35:03
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>