Practical example
fn:collection('tweets')/xdmp:node-uri(.)
you can also use fn:base-uri
fn:collection('tweets')/base-uri(.)
-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 812-482-5224
Cell: +1 812-630-7622
www.marklogic.com
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michael Blakeley
Sent: Saturday, June 29, 2013 6:44 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Displaying docs in a collection
The easiest fit is http://docs.marklogic.com/xdmp:node-uri - but you could also
refactor to use http://docs.marklogic.com/cts:uris
-- Mike
On 29 Jun 2013, at 15:39 , Michael Malgeri <[email protected]>
wrote:
> Hi,
>
> Hopefully an easy question.
>
> If I run the following code in the Query Console, the <Make> tag and its
> contents are displayed for the documents in the collection "tweets"
>
> xquery version "1.0-ml";
> for $doc in fn:collection('tweets')
> return
> $doc//Make
>
> Here is the output
>
> <results warning="more than one root item">
> <Make>Honda</Make>
> <Make>Ford</Make>
> </results>
>
> The question is, how do I display just the list of documents in this
> collection, such as
>
> /truecarcsvcomma2/027cd7200a0a00de0109b4cbb3761e64.xml
> /truecarcsvcomma2/027cd7200a0a00de0109b4cbb4571e64.xml
> Etc.
>
> Michael Malgeri
> Principal Technologist
> MarkLogic Corporation
> [email protected]
> Cell: 1 310 704 6403
> www.marklogic.com
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general