Hi Peter,

Adding support for uuid() in XSLTForms was not difficult, it will be committed as soon as possible.

Yet, "select1" is not a valid type: as a workaround, it can be defined as a synonym for "string"...

Then, there is still a namespace issue in the generated form: xmlns="" has to be added to the root element of the instance.

Finally, "form-data-post" is not yet implemented in XSLTForms but it would be possible...

What do you think?

Alain

Le 18/12/2017 à 16:17, pedro winstley via Xsltforms-support a écrit :
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>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to