xsl-list
[Top] [All Lists]

Re: [xsl] sum up float values problem

2006-04-30 09:24:36
Hello!

Thanks a lot for your help - I have it running now! ;-)

But please allow me one more question. Is there a way to get the sum result
into a variable or parameter? I would need the sum for further more
calculations...

Thanks
Markus


--- Ursprüngliche Nachricht ---
Von: "Dimitre Novatchev" <dnovatchev(_at_)gmail(_dot_)com>
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: [xsl] sum up float values problem
Datum: Fri, 28 Apr 2006 05:23:48 -0700

Florent explained it nicely.

TO summarise: When using a library of templates/functions (FXSL) one
has to download this library and have a look at some examples how to
use it.

One additional (and probably the most readable) article about FXSL is at:

  

http://www.mulberrytech.com/Extreme/Proceedings/xslfo-pdf/2003/Novatchev01/EML2003Novatchev01.pdf




--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.



On 4/28/06, Markus Gamperl <markus(_dot_)gamperl(_at_)gmx(_dot_)at> wrote:
I do not understand it:

When I copy this code into my stylesheet the processor wants to import a
stylesheet "transform-and-sum.xsl" but where is this file???

The explanation is very poor... Do you have more tips?

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";;
xmlns:func-transform="f:func-transform"
exclude-result-prefixes="xsl func-transform"

  <xsl:import href="transform-and-sum.xsl"/>

  <xsl:output method="text"/>

  <func-transform:func-transform/>

   <xsl:template match="/">
     <xsl:call-template name="transform-and-sum">
       <xsl:with-param name="pFuncTransform"
                       select="document('')/*/func-transform:*[1]"/>
       <xsl:with-param name="pList" select="/*/*"/>
     </xsl:call-template>
   </xsl:template>

   <xsl:template match="func-transform:*">
     <xsl:param name="arg" select="0"/>
     <xsl:value-of select="translate($arg, ',', '')"/>
   </xsl:template>

</xsl:stylesheet>


--- Ursprüngliche Nachricht ---
Von: "Dimitre Novatchev" <dnovatchev(_at_)gmail(_dot_)com>
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: [xsl] sum up float values problem
Datum: Thu, 27 Apr 2006 12:04:33 -0700

    sum(/*/*/xs:double(translate(.,',','.')))

 In XSLT 1.0?

In XSLT 1.0 I'd use the transform-and-sum template/function of FXSL
1.x

Search for "transform-and-sum" to get some examples of its usage.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant
intelligence.


On 4/27/06, Florent Georges <darkman_spam(_at_)yahoo(_dot_)fr> wrote:
Dimitre Novatchev wrote:

Exactly as explained by Dr. Kay:

    sum(/*/*/xs:double(translate(.,',','.')))

 In XSLT 1.0?

 Regards,

--drkm



























___________________________________________________________________________
Faites de Yahoo! votre page d'accueil sur le web pour retrouver
directement vos services préférés : vérifiez vos nouveaux mails,
lancez
vos
recherches et suivez l'actualité en temps réel.
Rendez-vous sur http://fr.yahoo.com/set


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--