|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Q - Parsing & Manipulating Strings from XSL
Ok Woah! The decimal-format is a way cool function. (glad I read
through this)... I was about to suggest the old trick:
add 10000 to your number and right trim by 4.
Karl..
On 5/30/05, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>
> > Is there way to do this in pure XSLT instead of Xquery ??
>
> Of course. Just replace
>
> let $x := EXPR
>
> and
>
> declare variable $x := EXPR
>
> by
>
> <xsl:variable name="x" select="EXPR"/>
>
> and replace
>
> "return X" by
>
> <xsl:value-of select="X"/>
>
> Michael Kay
> http://www.saxonica.com/
>
> >
> > > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








