[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: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sun, 08 Aug 2010 09:19:55 +0100
Re:  question about generate-id()
a given node? Again, a node from which nodeset?
All possible input nodes from the source document, doc() functions?

Any node that you pass to the function as an argument. The result is unique in the sense that if you call the function on two different nodes, you get two different identifiers. Or as the spec puts it: "it always generates the same identifier for the same node and ... different identifiers are always generated from different nodes."
My inferences: I assumed (clearly wrongly by this thread) that it
generated an ID value (call it xml:id for now) that was unique as
per the definition in XML, i.e. unique amongst the nodes of the input
document.

The spec explicitly says "There is no guarantee that a generated unique identifier will be distinct from any unique IDs specified in the source document.".


Michael Kay
Saxonica

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.