Re: [Xsltforms-support] XSLTForms transform function
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2011-10-11 21:19:50
|
Hello Morgan, > 1. My general question is: can you point me to any examples that make > use of the XSLTForms transform function? > > The only one I have been able to find is the one provided by Alain at: > > http://www.agencexml.com/svgopen/graphs.xml Sorry, I have no other example yet. I'm writing a form which enables to load an XSLT stylesheet from a local file into an instance, then to apply it to another instance and, finally, to save the result locally. The W3C Forms Working Group has not yet agreed on how the transform function should be in XForms 2.0. > > 2. My specific question is: is it possible to use the output from the > transform function to insert an element node into an existing instance? > > My attempt to do this is below but it does not work as hoped. > Currently, the transform() function in XSLTForms is just generating a text string. But a parse() function could be added or the transform() function could evolve to generate a sub-tree which could then be inserted in an instance. It implies that XML documents have to be associated with XPath expressions: it's not difficult to prototype this but this is more complex when refresh is to be done and when such expressions are used in repeats, especially when adding or deleting items. Thanks! -Alain |