[MarkLogic Dev General] xdmp:document-load - possible bug?
Justin.Makeig at marklogic.com
Mon Aug 16 06:28:22 PDT 2010
I think you’re confusing xdmp:document-load with xdmp:document-get. The first parameter of document-load <http://developer.marklogic.com/pubs/4.1/apidocs/UpdateBuiltins.html#xdmp:document-load> is the document’s unique identifier once it’s successfully inserted into a database. This URI can be anything you want, as long as it’s unique. document-load is the complement to fn:doc <http://developer.marklogic.com/pubs/4.1/apidocs/SequenceBuiltins.html#fn:doc>, which allows you to retrieve a document from a database using its unique ID. The first parameter of document-get <http://developer.marklogic.com/pubs/4.1/apidocs/Ext-7.html#xdmp:document-get>, on the other hand, is the location of the document to be retrieved outside of a MarkLogic database. You can use HTTP or filesystem locations. It returns either the document itself, or as Nuno has illustrated, a serialized HTTP response.
Senior Product Manager
Phone +1 650 655 2387
email justin.makeig at marklogic.com<mailto:justin.makeig at marklogic.com>
This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.
On Aug 16, 2010, at 5:21 AM, Jacob Larsen wrote:
I would appreciate your opinion on this, before I report it as a bug.
I load an xml files using something like:
When http://some-apache-server/some-xml-file does not exist, apache reply “404 – Not Found” but also a simple HTML version of the error.
Mark Logic then creates a valid xml file from the HTML output, without checking the status code, and loads it.
I my view, this is clearly a bug. Every http GET request, should read the status code, and anything but 20* should result in some error from MarkLogic .
Any thoughts on this?
Civil Ingeniør | Software Engineer
Det Kongelige Bibliotek | The Royal Library
Digital Infrastruktur og Services | Digital Infrastructure and Services
tel +45 3347 4527 | jac at kb.dk
General mailing list
General at developer.marklogic.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General