[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: question about generate-id()

Subject: Re: question about generate-id()
From: Mark Howe <mark@xxxxxxxxxxxxxx>
Date: Sun, 08 Aug 2010 14:54:43 +0200
Re:  question about generate-id()
I was somewhat dismayed to discover a while back that generate-id()
didn't generate unique ids across multiple runs or with respect to
source documents. I think this makes generate-id() a lot less useful
than would otherwise be the case. But I can also see that checking for
uniqueness in arbitrary length and possibly multiple source documents is
not cheap.

For the Xcruciate project we rolled our own extension functions. The
more sensible of the two generates a UUID [1] that is supposed to be
unique anywhere in the universe, so probably with respect to the source
document. If a client ever complains about duplicates I plan to ask them
to replicate the problem :-)

Is there a good reason why a conforming implementation of generate-id()
couldn't return a UUID or similar? Presumably the processor could
generate an id however it does it now, generate a UUID with that id as a
key, and return the UUID wherever it would normally return the id. It
doesn't sound to me like it would be hard to code or expensive to run.

Would that be one way to keep everyone happy?

[1] http://www.ossp.org/pkg/lib/uuid/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.