[Xsltforms-support] XLSForms and XSLTForms: the default uuid() and how best to handle it
Brought to you by:
alain-couthures
From: pedro w. <ped...@go...> - 2017-12-18 15:17:50
|
Dear colleagues I realise that we can use the XLSForms ( http://xlsform.org/ ) editor to create XForms that will work with XSLTForms (there is going to be acronym hell here), but the XSLForms automatically creates a bind for a uuid element and uses a function "uuid()". How can this best be implemented in XSLTForms so that I can bring in an XLSForm XForm without any editing? I show an illustration of XLSForms output below Many thanks Peter <?xml version="1.0"?> <h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev=" http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx=" http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <h:head> <h:title>test_form1</h:title> <model> <submission action="http://xformstest.org/cgi-bin/echoinstance.sh" method="form-data-post"/> <instance> <test_form1 id="test_form1"> <today/> <gender/> <age/> <meta> <instanceID/> </meta> </test_form1> </instance> <bind jr:preload="date" jr:preloadParams="today" nodeset="/test_form1/today" type="date"/> <bind nodeset="/test_form1/gender" type="select1"/> <bind nodeset="/test_form1/age" type="int"/> <bind calculate="concat('uuid:', uuid())" nodeset="/test_form1/meta/instanceID" readonly="true()" type="string"/> </model> </h:head> <h:body> <select1 ref="/test_form1/gender"> <label>Respondent's gender</label> <item> <label>Male</label> <value>male</value> </item> <item> <label>Female</label> <value>female</value> </item> </select1> <input ref="/test_form1/age"> <label>Respondent's age</label> </input> </h:body> </h:html> |