HI. I am curious of the reason to use directory-create vs just attaching information to URIS ending on '/'
creating directories allows for permissions, stec. This seems to be managed via properties on the path. If I do not need granular permission control, then what is the benefit of using xdmp:directory-create> Take this example: xquery version "1.0-ml"; declare namespace html = "http://www.w3.org/1999/xhtml"; (:let $dir1 := xdmp:directory-create('/foo/'):) let $fakedir := xdmp:document-set-properties('/foo2/', <some_information>baz</some_information>) let $insert := xdmp:document-insert('/foo/file1.xml', <something/>) let $insert := xdmp:document-insert('/foo2/file1.xml', <something/>) return <results> <my_directory_listing>{xdmp:directory("/foo2/")}</my_directory_listing> <properties_of_fake_dir>{xdmp:document-properties('/foo2/')}</properties_of_fake_dir> </results> - I can put a property on /foo/ - allowing me to keep 'directory-level' information - I can use xdmp:directory as well (even though it is not internally tagged as a directory) - I can also use cts:uri-match for other uses, etc So.. Other than granular permissions, what benefit to I get by using 'directories' rather than building on the sample above? Regards, David
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
