XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 8th, 2011, 11:58 PM
balaji44 balaji44 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2011
Posts: 1 balaji44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 46 sec
Reputation Power: 0
XML to HTML using XSL

Hi,
I am new to XSL. I don't know how to loop through XML and filter duplicates using XSL. I tried several ways but i could hot get it done. 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 like this
------------------------------------
12345 - Jones Thomas

Address City Zipcode Brand TimeZone Amount
addr1 Atlanta 10231 new EST 100
addr2 Chicago 10232 old EST 1000
addr3 Dallas 16232 new CST 1500


23451 - David Beckley

Address City Zipcode Brand TimeZone Amount
addr4 mexico 15732 new CST 1500
addr5 UAE 1245125 old PST 1520

Can anyone please help me to get XSL for this. Thanks in advance.

Reply With Quote
  #2  
Old January 19th, 2012, 03:33 AM
kristy85 kristy85 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 13 kristy85 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 49 m 7 sec
Reputation Power: 0
XML to HTML using XSLT without Hardcoding Node names in XSLT

Hi All,

I am new to XML,XSLT. I have been assigned to task of Generating HTML pages based on the XML file & the condition is No Hardcoding of Nodes and other details.

My XML file is of the below struct:

Node inside Nodes , and those nodes would contain any number of attribuites or elements.


Now i need to knw , is there any Generic XSLT Algorithm to can do the above job and render the HTML page in the form of Navigation Tabs?

Please advice...

web development services | Web development company

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML to HTML using XSL

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap