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

RE: String match

Subject: RE: String match
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 7 May 2001 17:24:29 +0100
string match xsl
You are trying to group by the value of <month>.

See the solutions to grouping problems at www.jenitennison.com

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> tanz@xxxxxxxxxxxxxxxxxxxxx
> Sent: 07 May 2001 13:06
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  String match
> 
> 
> My xml is as follows:
> <eventsCalendar>
>  <eventRecord>
>                <title>Whatever</title>
>                 <start>
>                       <day>12</day>
>                       <month>January</month>
>                       <year>2002</year>
>                 </start>
>                 <end>
>                       <day>18</day>
>                       <month>January</month>
>                       <year>2002</year>
>                 </end>
> </eventRecord>
>     -------
> <eventRecord>
>                <title>Bla bla</title>
>                 <start>
>                       <day>05</day>
>                       <month>February</month>
>                       <year>2002</year>
>                 </start>
>                 <end>
>                       <day>14</day>
>                       <month>February</month>
>                       <year>2002</year>
>                 </end>
> </eventsCalendar>
> 
> At the moment my output produces the following:
> 
> January
> Title           Date
> Whatever   12 January 2002 - 18 January 2002
> Blabla         05 February 2002 - 14 February 2002
> 
> My xsl is as follows:
> <xsl:template name="ViewEvents">
> <table>
>     <tr> <td> <xsl:value-of
> select="/eventsCalendar/eventRecord/start/month"/>
>      </td></tr>
> </table>
> <table>
>     <tr>  <!-- deals with displaying the words Title and Date -->
>      </tr>
>       <xsl:apply-templates select="/eventsCalendar/eventRecord"/>
> <table>
> </template>
> 
> <template match="eventRecord">
> <td> <xsl:value-of select="title"/>
> </td>
>  -----
> </xsl:template>
> 
> My problem is that I need the following output:
> January
> Title           Date
> Whatever   12 January 2002 - 18 January 2002
> ---- <!-- containg January related events -->
> 
> February
> Title           Date
> Blabla         05 February 2002 - 14 February 2002
> <!-- containg February related events -->
> 
> Hence a mechanism to check that:
> If the 'start month' is the same - to apply eventRecord template
> but as soon as the 'start month' differs then to apply 
> ViewEvents template
> 
> Thanks:
> 
> Tanz
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 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.