ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
[xsl] factorising elements as "country"
by FEDOU other posts by this author
Jul 15 2003 5:22PM messages near this date
RE: [boost] Re: Thoughts on fixdec | Re: [xsl] factorising elements as "country"
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
Thread:
FEDOU
David Carlisle

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved