W3C home > Mailing lists > Public > public-xformsusers@w3.org > April 2012

SVG and XForms

From: Alain Couthures <alain.couthures@agencexml.com>
Date: Mon, 02 Apr 2012 23:31:03 +0200
Message-ID: <4F7A1A97.9010608@agencexml.com>
To: public-xformsusers@w3.org, XSLTForms support <xsltforms-support@lists.sourceforge.net>

I have recently embedded XForms controls within SVG images to 
dynamically render data.

For chart axes, I needed a repeat group based on numbers not on nodes so 
I added an extension to XSLTForms: repeat/@from, repeat/@to and 
repeat/@step. The loop index can be obtained with the "." XPath 
expression so the context is not in any model and the instance() 
function has always to be used when referring to nodes.

For pie charts, I needed trigonometric functions, which are only 
available in XPath 3.0, but are already supported by XSLTForms.

For performance, I used an intermediate instance with calculated 
bindings. I might have implemented the new 'var' element but initially 
get confused with the 2.0 specs whether vars were limited to function 
bodies or not.

AVT support is, of course, very important for SVG but I also used output 
controls within text elements. I am not sure that labels in XForms group 
controls can easily be rendered in SVG.

Here are some online examples: 
http://www.agencexml.com/xsltforms/gauges.xml and 

I would be happy to have your opinions about SVG and XForms.


Received on Monday, 2 April 2012 21:31:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:40 UTC