Filename and mediatype under "11.9.7 Serialization as multipart/form-data"

All,

In this section, the filename and mediatype may or may not be
available. Specifically:

* "if the filename is available"
* "the media type of the attachment if known"

Now what does it mean for those to be available?

Say you have:

<instance>
     <file1 filename="" mediatype=""/>
</instance>

<xforms:upload ref="file1">
     <xforms:filename ref="@filename"/>
     <xforms:mediatype ref="@mediatype"/>
</xforms:upload>

Now in this case, if the XForms processor actually stores a filename
and mediatype for the file uploaded, then obviously the processor can
figure out at serialization time those two values just by looking at
the control bound to <file1>.

But is this what is expected?

The alternative would be that the filename and mediatype are made
available in some secret way. E.g. things would work even without the
nested xforms:filename and xforms:mediatype elements:

<instance>
     <file1/>
</instance>

<xforms:upload ref="file1"/>

This question is related to my previous email. [1]

For reference, our implementation does this at the moment:

* It dereferences/serializes all the elements with type xs:anyURI or
   xs:base64Binary which actually validate according to these types.

* It takes the first xforms:upload control bound to that node, if
   any. If the control has nested xforms:filename and/or
   xforms:mediatype it uses the values pointed to by those elements to
   determine filename and/or mediatype.

-Erik

[1] http://lists.w3.org/Archives/Public/public-forms/2009Mar/0021.html

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Saturday, 7 March 2009 03:45:04 UTC