xsl-list
[Top] [All Lists]

Re: [xsl] sum up float values problem

2006-04-28 01:03:51
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>
--~--