Keith,

 

You are right. That was not the intent, but more of a typo in the code - I
was calling collection() twice, when I thought the first time I was just
defining the collection name! So I was passing the documents returned by the
first collection() into the second one. This IS embarrassing, I was too busy
looking for problems with URIs to spot the more obvious issue!

 

Neil.

 

 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Keith L.
Breinholt
Sent: 01 September 2011 20:13
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Invalid URI Format Error?

 

Neil,

 

It would appear that you are passing the contents of the document to
fn:collection() instead of the URIs of the documents.

 

- Keith

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Neil
Sent: Thursday, September 01, 2011 1:08 PM
To: [email protected]
Subject: [MarkLogic Dev General] Invalid URI Format Error?

 

Hi,

 

I am getting a strange error when I try to access some document via a
particular collection.

 

This works OK, and returns the document I want:

 

 
fn:doc("/DOCS/0001012-0000002-0000064-XXXX-YYY-ZZ02_2010-05-17_17-43-14-109-
2.6.xml")

 

So the problem is not with the URI of that document.

 

Yet the error I get when I try to access that same document via a collection
that it belongs to implied a URI format problem:

 

  [1.0-ml] XDMP-URI: (err:FODC0004)
fn:collection((fn:doc("/DOCS/0001012-0000002-0000064-XXXX-YYY-ZZ02_2010-05-1
7_17-43-14-109-2.6.xml"), fn:doc("..."), fn:doc("..."), ...)) -- Invalid   
URI format: "ALL OF THE TEXT CONTENT OF THE SAME DOCUMENT (the first
document being returned) IS SHOWN HERE"

 

This appears to be finding the documents that I want. So what is going on
here? Does the collection() function have a problem with the document URIs,
even though other functions do not?

 

The collection itself is a URI like this:
"BATCH-0001012-0000002-XXXXXXXXXX.xml". Is there anything wrong with that
URI either? Anyway, that works when I do this:

 

    fn:count(   fn:collection("BATCH-0001012-0000002-XXXXXXXXXX.xml" )/ROOT
)

 

I access some of the same documents using a different collection, and I do
not get the error in that circumstance.

 

Neil.

 



NOTICE: This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy all
copies of the original message.

 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to