I’m not quite sure on what you were asking, but I noticed that the explanation of PRE and ID values in our Wiki was somewhat deficient. Please don‘t hesitate to have yet another look at the revised articles [1,2], which are hopefully more self-explanatory. If not, you are always invited to read the dissertation in more detail ;)
[1] http://docs.basex.org/wiki/Database_Module#db:open-pre [2] http://docs.basex.org/wiki/Node_Storage _______________________________
On Mon, May 20, 2013 at 10:46 PM, James Wright james.jw@hotmail.com wrote:
How did I not notice this!! I have read through those modules so many times now!! I think this is exactly what I was looking for. I expected there to be some sort of persistent id because I skimmed the initial dissertation on BaseX from several years ago and it talks about a persistent ID. In regards to the 'pre' this ID represents the id of a node which 'hasn't' been inserted yet but it does not necessarily denote the ID the node will take when actually inserted... So whats the point? Is this more for internal uses? Maybe I don't fully understand...
Thanks for the quick reply!
- James
From: christian.gruen@gmail.com Date: Mon, 20 May 2013 22:30:08 +0200 Subject: Re: [basex-talk] BaseX generate-id() To: james.jw@hotmail.com CC: basex-talk@mailman.uni-konstanz.de
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