Re: [xsl] XPath MOD 10 calculation

Subject: Re: [xsl] XPath MOD 10 calculation
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 24 May 2007 15:01:13 +0200
Abel Braaksma wrote:

sum( for $i in $x[position() mod 2 = 1] return $i * 3, for $i in $x[position() mod 2 = 0] return $i, = number(substring(., string-length(.) - 1, 1))


I must be sleepy or something. "for $i in $x[position() mod 2 = 0] return $i" is the same as " $x[position() mod 2 = 0]" of course ;) and that comma should be a right parenthesis:


  sum(
      for $i in $x[position() mod 2 = 1] return $i * 3,
      $x[position() mod 2 = 0])
      = number(substring(., string-length(.) - 1, 1))

Current Thread