Hi All,

I am getting issue while uploading *.DAT file into MarkLogic. Have following 
content in file

TEST.DAT
-------------
ABC
RST
UVW
XYZ

upload.xqy
--------------
element result {
                element count 
{fn:count(fn:tokenize(xdmp:get-request-field("upload")/fn:string(),'
'))},
                element count 
{fn:count(fn:tokenize(xdmp:get-request-field("upload")/fn:string(),'
'))},
                element count 
{fn:count(fn:tokenize(xdmp:get-request-field("upload")/fn:string(),'
'))},
                element content {xdmp:get-request-field("upload")/fn:string()}
}

ui.xqy
---------------
<html xmlns="http://www.w3.org/1999/xhtml";>
    <body>
    <form name="test" action="upload.xqy?uid={xdmp:random()}" method="post"
          enctype="multipart/form-data">
    <p><label>File to upload:
    <input type="file" class="name" name="upload" size="50"/></label></p>
    <p><input type="submit" value="Upload and Get Results"/></p>
    </form>
    </body>
  </html>

When I am trying to upload the file I am expecting tokenized count to be 4 and 
actual data of the file in <content/> where I am getting binary stream 
characters and count as 1.

Any suggestion will be well appreciated

Thanks
Abhishek [images] <http://www.linkedin.com/pub/abhishek-srivastav/17/147/775/>
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful. Where permitted by applicable law, this e-mail 
and other e-mail communications sent to and from Cognizant e-mail addresses may 
be monitored.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to