Subject: Re: [xsl] local extremums From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx> Date: Wed, 19 Mar 2003 08:39:00 +0000 |
Hello!
I have a problem with determining local extremums (precisely - local maximums) of the list.
I mean I need to realize next algorithm: 1. take the list (it is //PoketTourList/Country/Range on first iteration) 2. determine the maximum @Cnt of this list 3. cast away this maximum and two his nearest neighbours 4. if line isn't empty than goto step 1 So I need a list with any flag showing Range is local extremum or not. Or I need a way to go throw whole list and determine if each Range is local extremum or not on every step.
The list structure is: <PoketTourList numChild="21"> <Country ID="12"> <Range PriceFrom="0" PriceTo="100" Cnt="0"/> <Range PriceFrom="100" PriceTo="150" Cnt="0"/> <Range PriceFrom="150" PriceTo="200" Cnt="71"/> <Range PriceFrom="200" PriceTo="250" Cnt="376"/> <Range PriceFrom="250" PriceTo="300" Cnt="751"/> <Range PriceFrom="300" PriceTo="350" Cnt="684"/> <Range PriceFrom="350" PriceTo="400" Cnt="585"/> <Range PriceFrom="400" PriceTo="500" Cnt="1135"/> <Range PriceFrom="500" PriceTo="600" Cnt="787"/> <Range PriceFrom="600" PriceTo="700" Cnt="586"/> <Range PriceFrom="700" PriceTo="800" Cnt="461"/> <Range PriceFrom="800" PriceTo="1000" Cnt="485"/> <Range PriceFrom="1000" PriceTo="1200" Cnt="173"/> <Range PriceFrom="1200" PriceTo="1400" Cnt="86"/> <Range PriceFrom="1400" PriceTo="10000" Cnt="91"/> </Country> ... </PoketTourList>
Please, please, help me!
<xsl:template match="/"> <xsl:apply-templates select="PoketTourList/Country"/> </xsl:template>
<xsl:template match="PoketTourList/Country"> <xsl:apply-templates select="Range"/> </xsl:template>
Regards, Ragulf Pickaxe :)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] local extremums, bix_xslt | Thread | Re: [xsl] local extremums, Ragulf Pickaxe |
RE: [xsl] Using an index with a sor, Conal Tuohy | Date | Re: [xsl] local extremums, Ragulf Pickaxe |
Month |