W3C home > Mailing lists > Public > www-forms@w3.org > August 2005

Evaluation context for xf:setvalue

From: Sergey Shebanin <splash@rulogic.ru>
Date: Wed, 31 Aug 2005 12:07:13 +0400
Message-ID: <43156531.4010700@rulogic.ru>
To: www-forms@w3.org

Hi there,

I think it is strange thing in recommendation errata for xf:setvalue 

 >The evaluation context for this XPath expression is the result from 
the Single Node Binding.

It needs to use of absolute path in @value. I think it is wrong.

I think that context for xf:setvalue/@value must be same as context for 

Following XForms code illustrates this discomfort:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
      <xf:instance id="edit">
      	<root xmlns="" id="null">
	    <object id="1"/>
	    <object id="2"/>


	<xf:repeat nodeset="instance('edit')/object" id="list">
	    <xf:trigger appearance="minimal">
	  	<xf:action ev:event="DOMActivate">
		    <!-- context of xf:output is current repeat row -->
		    <xf:message level="modal"><xf:output value="@id"/></xf:message>
		    <!-- this is properly use of xf:setvalue by the errata -->

		    <xf:setvalue ref="instance('edit')/@id" value="instance('edit')/object[index('list')]/@id"/>
		    <!-- this is my view of correct use of xf:setvalue -->
		    <xf:setvalue ref="instance('edit')/@id" value="@id"/>
Received on Wednesday, 31 August 2005 08:08:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC