<icon /> <message /> </entry> </data> </xf:instance> <xf:bind nodeset="entry/icon" relevant=". != ''" type="xsd:anyURI" /> <xf:submission id="save" method="post" action="/cgi-bin/echoinstance.sh" replace="all" ref="instance('main')" /> <xf:instance id="icons"> <data xmlns=""> <icon /> </data> </xf:instance> <xf:bind nodeset="instance('icons')/icon" type="xsd:anyURI" /> <xf:submission id="post-icon" method="multipart-post" action="/cgi-bin/fake-upload-image.sh" replace="instance" ref="instance('icons')"> <xf:action ev:event="xforms-submit-done"> <xf:setvalue ref="instance('main')/entry/icon" value="instance('icons')/icon" /> </xf:action> </xf:submission> </xf:model> </head> <body> <xf:group ref="entry"> <xf:output ref="icon" mediatype="image/*"> <xf:label>Icon: </xf:label> </xf:output> <xf:input ref="title"> <xf:label>Title: </xf:label> </xf:input> <xf:textarea ref="message"> <xf:label>Message: </xf:label> </xf:textarea> <xf:upload ref="instance('icons')/icon"> <xf:label>Change Icon: </xf:label> <xf:action ev:event="xforms-value-changed"> <xf:send submission="post-icon" /> </xf:action> </xf:upload> <xf:submit submission="save"> <xf:label>Save</xf:label> </xf:submit> </xf:group> </body> </html>