W3C home > Mailing lists > Public > www-forms@w3.org > April 2005

How can a text file be uploaded by XForms?

From: Kianoush Eshaghi <Kianoush.Eshaghi@metadat.at>
Date: Thu, 21 Apr 2005 17:37:52 +0200
To: <www-forms@w3.org>
Message-ID: <000601c54688$14d001c0$510a0a0a@metadat.metadat.at>

Hi everybody!

I have implemented a form using XForms, whereby I use IE Plug-In
(FormsPlayer 1.3). I want to built some control element in the form
control, which enable to upload some text file (with extend .txt) into
some node of my XML instance. I've used <xforms:upload/> in my form
control, and set the type of node in instance as type="xsd:base64Binary"
as following:

<xf:model>
	<xf:instance>
		<request>
			<description/>
		</request>
	</xf:instance>
	<xf:bind id="des" nodeset="/request/description"
type="xsd:base64Binary"/>
</xf:model>

<xf:upload bind="des">
	<xf:label>Select the file:</xf:label>
</xf:upload>
<xf:output bind="des"/>

But I get as xml instance (output control) after uploading of the text
file some other encoded symbols.

How can I upload the content of the text file without any encoding at
the text into instance? I have tried with "xsd:string", but the
FormsPlayer cries ;-( that the instance is invalid.

I appreciate your tips and pointers.

freundliche Gruesse / best regards
Dipl.-Ing. Kianoush Eshaghi     T +43 1 74040-652
METADAT - The Architect for Knowledge Networks
Received on Thursday, 21 April 2005 16:09:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:00 GMT