Hi Stéphane, The DLS library is implemented as an XQuery function module, it is not backed by core functionality for versioning. It really expects that all document access goes through the DLS library. There might be ways around, but they are cumbersome. I could imagine that you remove all read permissions from all non-HEAD versions, but you will have to add them again each time you would like to access the history. It also requires you are not running with the admin account, which by-passes all the permission stuff..
In short, rewriting the code sounds like the easiest solution. Kind regards, Geert Van: [email protected] [mailto:[email protected]] Namens Stephane Toussaint Verzonden: vrijdag 28 januari 2011 10:32 Aan: General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] Hide managed document versions in query result Hi Danny, Thanks for your answer. Your right, fn:doc()[cts:contains(., dls:documents-query())]//value works as cts:search(doc(), dls:documents-query())//value But both solutions are not really what I wan't because all my queries are already written, and I don't expect to rewrite them all. Maybe it is a philosophical point of view question, but I was expected that : - A simple call to native functions as fn:doc() will simply return the HEAD version of every documents in database. - The explicit use of the dls module, will permits access to every documents versions. Is there any way to do that by configuration (security constraints for instance ?) Thanks Stéphane Le 25 janv. 2011 à 20:49, Danny Sokolsky a écrit : I think maybe the following will work: fn:doc()[cts:contains(., dls:documents-query())]//value -Danny From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Stephane Toussaint Sent: Tuesday, January 25, 2011 3:18 AM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Hide managed document versions in query result Hi, I start playing a bit with the DLS library because I want to keep an history of version modification. The version management works well but now I'm facing a new problem. My queries aren't returning only the last version matching documents, but every single version matching the current query. Is there an unobtrusive way to hide version result (without explicitly use cst:search with dls:documents-query()) ? For exemple I want that : doc()//value return <value>TEST1</value> <value>TEST3</value> <value>TEST2</value> <value>TEST4</value> and not <value>TEST1</value> <value>TEST1</value> <value>TEST3</value> <value>TEST2</value> <value>TEST4</value> because document containing TEST1 is currently managed. Thanks Stéphane <image001.jpg> Stéphane TOUSSAINT XMS Technical Product Leader Tel : 01.61.08.50.30 Std : 01.61.08.50.20 Fax : 01.61.38.24.41 _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general [cid:[email protected]] Stéphane TOUSSAINT XMS Technical Product Leader Tel : 01.61.08.50.30 Std : 01.61.08.50.20 Fax : 01.61.38.24.41
<<inline: image001.jpg>>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
