This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: String match


>                 <start>
>                       <day>12</day>
>                       <month>January</month>
>                       <year>2002</year>
>                 </start>

You may find it easier to work with numeric dates if you want to sort
them or otherwise discriminate between them (eg months). The ISO date
format is dd-mm-yyyyThh:mm:ss.ss (capital T in the middle) which will
sort easily.

<eventRecord start="05-02-2002T" end="14-02-2002T">
  <title>Bla bla</title>
</eventsCalendar>

(BTW Does anyone know if truncated ISO dates are valid, or must they
be padded with a [possibly misleading] "...00:00:00.00" when no time
is specified?)

> 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

You can byte-slice the string values of attribute CDATA using
the substring-before and substring-after functions.

///Peter

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]