In the W3C specs it says this method should generate the same ID for a node regardless of when its called. Is this how it is implemented in BaseX or does it simply generate a random number? My testing seems to implicate the ladder. If it does generate the same ID for each node each time its run, does it do ensure uniqueness at the db or resource level? Thx for your time.- James
Hi James,
a node id generated via generate-id() is unique and the same during the runtime of a query. If you want to ensure that you are requesting the same nodes of a database, I recommend you to check out the node-id() and node-pre() functions of our database module [1].
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Database_Module ___________________________
On Mon, May 20, 2013 at 10:09 PM, James Wright james.jw@hotmail.com wrote:
In the W3C specs it says this method should generate the same ID for a node regardless of when its called. Is this how it is implemented in BaseX or does it simply generate a random number? My testing seems to implicate the ladder. If it does generate the same ID for each node each time its run, does it do ensure uniqueness at the db or resource level?
Thx for your time.
- James
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de