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

factorising elements as "country"

Subject: factorising elements as "country"
From: FEDOU <Nfedou@xxxxxxxxxxxx>
Date: Tue, 15 Jul 2003 19:22:44 +0200
factorising
Hi, I'm french so their might be some mistake in my mails, sorry for those.

My original XML file is a series of database's row as :
<ROW MODID="6" RECORDID="12643562">
  <Country>France</Country>
  <Town>Paris</Town>
  <Location>Espace Saint-Martin</Location>
  <Adr1>199 bis, rue Saint-Martin</Adr1>
  <Adr2/>
  <Tel>01 02 03 04 05</Tel>
  <Expo>Artcolle 2003 : 10ème salon international du collage
contemporain</Expo>
  <Date>20/07/2003 - 27/04/2003</Date>
</ROW>

I need something like :
<Calendar>
  <Country>France
    <Town>Paris
      <Location>Espace Saint-Martin
      <Adr1>199 bis, rue Saint-Martin</Adr1>
      <Adr2/>
      <Tel>01 02 03 04 05</Tel>
        <Expo>Artcolle 2003 : 10ème salon international du collage
contemporain</Expo>
        <Date>20/07/2003 - 27/04/2003</Date>
        <Expo>2nd Expo at same location</Expo>
        <Date>2nd Expo begin and end</Expo>
      </Location>
      <Location>2nd Location, same country/town in original file
      <Adr1&2+Tel />
      </Location>
    </Town>
    <Town>Next town in same country
      <its several child>
    </Town>
  </Country>
  <Country>Next country</Country>
</Calendar>

I did some sorting and I obtained a hierarchical Tree as the one shown.
I can't figure out how to output each country, town and location only ONCE !
As preceding:: axis don't look the sorted list.
As first() is the first of all coutries.

Thanks for your help.

Best regards, nicolas Fédou.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.