View Single Post
  #4 (permalink)  
Old June 4th, 2008, 01:36 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

Firstly, you need to say whether you're using XSLT 1.0 or 2.0. Grouping is much easier in 2.0, but if you're running client-side in the browser then you're stuck with 1.0 for the time being.

Secondly, you've shown the desired output but not the input.

And you haven't shown enough of the output. You say "If i see the corresponding node C value "LMP003" in source field BSTNR again in tree navigation, then it should not display the complete L node." So what should it display? Nothing at all?

The template you've shown, matching E1EDL41, produces one L element in your output for every E1EDL41 element in your input. You want to produce one L for a set of E1EDL41 elements that have the same BSTNR value. So the grouping needs to be done one level up, where you process the parent of the E1EDL41 elements.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote