[MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get
Lee, David
dlee at epocrates.com
Thu Nov 10 13:07:25 PST 2011
Excellent !
But still on linux C| or c: wont be found.
----------------------------------------
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 Walter Underwood
Sent: Thursday, November 10, 2011 3:03 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get
The colon character is already used to mark the scheme in URIs, so the file URI scheme replaces that with a vertical bar, like this:
file:///c|/<file:///c:\> Documents%20and%20Settings/gurbeers/Desktop/bulk/abc.xml
See: http://en.wikipedia.org/wiki/File_URI_scheme
wunder
Walter Underwood
Server Engineering, MarkLogic
http://www.marklogic.com/
On Nov 10, 2011, at 11:59 AM, Singh, Gurbeer wrote:
xdmp:platform() Linux
xdmp:architecture() x86_64
xdmp:version() 4.2-3.2
file:///c:/<file:///c:\> Documents%20and%20Settings/gurbeers/Desktop/bulk/abc.xml
This is not working :(
~Gurbeer
-----Original Message-----
From: general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com> [mailto:general-bounces at developer.marklogic.com] On Behalf Of Shannon
Sent: Thursday, November 10, 2011 2:42 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get
Hey Danny, I haven't worked in the Windows environment in years, but I thought the syntax looked right--it's as if the function was seeing "C:" as a protocol rather than the absolute path.
On Thursday, November 10, 2011 at 2:38 PM, Danny Sokolsky wrote:
You are correct Shannon, that should work on Windows, as on Windows that is valid. That is not a valid scheme on UNIX-based systems, however.
Gurbeer, what platform and version are you on (that is, that the server is running under)? To figure this out:
xdmp:platform(), xdmp:architecture(), xdmp:version()
-Danny
-----Original Message-----
From: general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com> [mailto:general-bounces at developer.marklogic.com] On Behalf Of Shannon
Sent: Thursday, November 10, 2011 11:28 AM
To: General MarkLogic Developer Discussion
Subject: 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:/<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> (mailto:dlee at epocrates.com)
812-482-5224
From: general-bounces at developer.marklogic.com<mailto: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> (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> (mailto:General at developer.marklogic.com)
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
General at developer.marklogic.com<mailto: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<mailto: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<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general
--------------------------------------------------------------------------
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
http://developer.marklogic.com/mailman/listinfo/general
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20111110/4b28929b/attachment-0001.html
More information about the General
mailing list