Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XSL Sum for details items [Thread Next] Re: XSL Sum for details itemsTo: NULL Date: 2/13/2008 6:39:00 PM Hi. <xsl:template match="RECORD" mode="r7"> <F value="|" width="1" type="text"/> <F width="13" type="number" prec="2" align="right"> <xsl:attribute name="value"> <xsl:value-of select="@kwota"/> </xsl:attribute> </F> <F value="|" width="1" type="text"/> <F width="13" type="number" prec="2" align="right"> <xsl:attribute name="value"> <xsl:value-of select="@pozostaje"/> </xsl:attribute> </F> <F value="|" width="1" type="text"/> <F calc="true" value="@@FONT_NARROW_" /> </L> </xsl:template> <xsl:template match="RECORD" mode="r8"> <P type="text" name="sumaKwota" > <xsl:attribute name="value"> <xsl:value-of select="sum(@kwota)"/> </xsl:attribute> </P> <P type="text" name="sumaPozostaje" > <xsl:attribute name="value"> <xsl:value-of select="sum(@pozostaje)"/> </xsl:attribute> </P> </xsl:template> First tamplate is display in details section <DETAIL> <xsl:apply-templates select="RECORDSET7" /> </DETAIL> this section is repeated x times, and i have to get sum of @pozostaje and @kwota values and insert it into another template <xsl:template match="RECORD" mode="r8"> <P type="text" name="sumaKwota" > <xsl:attribute name="value"> <xsl:value-of select="sum(@kwota)"/> </xsl:attribute> </P> <P type="text" name="sumaPozostaje" > <xsl:attribute name="value"> <xsl:value-of select="sum(@pozostaje)"/> </xsl:attribute> </P> </xsl:template> but function sum() don't work, or I don't known how to use it, Please help. -- Pozdrawiam, ------------------------ ------[ Wincek ]-------- wincek(na)interia(dot)pl ------------------------ ------------------------ U¿ytkownik "Wincek" <wincek@i...> napisa³ w wiadomo¶ci news:foil6f$qv7$1@n...... > Hi , > How to compute sum of items @sumaKwota and @sumaPozostaje from > template > > <xsl:template match="RECORD" mode="r7"> > <P type="text" name="@Numer" > > <xsl:attribute name="value"> > <xsl:value-of select="@Numer"/> > </xsl:attribute> > </P> > <P type="text" name="@Data" > > <xsl:attribute name="value"> > <xsl:value-of select="@Data"/> > </xsl:attribute> > </P> > <P type="text" name="@Dokument" > > <xsl:attribute name="value"> > <xsl:value-of select="@Dokument"/> > </xsl:attribute> > </P> > <P type="text" name="@TrP_FormaNazwa" > > <xsl:attribute name="value"> > <xsl:value-of select="@TrP_FormaNazwa"/> > </xsl:attribute> > </P> > <P type="text" name="@Termin" > > <xsl:attribute name="value"> > <xsl:value-of select="@Termin"/> > </xsl:attribute> > </P> > <P type="number" prec="2" name="@kwota" > > <xsl:attribute name="value"> > <xsl:value-of select="@kwota"/> > </xsl:attribute> > </P> > <P type="number" prec="2" name="@pozostaje" > > <xsl:attribute name="value"> > <xsl:value-of select="@pozostaje"/> > </xsl:attribute> > </P> > <P type="text" name="sumaKwota" > > <xsl:attribute name="value"> > <xsl:value-of select="@sumaKwota"/> > </xsl:attribute> > </P> > <P type="text" name="sumaPozostaje" > > <xsl:attribute name="value"> > <xsl:value-of select="@sumaPozostaje"/> > </xsl:attribute> > </P> > </xsl:template> > > and return it into another template ?? > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
