Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Collecting data in each line Options

From: heshamelesawy@-----.---
To: NULL
Date: 6/26/2008 2:54:00 AM
On Jun 26, 10:35=A0am, "Joe Fawcett" <joefawc...@newsgroup.nospam>
wrote:
> <heshameles...@gmail.com> wrote in message
>
> news:c9937992-2f37-4d12-ba03-45c5b10dfd21@5......
>
>
>
> > I need to write xsl document to collect data csv:field[4] for each
> > line groubing by
> > csv:field[1]
>
> > <csv:line>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>48</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>20</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>6</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>6430</csv:field>
> > =A0 =A0 =A0 =A0</csv:line>
> > =A0 =A0 =A0 =A0<csv:line>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>23</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>18</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>5</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>4621</csv:field>
> > =A0 =A0 =A0 =A0</csv:line>
> > =A0 =A0 =A0 =A0<csv:line>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>48</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>23</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>198</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>5770</csv:field>
> > =A0 =A0 =A0 =A0</csv:line>
> > =A0 =A0 =A0 =A0<csv:line>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>25</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>27</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>7</csv:field>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<csv:field>8873</csv:field>
> > =A0 =A0 =A0 =A0</csv:line>
>
> In XSLT 2.0 use for-each-group, in XSLT 1.0 search for Muenchian Grouping=
.
>
> --
>
> Joe Fawcett (MVP - XML)http://joe.fawcett.name- Hide quoted text -
>
> - Show quoted text -


Sorry for duplicted message but i was think the message is not in
right Topic

I tried to do it like that

<xsl:for-each-group select=3D"csv:line" group-by=3D"csv:field[1]">
			<xsl:element name=3D"element">
				<xsl:attribute name=3D"Id">ID</xsl:attribute>
				<xsl:value-of select=3D"csv:field[1]"/>
			</xsl:element>
			<xsl:element name=3D"element">
				<xsl:attribute name=3D"Id">Sum</xsl:attribute>
				<xsl:value-of select=3D"sum(csv:field[4])"/>
			</xsl:element>
		</xsl:for-each-group>

but it didnt get the sum value its gust get the csv:field[4] for first
line only



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent