[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Group and compare data

Subject: Group and compare data
From: Verakso <verakso@xxxxxxxxx>
Date: Wed, 6 Oct 2004 10:56:00 +0200
compare data
I have som XML that looks like this:

<Forhandler>
	<Forhandler>
		<navn>Dealer name</navn>
		<email>mail@xxxxxxxxx</email>
		<adresse>road 11</adresse>
		<postnr>9999</postnr>
		<by>city</by>
		<telefon>4444444</telefon>
		<aabningstiderMan>7:30 - 17:30</aabningstiderMan>
		<aabningstiderTirs>7:30 - 17: 30</aabningstiderTirs>
		<aabningstiderOns>7:30 - 17:30</aabningstiderOns>
		<aabningstiderTors>7:30 - 17:30</aabningstiderTors>
		<aabningstiderFre>7:30 - 17:30</aabningstiderFre>
		<aabningstiderLoer>10:00 - 14:00</aabningstiderLoer>
		<aabningstiderSoen>Efter aftale</aabningstiderSoen>
	</Forhandler>
	<Forhandler>
		<navn>Another dealer</navn>
		<email>another@xxxxxxxxx</email>
		<adresse>another road</adresse>
		<postnr>5555</postnr>
		<by>big city</by>
		<telefon>5555555</telefon>
		<aabningstiderMan>07.30 - 17.30</aabningstiderMan>
		<aabningstiderTirs>07.30 - 17.30</aabningstiderTirs>
		<aabningstiderOns>07.30 - 17.30</aabningstiderOns>
		<aabningstiderTors>07.30 - 17.30</aabningstiderTors>
		<aabningstiderFre>07.30 - 16.00</aabningstiderFre>
		<aabningstiderLoer>Lukket</aabningstiderLoer>
		<aabningstiderSoen>Lukket</aabningstiderSoen>
	</Forhandler>
</Forhandler>

What I am trying to accomplish is to group the opening hours so they
look more nice.

For the first dealer the result would be:
Mon-Fre 7:30-17:30
Loer 10:00 - 14:00
Soen Efter aftale

For the second dealer the result would be:
Man-Tor 07.30 - 17.30
Fre 07.30 - 16.00
Loer-Soen Lukket

I have tried som xsl-choose loop, but I went sour in the complexity of
variations, what if a dealer have diffent opening hours every day of
the week.

So I thought, there must be at better approach on how to achieve this.
Is the use of keys a better approach, and if so, how?

/Thomas

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.