Link to home
Start Free TrialLog in
Avatar of Jim Metcalf
Jim MetcalfFlag for United States of America

asked on

coding in xslt - adding two values together, but only using the first 8 characters of the value

I am creating a hash off of account numbers.   using xslt, can someone help code the following?

the two account numbers i need added up are

192937465
and
123456789
the value the following code produces is 316,294,254

this is the value of the two account numbers if you take in the full 9 digit account number and use it in the summing equation.
i need for the xlst code to take the two account numbers and only add the first 8 digits of the accountnumber together together.
12345678 and 19283746 which would equal 31,629,424

the xlst code i currently have in place is

XSLT:
<xsl:variable name="ENTRYHASH">
        <xsl:call-template name="prepend-pad">
          <xsl:with-param name="padVar" select = "number(sum( /ACCOUNT/ACCOUNTNUMBER ))"/>
        </xsl:call-template>
      </xsl:variable>
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Metcalf

ASKER

Thanks Geert!