Hi, Thanks for your replies! I found out that cts:element-values behaves differently, when there is a $query parameter. Without $query parameter the default is "any", but with $query parameter the default is "document". The solution for me is to specify "any" or "properties".
Regards, Andreas 2015-02-20 14:50 GMT+01:00 Geert Josten <[email protected]>: > You probably also want to add the "properties" or "any" option.. > > Cheers > > From: Joe Bryan <[email protected]> > Reply-To: MarkLogic Developer Discussion <[email protected]> > Date: Friday, February 20, 2015 at 2:03 PM > To: MarkLogic Developer Discussion <[email protected]> > Subject: Re: [MarkLogic Dev General] cts:element-values on > document-properties > > Hi Andreas, > > You can pass a sequence of URIs to cts:document-query() ( > http://docs.marklogic.com/cts:document-query ). > > As for your directory query example, maybe you need to set the depth to > "infinity"? http://docs.marklogic.com/cts:directory-query > > Thanks. > > -jb > > > From: Andreas Hubmer <[email protected]> > Reply-To: MarkLogic Developer Discussion <[email protected]> > Date: Friday, February 20, 2015 at 6:32 AM > To: MarkLogic Developer Discussion <[email protected]> > Subject: [MarkLogic Dev General] cts:element-values on document-properties > > Hi, > > I am wondering whether it is possible to constrain an > element-values-query on a property element by a query on the document. > > I have a property *person *and > cts:element-values(xs:QName("ns:person")) > gives me all values for that property. This works fine. > > Now I want to constrain the list of values by a query on the documents > to which the properties belong. For example, let's say that I only want the > property values of documents within some directory. > > let $query := cts:directory-query("/mydir/") > return cts:element-values(xs:QName("ns:person"), (), (), $query)) > Now I don't get any results any more. It seems that the result of $query > does not contain the properties. Is it possible to do something > like cts:properties-fragment-query, but the other way round? > > Any ideas? > > Thanks, > Andreas > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > -- Andreas Hubmer IT Consultant EBCONT enterprise technologies GmbH Millennium Tower Handelskai 94-96 A-1200 Vienna Mobile: +43 664 60651861 Fax: +43 2772 512 69-9 Email: [email protected] Web: http://www.ebcont.com OUR TEAM IS YOUR SUCCESS UID-Nr. ATU68135644 HG St.Pölten - FN 399978 d
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
