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

Re: New XPath extension function called xslt()

From: COUTHURES Alain <alain.couthures@agencexml.com>
Date: Fri, 23 Apr 2010 19:05:07 +0200
Message-ID: <4BD1D343.1050104@agencexml.com>
To: claud108 <claud108@yahoo.com>
CC: www-forms@w3.org

Sorry for the delay about this topic.

Using XSLT 1.0 a lot in different environements, I'm used to 
transformation functions returning text whether it's serialized X(HT)ML, 
not well-formed HTML, CSV or just unformatted text.

XSLT can be useful for XForms in different situations, the two most 
obvious for me being for output and for submission. In both cases, 
parsing is not required because "output" control cannot reference a  
subtree but an element with a text node and because submission has to 
send a serialized instance, of course.

For "output" control, this could be something like 
output/@value="xslt(....)". Having a doc() function can solve situations 
where the stylesheet isn't in an instance.

I also think that a serialize() function is required for use in output 
control, at least, to render an instance according to a media-type. I 
have already defined this function to render SVG images in instance with 

About parsing, something similar to "setvalue" action could be added, a 
"parse" action. Whether the document element should replace the 
referenced node or whether it should be dropped or just kept should be 

With this minimal set of extra items, a lot of powerful processing can 
be done!

Thank you for sharing your point of views!

-Alain Couthures

> Hi all,
> I have made some extension for XSLTForms (see 
> http://extxsltforms.sourceforge.net here ).
> Among these extensions, I've an xslt action, which performs a xsl
> transformation of a nodeset (part of a data instance), by using an external
> XSL stylesheet, and inserts the resulting nodeset in a data instance (see 
> http://extxsltforms.sourceforge.net/sitKubera/examples/xslt_action/test_xslt_action.xml
> here ).
> After analyzing this xslt action, the Forms WG concluded that an XPath
> extension function called xslt() would be more appropriated (see 
> http://www.w3.org/2010/03/25-forms-minutes.html here ).
> So, Leigh Klotz suggested the following syntax example:
> <submission method="post" ref="ex:xslt(.....)" resource="save.cgi" />
> where @ref should be considered by xslt() as xml doc to be transformed.
> Such usage is very nice and appropriate, as allows user to make some client
> XSL transformations before sending data to server.
> I but I think that I would be more than useful if such XSL transformations
> can be made also during filling the form by user.
> In this regard, I would like to ask the community for ideas regarding the
> syntax and usage of xslt().
> Thank you,
> Claudius Teodorescu
> -----
> Claudius Teodorescu
> http://kuberam.ro
Received on Friday, 23 April 2010 17:04:12 UTC

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