Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Max calculation with non-standard XML

From: m0nkeymafia <m0nkeymafia@-------.--.-->
To: NULL
Date: 6/15/2007 2:27:00 AM

On Jun 14, 5:44 pm, Martin Honnen <mahotr...@yahoo.de> wrote:
> m0nkeymafia wrote:
> > Can anyone help me find the maximum value of all Cells in all Rows in
> > position X.
>
> One way with XSLT 1.0 to find a maximum is by using xsl:sort to sort
> your nodes in descending order and then to output only the first
> element/value the sort produces, that way you have the maximum.
>
> --
>
>         Martin Honnen --- MVP XML
>        http://JavaScript.FAQTs.com/

Thanks
But how can I do this on my XML?
I have it like this
<Report>
   <Row>...<Cell>...Many cells here...</Cell>....</Row>
   <Row>...<Cell>...Many cells here...</Cell>....</Row>
   <Row>...<Cell>...Many cells here...</Cell>....</Row>
</Report>

So I would want the MAX Nth Cell out of all rows?
How do I create a collection of those Cells to sort through?
I currently get all the Cell data like so:

		<xsl:for-each select="Row">
				<xsl:for-each select="Cell">
					<xsl:if test="position() = $graphCol">

So I go through each row and check the position of the <Cell> matches
the column I want to plot

Thanks for any help its driving me mad!



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