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

[ANN] script/@type="text/xforms" support in XSLTForms

From: Alain Couthures <alain.couthures@agencexml.com>
Date: Thu, 03 May 2012 22:40:37 +0200
Message-ID: <4FA2ED45.5040303@agencexml.com>
To: XSLTForms support <xsltforms-support@lists.sourceforge.net>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>

There is now a new experimental way to use XSLTForms (rev. 542) within 
an ordinary HTML page. It should be useful for authors with pages 
generated by a CMS for example.

It is based on using an SCRIPT element with @type="text/xforms" to 
encapsulate XForms elements (currently, just one SCRIPT element is 
supported per page).

A native XSLT engine is required (it won't work with old Android 
versions): it is called from Javascript instead of being called from a 
processing instruction.

Here is an example:
<title>In script test</title>
<script type="text/javascript" src="xsltforms.js">/* */</script>
<h1>In script test</h1>
<script type="text/xforms">
<div xmlns="http://www.w3.org/1999/xhtml" 
<data xmlns="">
<p>Type your first name in the input box.<br/>If you are running XForms, 
the output should be displayed in the output area.</p>
<xf:input ref="PersonGivenName" incremental="true">
<xf:label>Please enter your first name: </xf:label>
<xf:output value="concat('Hello ', PersonGivenName, '. We hope you like 
<xf:label>Output: </xf:label>

Thank you for your remarks and comments.

Received on Thursday, 3 May 2012 20:41:15 UTC

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