xsl-list
[Top] [All Lists]

RE: [xsl] Re: How to multiply 2 sequences ?

2007-11-08 06:39:29
I think that's as Dimitre described it, so it's essentially

sum(for $i in 1 to count(x) return x[$i]*y[$i])

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: TEICHERT, Peter [mailto:Peter(_dot_)TEICHERT(_at_)airbus(_dot_)com] 
Sent: 08 November 2007 12:45
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Re: How to multiply 2 sequences ?

Hello,

referring to Michael Kays math formula representation I 
provide more details what I am searching for.

food item 1: X1 = { x1_1,x1_2,...,x1_n }, where x1_n are food 
ingredients in mg/ 100 g ; X are extracted as nodes from xml 
db food item 2: X2 = { x2_2,x2_2,...,x2_n }, where x2_n are 
food ingredients in mg/ 100 g ...

every food ingredient of one single food item should be 
multiplied with his own weight factor Y

food item X1  -  weight factor Y1
food item X2  -  weight factor Y2

Therefore the math formula may be described as followes :

Y1 * X1 = Y1 * x1_1, Y1 * x1_2,..., Y1 * x1_n }
Y2 * X2 = Y2 * x2_1, Y2 * x2_2,..., Y2 * x2_n }

After multiplication with the weight factor the summation 
over the single food ingredients should be done as followes :

          Y1 * x1_1 + Y2 * x2_1 + ...+Yn * xn_n

Thanks for quick answer.

best regards

Peter Teichert


This e-mail is intended only for the above addressee. It may 
contain privileged information.
If you are not the addressee you must not copy, distribute, 
disclose or use any of the information in it. 
If you have received it in error please delete it and 
immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, 
may be accessed by someone other than the recipient, for 
system management and security reasons. This access is 
controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory 
Powers Act 2000, Lawful Business Practises.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>