a a <description xml:lang="en"/> </metadata> </xf:instance> <!-- Attachments --> <xf:instance id="fr-form-attachments"> <attachments> <css mediatype="text/css" filename="" size=""/> <pdf mediatype="application/pdf" filename="" size=""/> </attachments> </xf:instance> <!-- All form resources --> <!-- Don't make readonly by default in case a service modifies the resources --> <xf:instance id="fr-form-resources" xxf:readonly="false"> <resources> <resource xml:lang="en"> <first-phone> <label/> <hint/> <help/> <alert/> </first-phone> <send> <label>Send</label> <help/> <hint/> <alert/> </send> <number> <label>Phone</label> <hint/> <help/> <alert/> </number> <person> <label/> <help/> </person> </resource> </resources> </xf:instance> <!-- Utility instances for services --> <xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all"> <request/> </xf:instance> <xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all"> <response/> </xf:instance> <xf:instance xxf:readonly="true" id="phone-template"> <phone> <number/> </phone> </xf:instance> <xf:instance id="echo-instance" class="fr-service" xxf:exclude-result-prefixes="#all"> <body xmlns:formRunner="java:org.orbeon.oxf.fr.FormRunner" xmlns:gridOps="java:org.orbeon.oxf.fb.GridOps" xmlns:containerOps="java:org.orbeon.oxf.fb.ContainerOps" xmlns:controlOps="java:org.orbeon.oxf.fb.ControlOps" xmlns:secure="java:org.orbeon.oxf.util.SecureUtils" xmlns:version="java:org.orbeon.oxf.common.Version" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:sectionOps="java:org.orbeon.oxf.fb.SectionOps"><root/></body> </xf:instance> <xf:submission id="echo-submission" class="fr-service" ref="instance('fr-service-request-instance')" resource="http://xformstest.org/cgi-bin/echo.sh" method="post" serialization="application/xml" mediatype="application/xml" replace="instance" instance="fr-service-response-instance"/> <xf:action id="send-binding"> <!-- React to event... on control... --> <xf:action ev:event="DOMActivate" ev:observer="send-control" if="true()"> <!-- Service to call --> <xf:send submission="echo-submission"/> </xf:action> <!-- Request actions --> <xf:action ev:event="xforms-submit" ev:observer="echo-submission"> <!-- Get reference to initial request --> <xf:var name="request-instance-name" value="'echo-instance'" as="xs:string"/> <!-- Copy over to read-write request instance --> <xf:insert ref="instance('fr-service-request-instance')" origin="saxon:parse(instance($request-instance-name))"/> <!--<xf:insert ref="instance('fr-service-request-instance')" origin="instance($request-instance-name)"/>--> <!-- Set values if needed --> <xf:action context="instance('fr-service-request-instance')"> <xf:action class="fr-set-service-value-action"> <!-- Parameters --> <xf:var name="control-name" value="'first-phone'" as="xs:string"/> <xf:var name="path" value="/root" as="xs:string"/> <!-- Set value --> <xf:setvalue ref="$path" value="instance('fr-form-instance')/*/*[name() = $control-name]"/> </xf:action> <!-- Setvalue actions will be here --> </xf:action> </xf:action> <!-- Response actions --> <xf:action ev:event="xforms-submit-done" ev:observer="echo-submission" context="instance('fr-service-response-instance')"> <!-- Response actions will be here --> </xf:action> </xf:action> </xf:model> </xh:head> <xh:body> <fr:view> <fr:body xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:dataModel="java:org.orbeon.oxf.fb.DataModel" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline"> <fr:section id="person-control" bind="person-bind"> <xf:label ref="$form-resources/person/label"/> <xf:help ref="$form-resources/person/help"/> <fr:grid> <xh:tr> <xh:td> <xf:output id="first-phone-control" bind="first-phone-bind"> <xf:label ref="$form-resources/first-phone/label"/> <xf:hint ref="$form-resources/first-phone/hint"/> <xf:help ref="$form-resources/first-phone/help"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> </xf:output> </xh:td> <xh:td> <xf:trigger id="send-control" bind="send-bind"> <xf:label ref="$form-resources/send/label"/> <xf:help ref="$form-resources/send/help"/> <xf:hint ref="$form-resources/send/hint"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> </xf:trigger> </xh:td> </xh:tr> </fr:grid> <fr:grid id="phone-control" repeat="true" bind="phone-bind" origin="instance('phone-template')" min="1"> <xh:tr> <xh:td> <xf:input id="number-control" bind="number-bind"> <xf:label ref="$form-resources/number/label"/> <xf:hint ref="$form-resources/number/hint"/> <xf:help ref="$form-resources/number/help"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> </xf:input> </xh:td> </xh:tr> </fr:grid> </fr:section> </fr:body> </fr:view> </xh:body> </xh:html>