xsl-list
[Top] [All Lists]

Re: Q - Parsing & Manipulating Strings from XSL

2005-05-30 06:53:12
Michael,


Is there way to do this in pure XSLT instead of Xquery ?? Or a way to
embed this xquery statement into an xsl file ?


You've got a choice between using numeric arithmetic or duration arithmetic.
It's probably cleanest to use duration arithmetic though it's a bit verbose.

declare variable $one-minute := xdt:dayTimeDuration('PT1M')

then

let $time := xs:integer(JrnyTm) * $one-minute,
    $hours := hours-from-duration($time),
    $minutes := minutes-from-duration($time)
return
    concat($hours, ' hrs ', $minutes, ' minutes ')


Regards, Ahsan

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--