[MarkLogic Dev General] Forests and Collections querying problem

Danny Sokolsky dsokolsky at marklogic.com
Mon Aug 11 09:21:56 PDT 2008


Does this query also return nothing:

doc("mde:mdc://5ca78568-3bd5-46f9-bfef-1aa36f3eb3f8")/Metacard

If so, maybe there is nothing in that document under Metacard?

Also try this:

doc("mde:mdc://5ca78568-3bd5-46f9-bfef-1aa36f3eb3f8")/*

-Danny

-----Original Message-----
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Darren Govoni
Sent: Sunday, August 10, 2008 12:58 PM
To: General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] Forests and Collections querying problem

Correction:

cqsh> collection("MDCOL")/Metacard
Done (0.02 sec)
cqsh>

On Sun, 2008-08-10 at 12:59 -0400, Darren Govoni wrote:
> Hi Danny,
>   Thanks. Your new query works:
> 
> cqsh> xdmp:describe(fn:collection("MDCOL")[1]/node()); 
> doc("mde:mdc://5ca78568-3bd5-46f9-bfef-1aa36f3eb3f8")/Metacard
> 
> The documentation says collection() can be used anywhere doc() can be
> used. But trying this simple xpath query returns nothing.
> 
> cqsh> collection("MDCCOL")/Metacard
> Done (0.02 sec)
> cqsh>
> 
> I don't understand completely. I load the XML string into the database.
> MarkLogic reports it being loaded. I can run collection("MDCOL"); and
> see the documents. Yet every XPath/query I run using the collection
> to return a document returns nothing. 
> 
> How does one do simple XPath queries against a collection to return
> specific documents? I looked at all the use-cases, but none use
> collections that I could see. :(
> 
> I do appreciate your help. Sorry its time consuming to do this.
> 
> Darren
> 
> 
> On Sun, 2008-08-10 at 00:47 -0700, Danny Sokolsky wrote:
> > xdmp:describe(fn:collection("MDCOL")[1]/node())
> 
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


More information about the General mailing list