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

Re: New XPath extension function called xslt()

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Fri, 23 Apr 2010 10:51:19 -0700
Message-ID: <q2te81b48eb1004231051sec1bdf15i27c2952e567d5a27@mail.gmail.com>
To: www-forms@w3.org
BTW as part of the "Node Creation XPath Functions" tentative feature
for XForms 1.2, we propose a parse() function. [1] A serialize()
function would be good too.

FWIW, see also the list of extension functions in Orbeon Forms [2],
which includes a serialize() function (which in fact is the Saxon
serialize() function).

-Erik

[1] http://www.w3.org/MarkUp/Forms/wiki/Node_'create'_functions
[2] http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-XML-manipulation

On Fri, Apr 23, 2010 at 10:05 AM, COUTHURES Alain
<alain.couthures@agencexml.com> wrote:
> Hi,
>
> 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
> XSLTForms.
>
> 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 considered...
>
> 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
> http://www.agencexml.com
>
>> 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:52:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:19 GMT