[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Q - Parsing & Manipulating Strings from XSL
Subject: RE: [xsl] Q - Parsing & Manipulating Strings from XSL
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 30 May 2005 17:11:05 +0100
|
> 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
Current Thread |
- Re: [xsl] Q - Parsing & Manipulating Strings from XSL, (continued)
- Dimitre Novatchev - Mon, 30 May 2005 06:00:59 +1000
- Ahsan Ali - Mon, 30 May 2005 08:29:37 +0400
- Michael Kay - Mon, 30 May 2005 10:13:07 +0100
- Message not available
- Ahsan Ali - Mon, 30 May 2005 17:53:12 +0400
- Michael Kay - Mon, 30 May 2005 17:11:05 +0100 <=
- Message not available
- Karl Stubsjoen - Mon, 30 May 2005 10:04:38 -0700
- Message not available
- Ahsan Ali - Tue, 31 May 2005 10:29:10 +0400
- Michael Kay - Tue, 31 May 2005 08:00:02 +0100
- Message not available
- Ahsan Ali - Tue, 31 May 2005 11:12:03 +0400
|