Did you load the documents without the .xml extension? If so, then MarkLogic 
probably considered the files binary (or possibly text) which would prevent you 
from using XPath into their structure.

From: azega...@audible.com
To: general@developer.marklogic.com
Date: Thu, 18 Aug 2011 12:16:52 -0700
Subject: Re: [MarkLogic Dev General]    Querying        across  multiple        
documets        loaded into a collection



Backed out the xml declaration and the namespace references, but left in the 
.xml extension on the URI.Still works as expected. Seems odd that .xml 
extension is explicitly required, but what the heck! Thanks From: 
general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Zegarek, Arthur
Sent: Thursday, August 18, 2011 3:14 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Querying across multiple documets loaded 
into a collection I think it was simply that the URI had to include “.xml” 
extension. I made the following changes:1: added <?xml version='1.0'   ?> at 
the top of each doc.2: added namespace within each doc, and in the xquery.3: 
added .xml extension to the URI. Only when I made the .xml extension did it 
work. I will now back out the first 2 changes and report results. Thanks! From: 
general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Micah Dubinko
Sent: Thursday, August 18, 2011 3:02 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Querying across multiple documets loaded 
into a collection Try this instead: for $test in collection("TESTDOCS")/* If it 
yields results, look at what element it returns. If it doesn't yield results, 
then for some reason your documents don't have any elements, and may not be 
getting loaded as XML. Does everything look good from the explore view? -m On 
Aug 18, 2011, at 11:52 AM, Zegarek, Arthur wrote: for $test in 
collection("TESTDOCS")/testreport 
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general                         
                  
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to