Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xslt 2.0 getting two points of a list for interpolation

From: RolfK <Rolf.Kemper@--.-----.--->
To: NULL
Date: 12/12/2008 9:05:00 AM
Dear ALL,

does anybody have a solution for this:
I have a set of points (you can imagine a poly line) decribed this
way.

<?xml version="1.0" encoding="UTF-8"?>
<Line>
	<P X="10" Y="1.0"/>
	<P X="20" Y="2.1"/>
	<P X="30" Y="2.2"/>
	<P X="40" Y="4.3"/>
	<P X="50" Y="4.4"/>
	<P X="60" Y="3.5"/>
</Line>

What I want is to create a function which returns the Y value based on
an X value.
Easy, in case the X value exists. If not, I have to search the 2
nearest points and next  calculate Y.
I can assume that the X value is in the range of Xmin and Xmax of the
point data set.

What is the best code (XSLT2.0) to find the two nearest points for a
given X ?
(I have the feeling that a for-each-group may do, but this may be
wrong)

Any help is welcome

Rolf



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