On Wed, Feb 24, 2010 at 08:16:01PM -0500, David Epstein wrote:
Hi everyone,
Using the GUI (on localhost) I loaded:
Migdal_2001_State_in_Society_BOOK.xml
into test_collection_01.
Using the query below (from http://monetdb.cwi.nl/XQuery/QuickTour/Books/index.html) as a template but using my own setup and schema, I keep getting:
ERROR = !ERROR: err:FODC0002, Error retrieving resource (no such document...
I've tried just about every permutation in the doc() statement I can think of. What should the path be?
When loading your document via the GUI, you assigned it a name, right? That's the name (not path) you need to use in the doc() in your query. In short, if you preload a document via the GUI or via pf:add-doc(), you assign it a name and use that in fn:doc() to refer to that document; you use a path (in fact URI) with fn:doc() to refer to a not yet loaded ("external") document and make MonetDB/XQuery load that document on the fly (without assigning it a name other than that URI). See also http://monetdb.cwi.nl/XQuery/QuickTour/adminGUI/index.html http://monetdb.cwi.nl/XQuery/QuickTour/DOCMGT/index.html http://monetdb.cwi.nl/XQuery/Documentation/Adding-and-Deleting-Documents.htm... http://monetdb.cwi.nl/XQuery/Documentation/Collections-versus-Documents.html http://monetdb.cwi.nl/XQuery/Documentation/XML-Document-Cache.html http://monetdb.cwi.nl/XQuery/Documentation/Document-Management.html http://monetdb.cwi.nl/XQuery/Documentation/Document-Management-Functions.htm... http://www.w3.org/TR/xpath-functions/#func-doc Stefan
<bib> { for $b in doc("http://monetdb.cwi.nl/XQuery/files/bib.xml")/bib/book where $b/publisher = "Addison-Wesley" and $b/@year > 1991 return <book year="{ $b/@year }"> { $b/title } </book> } </bib>
thank you, -david
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 |