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>
jamesmetcalf74Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)Information ArchitectCommented:
sum() only works on nodes
so you need to sum in a hardcoded fashion
number(substring((/ACCOUNT/ACCOUNTNUMBER)[1] , 1, 8) + substring((/ACCOUNT/ACCOUNTNUMBER)[2] , 1, 8) )
that will do in XSLT1

If you need to do that on more than two,  you will need a recursive template
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jamesmetcalf74Author Commented:
Thanks Geert!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.