RE: [xsl] local extremums

Subject: RE: [xsl] local extremums
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Tue, 18 Mar 2003 14:27:43 -0600
Hi Evgenia,
I too am having trouble understanding what you want.
In addition to bix's questions, I request clarification on #4:

> 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

bix asked about this; am I correct in understanding you want to "cast away"
the Range with the maximum @Cnt, and also the Range elements that
come immediately before and after the maximum Range in document order?

> 4. if line isn't empty than goto step 1

What do you mean by "line"?  Are you referring to the "list" from step 1, minus the maximum
and two nearest neighbors?
It sounds like you want to recurse (or iterate) on the list of <Range> elements in a particular
<Country> until the list is empty!  I must not be understanding you right, because that
doesn't give you any result.  Unless in line 3 you want to *output* (not discard) the maximum
and the two nearest neighbors.

If you give an example of the kind of output you want, that may make things clear.

Lars


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread