Sorry, it is. I quickly replaced the names of the variables when typing
this email. The code indeed is:
declare function plp:delete ($uri-of-document-in-database as xs:string){
xdmp:http-delete(fn:concat("http://localhost:8008/test-http-functions.xq
y?uri=",$ uri-of-document-in-database))
};
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Eric
Palmitesta
Sent: Thursday, March 05, 2009 2:37 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Troubleshoot xdmp:http-delete()
$uri-of-document-in database as xs:string
should probably be
$uri-of-document-in-database as xs:string
Eric
Bondarenko, Taras wrote:
> Greetings.
>
>
>
> I'm finding that xqzone documentation of MLS is very light and on a
> surface, makes it really hard to understand what is going on.
>
>
>
> The problem:
>
>
>
> Have a function defined in library module (even though I'm not calling
> it at time of the request)
>
>
>
> declare function plp:delete ($uri-of-document-in database as
xs:string){
>
>
>
xdmp:http-delete(fn:concat("http://localhost:8008/test-http-functions.xq
y?uri=",$uri))
>
> };
>
>
>
> Getting error:
>
>
> *500 Internal Server Error*
>
> XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error,
> unexpected StringLiteral_, expecting Comma_ or Rpar_
>
> in /test-harness.xqy, on line NN [1.0-ml]
>
>
>
>
>
> Documentation is extremely misleading:
>
>
>
> "...Parameters: $uri : The URI of the document to delete..." - quite a
> clear description! And then a bit later: "Note the xdmp:http-delete
> function simply sends a DELETE request to the specified web
server;...".
> If there is a definition of conundrum, this is it!
>
>
>
> Any suggestions?
>
>
>
> Thank you
>
>
------------------------------------------------------------------------
>
> The information contained in this message is intended only for the
> recipient, and may be a confidential attorney-client communication or
> may otherwise be privileged and confidential and protected from
> disclosure. If the reader of this message is not the intended
recipient,
> or an employee or agent responsible for delivering this message to the
> intended recipient, please be aware that any dissemination or copying
of
> this communication is strictly prohibited. If you have received this
> communication in error, please immediately notify us by replying to
the
> message and deleting it from your computer. The McGraw-Hill
Companies,
> Inc. reserves the right, subject to applicable local law, to monitor
and
> review the content of any electronic message or information sent to or
> from McGraw-Hill employee e-mail addresses without informing the
sender
> or recipient of the message.
>
>
------------------------------------------------------------------------
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general