Subject:Newbie: Help with counting and removing duplicate elements Author:wayne posner Date:28 Feb 2007 04:55 PM
Hi all.
I'm a definite newbie when it comes to XSLT. I've got an XSL file that takes an XML of one schema and maps it to another. As a result of the mapping I end up with duplicate sibling nodes in my tree. I need to remove the duplicates but count how many there were and set that value to a qty attribute in the remaining node. It is possible that there would be other nodes of the same value elsewhere in the tree, but I'm only concerned when they're immediate siblings.
I've done searches and read up on grouping and counting using the Muenchian Method, but I'm not sure how to modify my existing XSL to include the code and even just trying to do a simple count in a completely new XSL has been resulting in nothing being returned. Below is my current XSL code...any help would be greatly appreciated!