W3C home > Mailing lists > Public > www-forms@w3.org > October 2001

RE: Evaluation context for <bind> expressions

From: Tomayko, Ryan <Ryan_Tomayko@stercomm.com>
Date: Mon, 29 Oct 2001 09:38:10 -0500
Message-ID: <5FD6397E455FD4118BAE000629383540014834EE@scidubmsg02.isg.stercomm.com>
To: "'Josef Dietl'" <josef@mozquito.com>, www-forms@w3.org
Thank you!

- Ryan

-----Original Message-----
From: Josef Dietl [mailto:josef@mozquito.com]
Sent: Monday, October 29, 2001 6:16 AM
To: www-forms@w3.org
Subject: Evaluation context for <bind> expressions


Dear all

my appologies: I have overlooked to forward the following to you from
the XForms Working Group. Thanks to Mikko Honkala who has prepared that
response, blame on me for letting it sit for a diproportionate long
time. We don't know yet how this is going to work out in the spec, but
it should give you an idea how we intend this to be worked out.

Josef

given the instance:

<items>
	<item>
		<price>100</price>
		<units>5</units>
		<total></total>
	</item>
	<item>
		<price>100</price>
		<units>5</units>
		<total></total>
	</item></items>

and bind:

<bind nodeset="/items/item/total" calculate="../price * ../units"/>

The following happens in calculations:

for each node n in nodeset do:
	calculate "../price * ../units" using
		n as the XPath context node
		the 'bind' element as the namespace context

So the effect is the same as having two binds:

<bind ref="/items/item[1]/total" calculate="../price * ../units"/>
<bind ref="/items/item[2]/total" calculate="../price * ../units"/>
Received on Monday, 29 October 2001 09:39:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:50 GMT