Re: [xsl] xpath question

Subject: Re: [xsl] xpath question
From: Adam Darwin <addarwin@xxxxxxxxxxx>
Date: Wed, 24 Oct 2001 08:16:49 +0100 (BST)
Ok, i take in the following xml snipet

<Building_Facility ID=1 Facility_Type="Bar" Name="BAr
38" .... />
<Building_Facility ID=1 Facility_Type="Bar" Name="Cat
& Canary" .... />
<Building_Facility ID=1 Facility_Type="Hotel"
Name="Tivoli" .... />
<Building_Facility ID=1 Facility_Type="Gymnasium"
Name="Fitness First" .... />
....


I then want a tabular output, but only outputting the
Facility_Type when it is the first one it comes
accross.

... So i'm looping through the Building_Facilities and
sorting on Facility_Type

<xsl:for-each select="/page/Building_Facilities">
  <xsl:sort select="@Facility_Type"/>

...and want the output to look like

BAR
         Bar 38
         Cat & Canary
HOTEL
         Tivoli
GYMNASIUM
         Fitness First
....

Is this any clearer?


 --- David Carlisle <davidc@xxxxxxxxx> wrote: > 
> > what is the syntax for "this for-each loops next
> > sibling" in the when test please
> 
> I can't parse this question. Maybe it would help if
> you showed a small
> input and the output you want.
> 
> I half suspect that this is a grouping question. in
> which case have a
> look at jeni's site. http://www.jenitennison.com/
> 
> David
> 
>
_____________________________________________________________________
> This message has been checked for all known viruses
> by Star Internet
> delivered through the MessageLabs Virus Scanning
> Service. For further
> information visit http://www.star.net.uk/stats.asp
> or alternatively call
> Star Internet for details on the Virus Scanning
> Service.
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
>  

____________________________________________________________
Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.

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


Current Thread