SVG and XForms

Hello,

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/flags.xml, 
http://www.agencexml.com/xsltforms/piechart.xml, 
http://www.agencexml.com/xsltforms/gauges.xml and 
http://www.agencexml.com/xsltforms/gantt.xml.

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

Thanks!

-Alain

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