View Single Post
  #16 (permalink)  
Old April 30th, 2018, 08:55 AM
Martin Honnen Martin Honnen is offline
Friend of Wrox
Points: 6,676, Level: 34
Points: 6,676, Level: 34 Points: 6,676, Level: 34 Points: 6,676, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2007
Location: Germany
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts

I managed to omit a crucial
in the key definition, now edited and corrected, the code would be
  <xsl:output indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:key name="dup" match="KeyFacts/Registration" use="concat(generate-id(..), '|', Country)"/>

  <xsl:template match="@* | node()">
      <xsl:apply-templates select="@* | node()"/>
  <xsl:template match="KeyFacts/Registration[not(generate-id() = generate-id(key('dup', concat(generate-id(..), '|', Country))[1]))]"/>
online at, that eliminates duplicates inside a "KeyFacts".

I am still not sure how "Fund" relates to that, given that the code sample you presented as the input has exactly one "Fund" and not two.
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
Reply With Quote
The Following User Says Thank You to Martin Honnen For This Useful Post:
virgosaggi (April 30th, 2018)