[MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get

Geert Josten geert.josten at dayon.nl
Thu Nov 10 11:34:11 PST 2011


I am pretty sure this used to work with a path like c:\ (ML even accepts
it as modules root!).

@Gurbeer, which version of Marklogic Server are you using, and which
xquery version did you specify?

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] Namens Shannon
Verzonden: donderdag 10 november 2011 20:28
Aan: General MarkLogic Developer Discussion
Onderwerp: Re: [MarkLogic Dev General] Invalid protocol scheme ith
dmp:document-get

David, that's not how the API reference reads to me: "Paramter: $location:
The location of the input document. If the scheme of the location is HTTP
(that is, if the string starts with "http://"), then the document is
requested over HTTP. If the scheme is file (that is, if the string starts
with "file://"), then the document is requested over file protocol from
the local filesystem. Otherwise, the document is fetched from the local
filesystem. On the filesystem, the path can be fully qualifed [sic] or
relative. Relative pathnames are resolved from the directory in which
MarkLogic Server is installed." If no protocol is specified, then an
absolute or relative filesystem path should suffice. Am I misinterpreting?


On Thursday, November 10, 2011 at 2:24 PM, Lee, David wrote:

>
> document-get is expecting a URL (not a file path)
>
>
> You should use the file:// scheme
>
>
> http://en.wikipedia.org/wiki/File_URI_scheme
>
>
>
>
>
>
> In your case
>
>
>
>
> file:///c:/ Documents%20and%20Settings/gurbeers/Desktop/bulk/abc.xml
>
>
>
>
>
>
>
> ----------------------------------------
>
>
> David A. Lee
>
>
> Senior Principal Software Engineer
>
>
> Epocrates, Inc.
>
>
> dlee at epocrates.com (mailto:dlee at epocrates.com)
>
>
> 812-482-5224
>
>
>
>
>
> From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Singh,
Gurbeer
> Sent: Thursday, November 10, 2011 2:19 PM
> To: general at developer.marklogic.com
(mailto:general at developer.marklogic.com)
> Subject: [MarkLogic Dev General] Invalid protocol scheme with
xdmp:document-get
>
>
>
>
>
>
> Hi
>
>
>
>
> Is there anything wrong , when I am running below query in cq its giving
error Invalid protocol scheme: C
>
>
>
>
>
>
>
>
> declare variable $doc := xdmp:document-get("C:\Documents and
Settings\gurbeers\Desktop\bulk\abc.xml",
>
>
> <options xmlns="xdmp:document-get"> <format>xml</format> </options>);
>
>
>
>
> return $doc
>
>
>
>
> [1.0-ml] XDMP-INVSCHEME: xdmp:document-get("C:\Documents and
Settings\gurbeers\Desktop\bulk\abc.xml", <options
xmlns="xdmp:document-get"><format>xml</format></options>) -- Invalid
protocol scheme: C
>
>
>
>
>
>
> ~Gurbeer
>
>
>
>
>
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the
opinions or views contained herein are not intended to be, and do not
constitute, advice within the meaning of Section 975 of the Dodd-Frank
Wall Street Reform and Consumer Protection Act. If you have received this
communication in error, please destroy all electronic and paper copies and
notify the sender immediately. Mistransmission is not intended to waive
confidentiality or privilege. Morgan Stanley reserves the right, to the
extent permitted under applicable law, to monitor electronic
communications. This message is subject to terms available at the
following link: http://www.morganstanley.com/disclaimers. If you cannot
access these links, please notify us by reply message and we will send the
contents to you. By messaging with Morgan Stanley you consent to the
foregoing.
>
>
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com (mailto:General at developer.marklogic.com)
> http://developer.marklogic.com/mailman/listinfo/general



_______________________________________________
General mailing list
General at developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


More information about the General mailing list