Wow,

The beauty in its simplicity. 

Thank you,


Gary Vidal
Sr. .Net Developer
Tel: 212-592-4946
[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, August 11, 2007 3:00 PM
To: [email protected]
Subject: General Digest, Vol 38, Issue 8

Send General mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://xqzone.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."


Today's Topics:

   1. uuid implementation in Xquery (Gary Vidal)
   2. Re: uuid implementation in Xquery (Michael Blakeley)


----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Aug 2007 15:39:43 -0400
From: "Gary Vidal" <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] uuid implementation in Xquery
To: <[email protected]>
Message-ID:
        
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

 

I was wondering if anybody has implemented a uuid (universally unique
identifier) function in Xquery.  I would like to use this to generate
id's or a comparable id generation scheme

 

Regards,

 

Gary Vidal

Sr. .Net Developer

Tel: 212-592-4946

[EMAIL PROTECTED]

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://xqzone.marklogic.com/pipermail/general/attachments/20070810/3cc91
4f4/attachment-0001.html

------------------------------

Message: 2
Date: Fri, 10 Aug 2007 16:01:21 -0700
From: Michael Blakeley <[EMAIL PROTECTED]>
Subject: Re: [MarkLogic Dev General] uuid implementation in Xquery
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

I happen to have one in front of me right now. Note that there are at 
least five flavors of UUID - I chose to implement type-4.

(: this is a v4 UUID :)
define function generate-uuid-v4()
  as xs:string
{
   let $x := concat(
     xdmp:integer-to-hex(xdmp:random()),
     xdmp:integer-to-hex(xdmp:random())
   )
   return string-join((
     substring($x, 1, 8), substring($x, 9, 4),
     substring($x, 13, 4), substring($x, 17, 4), substring($x, 21, 14)
     ), '-'
   )
}

Ref: http://en.wikipedia.org/wiki/UUID

-- Mike

Gary Vidal wrote:
>  
> 
> I was wondering if anybody has implemented a uuid (universally unique
> identifier) function in Xquery.  I would like to use this to generate
> id's or a comparable id generation scheme
> 
>  
> 
> Regards,
> 
>  
> 
> Gary Vidal
> 
> Sr. .Net Developer
> 
> Tel: 212-592-4946
> 
> [EMAIL PROTECTED]
> 
>  
> 
> 
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4532 bytes
Desc: S/MIME Cryptographic Signature
Url :
http://xqzone.marklogic.com/pipermail/general/attachments/20070810/53d31
fba/smime-0001.bin

------------------------------

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


End of General Digest, Vol 38, Issue 8
**************************************
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to