<OrganisationName Code=""/> </Document> </Content> </Data> </xforms:instance> <xforms:instance xmlns:xforms="http://www.w3.org/2002/xforms" id="Organisation-instance" src="http://localhost:8080/exist1-4/rest/db/atom-services/ui/getTaxonomy.xql"/> <xforms:bind id="OrganisationSelectBind" nodeset="instance('file-instance')//OrganisationName"/> <xforms:bind nodeset="instance('Organisation-instance')//Taxonomies/Taxonomy" id="OrganisationSelect"> <xforms:bind id="OrganisationCode" nodeset="Code"/> <xforms:bind id="OrganisationName" nodeset="Name"/> </xforms:bind> <xforms:submission id="model_submission" action="http://localhost:8080/exist1-4/rest/db/atom-services/xform-data/create-entry.xql" replace="all" method="post"> </xforms:submission> <xforms:bind nodeset="instance('file-instance')//Title" required="true()"/> </xforms:model> </head> <!-- User Interface --> <body class="xformformbg"> <xforms:group ref="instance('file-instance')"> <fieldset> <legend></legend> <table width="100%"> <tr> <td class="bx_red_top">Description</td> </tr> <tr> <td> <xforms:input ref="Content/Document/Title" class="MediumField" xxforms:maxlength="200"> <xforms:label class="Kwantu-Standard-Label">Title</xforms:label> <xforms:alert>Please enter the document title</xforms:alert> <xforms:help>Please enter the document title</xforms:help> </xforms:input> </td> </tr> <tr> <td> <xforms:select1 bind="OrganisationSelectBind" selection="open" incremental="true" appearance="xxforms:autocomplete" class="MediumFieldAutoComplete"> <xforms:label class="Kwantu-Standard-Label">Publisher</xforms:label> <xforms:itemset bind="OrganisationSelect"> <xforms:label bind="OrganisationName"/> <xforms:value bind="OrganisationName"/> </xforms:itemset> </xforms:select1> <html> <xforms:action ev:event="xforms-value-changed"> <xforms:setvalue ref="//Content/Document/OrganisationName/@Code" value="(for $name1 in instance('Organisation-instance')//Taxonomies/Taxonomy return if (normalize-space($name1/Name)= normalize-space(//Content/Document/OrganisationName/text())) then $name1/Code else ())" /> </xforms:action> </html> </td> </tr> <tr/> </table> </fieldset> <fieldset> <legend></legend> <table width="95%"> <tr> <td > <xforms:trigger class="btn"> <xforms:label>Submit</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="model_submission"/> </xforms:action> </xforms:trigger> </td> </tr> </table> </fieldset> </xforms:group> <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/> </body> </html>