473,511 Members | 15,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calculate number


I'm trying to do this calculation in xsl but i get an error message:
"expression is not a node set"

<xsl:variable name="height" select="round(130/width*height)+10"/>

How do i save the result from this calculation in my variable?

height and width im my xml contains the height and width of an image.

Frederik
Jul 20 '05 #1
3 2268
In article <42*********************@nntp02.dk.telia.net>,
Frederik Sørensen <he******@NOSPAM.SPAM.patch.dk> wrote:
I'm trying to do this calculation in xsl but i get an error message:
"expression is not a node set"

<xsl:variable name="height" select="round(130/width*height)+10"/>


The division operator is "div", not "/".

The error message reflects the fact that you are trying to find the
<width> children of 130.

-- Richard
Jul 20 '05 #2
Works like a charm :)
Thanks for the very fast reply.

Frederik

Richard Tobin wrote:
In article <42*********************@nntp02.dk.telia.net>,
Frederik Sørensen <he******@NOSPAM.SPAM.patch.dk> wrote:

I'm trying to do this calculation in xsl but i get an error message:
"expression is not a node set"

<xsl:variable name="height" select="round(130/width*height)+10"/>

The division operator is "div", not "/".

The error message reflects the fact that you are trying to find the
<width> children of 130.

-- Richard

Jul 20 '05 #3
Frederik Sørensen wrote:

I'm trying to do this calculation in xsl but i get an error message:
"expression is not a node set"

<xsl:variable name="height" select="round(130/width*height)+10"/>

How do i save the result from this calculation in my variable?

height and width im my xml contains the height and width of an image.

Frederik


From a current project:

<xsl:value-of select="format-number(translate(((($upris - $ipris) * 100)
div $upris),',','.'), '#.##0,0', 'european' )"/>

As you can see, your variable best sport a '$' or they're not variables ;-)
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3994
by: Phil Powell | last post by:
Relevancy scores are normally defined by a MySQL query on a table that has a fulltext index. The rules for relevancy scoring will exclude certain words due to their being too short (minimum...
1
9971
by: Building Blocks | last post by:
Hi, All I need is a simle calculate form script which contains this: A script that can handle text input, radio buttons, checkboxes, and dropdowns. Each one of these variables will contain a...
1
13586
by: sg_s123 | last post by:
============================================================================ 02-Feb-04 03-Feb-04 Staff Staff 0800hr- 1300hr- 1700hr- 1900hr- 0800hr- 1300hr- 1700hr- 1900hr- Number...
4
9318
by: Jan Szymczuk | last post by:
I'm creating an MS Access 2000 database where I have a number of people entered using simple basic fields, Surname: SMITH Forenames: John DoB: 09/09/1958 Age:...
12
14442
by: paii, Ron | last post by:
Sorry about that last one. Does anyone know how to calculate the width a string of text for given Font name and size? I want to buildup a block of text strings to display in a unbound control,...
14
4682
by: SpyderSL | last post by:
Hey, I have created an access form, in which I have a drop down with employee names. These are the steps I would like to happen: 1. A user will enter a number in FIELD A 2. The user will...
6
5643
by: moshiur | last post by:
I'm a very new programmer. I have a sorted file and want to calculate delats between the numbers. That is calculate the difference between first number in line 1 and second number in line 2...
5
13632
by: Beemer Biker | last post by:
I cant seem to get that date into any DateTime to make my calculation directly by subtracting "01-01-0000" from "now". After reading this:...
8
8234
by: khosrow | last post by:
I want to calculate the nth root of an integer which is so big that can not even saved in unsigned long long. I've found a way to calculate the 2nd root but it can not be used for other. (I can read...
3
5943
by: Libber39 | last post by:
Hi everyone, Have a query on how to calculate the amount of weeks and days contained in a number in an access query. ie: the difference in days between 2 dates amounts to 17 days. I want to now...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.