balaji44 Posted July 8, 2011 Share Posted July 8, 2011 Hi, I am new to XSL. I don't know how to loop through XML and filter duplicates using XSL. Here is my requirement.My XML---------<?xml version="1.0" ?><X12Summary> <Unit volume="10" Amount="100"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <?xml version="1.0" ?><X12Summary> <Unit volume="10" Amount="100"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <Identifier Name="Address" Value="addr1" /> <Identifier Name="City" Value="Atlanta" /> <Identifier Name="Zipcode" Value="10231" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="EST" /> </Unit> <Unit volume="10" Amount="1000"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <Identifier Name="Address" Value="addr2" /> <Identifier Name="City" Value="Chicago" /> <Identifier Name="Zipcode" Value="10232" /> <Identifier Name="Brand" Value="old" /> <Identifier Name="TimeZone" Value="EST" /> </Unit> <Unit volume="10" Amount="1500"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <Identifier Name="Address" Value="addr3" /> <Identifier Name="City" Value="Dallas" /> <Identifier Name="Zipcode" Value="16232" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="CST" /> </Unit> <Unit volume="10" Amount="1500"> <Identifier Name="Customer ID" Value="23451" /> <Identifier Name="Customer Name" Value="David Beckley" /> <Identifier Name="Address" Value="addr4" /> <Identifier Name="City" Value="mexico" /> <Identifier Name="Zipcode" Value="15732" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="CST" /> </Unit> <Unit volume="10" Amount="1520"> <Identifier Name="Customer ID" Value="23451" /> <Identifier Name="Customer Name" Value="David Beckley" /> <Identifier Name="Address" Value="addr5" /> <Identifier Name="City" Value="UAE" /> <Identifier Name="Zipcode" Value="1245125" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="PST" /> </Unit></X12Summary> <Identifier Name="Address" Value="addr1" /> <Identifier Name="City" Value="Atlanta" /> <Identifier Name="Zipcode" Value="10231" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="EST" /> </Unit> <Unit volume="10" Amount="1000"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <Identifier Name="Address" Value="addr2" /> <Identifier Name="City" Value="Chicago" /> <Identifier Name="Zipcode" Value="10232" /> <Identifier Name="Brand" Value="old" /> <Identifier Name="TimeZone" Value="EST" /> </Unit> <Unit volume="10" Amount="1500"> <Identifier Name="Customer ID" Value="12345" /> <Identifier Name="Customer Name" Value="Jones Thomas" /> <Identifier Name="Address" Value="addr3" /> <Identifier Name="City" Value="Dallas" /> <Identifier Name="Zipcode" Value="16232" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="CST" /> </Unit> <Unit volume="10" Amount="1500"> <Identifier Name="Customer ID" Value="23451" /> <Identifier Name="Customer Name" Value="David Beckley" /> <Identifier Name="Address" Value="addr4" /> <Identifier Name="City" Value="mexico" /> <Identifier Name="Zipcode" Value="15732" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="CST" /> </Unit> <Unit volume="10" Amount="1520"> <Identifier Name="Customer ID" Value="23451" /> <Identifier Name="Customer Name" Value="David Beckley" /> <Identifier Name="Address" Value="addr5" /> <Identifier Name="City" Value="UAE" /> <Identifier Name="Zipcode" Value="1245125" /> <Identifier Name="Brand" Value="new" /> <Identifier Name="TimeZone" Value="PST" /> </Unit></X12Summary>Output should be in HTML table------------------------------------12345 - Jones ThomasAddress City Zipcode Brand TimeZone Amountaddr1 Atlanta 10231 new EST 100addr2 Chicago 10232 old EST 1000addr3 Dallas 16232 new CST 150023451 - David BeckleyAddress City Zipcode Brand TimeZone Amountaddr4 mexico 15732 new CST 1500addr5 UAE 1245125 old PST 1520Can anyone pls help me to get XSL for this. Thanks in advance Link to comment Share on other sites More sharing options...
vipasane Posted July 12, 2011 Share Posted July 12, 2011 Check this out and read comments toohttp://www.bernzilla.com/item.php?id=333 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.