Hi, After more tests on xdmp:get-request-field() when the field is a file field (from a "file" type of HTML form input), it seems the returned value is always either:
- a binary node (instance of binary()) - or a document node with a text node as content (instance of document-node() and fn:exists($file/text())) Unfortunately this is not documented in the MarkLogic documentation, so I don't know which logic is applied to choose between both cases. So two questions: 1/ is this logic documented somewhere? 2/ is there any way to get a text node or a string from a binary node? (that is, how to "decode" the binary?) Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ Florent Georges wrote: > Joshua David Ewell wrote: > > Hi, > >>>> xdmp:get-request-field returns the named request field as a string. > >>> Thank you. But I just tried and "instance of xs:string" >>> returns false whilst "instance of binary()" returns false... > >> The documentation shows that the result from xdmp:get-request-field >> returns a string or nothing, hence the * in "as string*". It is a >> thought, but it may be possible that the request field is returning >> nothing and that is why you may be getting false in both test >> cases. > > Oops... Sorry, I made a "typo" in my previous email, I DO GET > TRUE for the expression "instance of binary()". > > Sorry, that was confusing, to say the least :-/ > > Regards, > > -- > Florent Georges > http://fgeorges.org/ > http://h2oconsulting.be/ _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
