XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
David MareSubject: generate a uuid
Author: David Mare
Date: 17 May 2011 11:22 PM
Originally Posted: 17 May 2011 11:21 PM
Hi, does anyone have an example of a function to generate a UUID in xQuery?

Posttop
David MareSubject: generate a uuid
Author: David Mare
Date: 19 May 2011 07:04 AM
Originally Posted: 19 May 2011 07:01 AM
Should have checked first! There's a very good post on the forum:

http://www.stylusstudio.com/ssdn/default.asp?action=9&read=8478&fid=57

Here's the code described:
declare namespace uuid = "ddtekjava:java.util.UUID";
declare function uuid:randomUUID() as ddtek:javaObject external;
declare function uuid:toString($uuid as ddtek:javaObject) as xs:string external;

<root>
{uuid:toString(uuid:randomUUID())}
</root>

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.