W3C home > Mailing lists > Public > public-xformsusers@w3.org > June 2018

Re: Embedded XForms

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Wed, 6 Jun 2018 10:21:15 +0000
To: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <323111AF-225B-4EC4-8B5A-DD37DFCFDD5A@marklogic.com>

By the statement, 'this node is used to initialise the textually first instance in the embedded form', do you mean the first instance, in document order, in the embedded form?



´╗┐On 05/06/2018, 10:34, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:

    OK, here is a strawman proposal for embedded XForms, presented as a piece  
    of spec text.
    It works by passing values to initialise an instance, and the embedded  
    form returns values using a submission with method="xforms-return".
    The control element
    This element embeds an XForm in the current form.
    Common Attributes: Control Common
    Special attributes:
        Required URL of a resource containing an XForm. This form will be  
    embedded within the current form.
        Optional single node expression. The value of this node is used to  
    initialise the textually first instance in the embedded form, in the same  
    way as a <submit replace="instance"/> would work. If absent, no values are  
    passed to the embedded form.
    ref (also bind)
        Optional single node binding that indicates the target node to receive  
    submissions from the embedded form that use the method 'xforms-return'. It  
    may be the same node as that used in the 'initial' attribute. If absent,  
    no values are returned from the embedded form (even if it uses submissions  
    using 'xforms-return' [which may cause an xforms error of some sort]).
    [For the submission element, there is a new method 'xforms-return' that  
    returns the values]
    [There is an action <renew control="id"/> that causes the initial values  
    reference to be copied to the embedded instance again]
    <control resource="today.xhtml" label="Today's date:"/>
    <output value="now()"/>
    <instance id="values">
        <data xmlns="">
    <control ref="instance('values')" resource="add.xhtml"  
    <output ref="sum"/>
    In the subform
        <values xmlns=""/>
    <bind ref="sum" calculate="../a + ../b"/>
    <submission method="xforms-return"/>
        <data xmlns="">
    <instance id="results"/>
    <control ref="instance('results')" resource="{testfile}"/>
    In test.xml
        <data xmlns="">
    <submission ref="results" method="xforms-return"/>
        <testsuite xmlns="">
                 <test res="" req="true">1</test>
                 <test res="" req="false">0</test>
    <repeat ref="testsuite/test">
         <control resource="{filename}" initial="tests" ref="result"/>
    in the subform
           <tests xmlns=""/>
        <instance id="result">
           <result xmlns="">
        <submission ref="instance('result')" method="xforms-return"/>
        <locations xmlns="">
           <here x="3498234" y="8734503"/>
           <home x="" y=""/>
           <dest x="" y=""/>
    <control ref="home" resource="map.xf" initial="here" label="Please locate  
    your home location"/>
    <control ref="dest" resource="map.xf" initial="here" label="Please locate  
    your destination"/>
    <select1 ref="game" label="select a game to play">
       <item label="minesweeper">minesweeper.xml</item>
       <item label="slider">slider.xml</item>
       <item label="noughts and crosses">xox.xml</item>
    <control resource="{game}"/>

Received on Wednesday, 6 June 2018 10:21:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 6 June 2018 10:21:46 UTC