W3C home > Mailing lists > Public > public-forms@w3.org > April 2010

Re: New XPath extension function called xslt(), versus XSLT as an action

From: COUTHURES Alain <alain.couthures@agencexml.com>
Date: Fri, 23 Apr 2010 23:04:28 +0200
Message-ID: <4BD20B5C.4070001@agencexml.com>
To: John Boyer <boyerj@ca.ibm.com>
CC: claud108 <claud108@yahoo.com>, public-forms@w3.org, "www-forms@w3.org" <www-forms@w3.org>
John,

Well, at least for XSLTForms, there is an appreciable difference in 
speed because, with an action, the text result has to be parsed and 
stored in specific DOM-like objects then serialized in Javascript. It's 
also much easier for developers not to have to write actions on events.

Wouldn't it be more interesting to consider dependencies with ancestors: 
if a node has changed, all its ancestors have too??

Thanks!

-Alain

John Boyer a écrit :
>
> Hi Alain,
>
> Agreed the ability to call the transform as a function is 
> syntactically easier.  Not sure why there is any appreciable 
> difference in speed.
>
> Regarding dependencies, though, yes I think you are missing where the 
> dependencies are coming from.
> The output of the xslt might be a string, but the input to be 
> transformed would be the *root* of some data node.  The function 
> implicitly consumes all nodes in the subtree, but the parameter refers 
> only to the root node, so the XPath containing xslt() would not have 
> any dependencies on all the nodes.
>
> If you call the xslt() function someplace that is ephemeral, like a 
> submission ref, then it's OK because the result is obtained at a point 
> in time, used and then discarded.  There is no long term tracking of 
> dependencies on the XPath.  But an XPath in a UI binding, for example, 
> is different.  The XForms processor is expected to make the UI reflect 
> the state of the model.  So any change within the entire data subtree 
> should reasonably cause your <xf:output value="xslt(data/root)"/> to 
> be updated by running the transform again.  And when that doesn't 
> happen, it looks like a language defect.
>
> Cheers,
> John M. Boyer, Ph.D.
> STSM, Lotus Forms
> Workplace, Portal and Collaboration Software
> IBM Victoria Software Lab
> E-Mail: boyerj@ca.ibm.com  
>
> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
> Blog RSS feed: 
> http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw
Received on Friday, 23 April 2010 21:03:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:53 UTC