Hi all,

I am trying to upload files (binary and other) to database but need your help.
Using html forms and xdmp:get-request-field together with xdmp:document-insert 
I succeed.
But I had not the same result using xforms. In xform, the binary data is store 
in xml instance within an base64Binary element.
On the server side I decoded data and try to store like this:

let $contentToStore := xs:hexBinary(xs:base64Binary($contentEncoded)) 
let $work := xdmp:document-insert($doc, $contentToStore ) 

but get error $contentToStore is not a node. If I try to create an node using 
the data as
let $contentToStore2 := <binary> {$contentToStore}</binary> the data is stored 
as text BUT not binary.

The function document-insert doesn't have options for setting data format. The 
documentation says that the root element of the node defines the data format 
but I couldn't find any example how to set that.

How can I create a binary node from the hexBinary data ? Or is there another 
way for uploading files from xforms and base64Binary encoded data?

Any help is appreciated.



      
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to