Hi Bob,

You could use an md5 hash (xdmp:md5) using some seed that will differ
every time you make a URI. (E.g. use dateTime, but not in the same
transaction or you will get the same seed and, therefore, same md5 hash
for everything.) The md5 hash is not guaranteed unique, so it might be
worth keeping a list of formerly created URIs and checking there is no
collision when making a new URI.

Best,

Tim Finney

On Mon, 2009-05-04 at 11:34 -0500, Runstein, Robert E. (Contr) (IS)
wrote:
> Does MarkLogic provide a function to generate a unique document uri?
> If not, what approaches have you taken to create unique uris?  Thanks.
> 
> Best Wishes,
> 
> Bob Runstein
> 
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to