Hi,
I will implement a web interface to edit and update specific nodes in an existing database. This will probably be controlled mainly by the node-id. Therefore it is no good idea to change the collection during the editing process because node-ids would change.
However, it seems that when adding a document to a collection it will be integrated *after* all existing documents. Is it guaranteed that when adding a new document to a collection, no existing node-ids are changed? I would have to re-index the collection when adding new documents.
Best regards
Cerstin
Hi Cerstin,
correct, new documents will aways be added after the existing documents, which is why the existing node ids won't change. The ids returned by "node-id()" won't change, too, in contrast to the values returned by "node-pre()".
Hope this helps, Christian ___________________________
I will implement a web interface to edit and update specific nodes in an existing database. This will probably be controlled mainly by the node-id. Therefore it is no good idea to change the collection during the editing process because node-ids would change.
However, it seems that when adding a document to a collection it will be integrated *after* all existing documents. Is it guaranteed that when adding a new document to a collection, no existing node-ids are changed? I would have to re-index the collection when adding new documents.
Best regards
Cerstin
Dr. phil. Cerstin Mahlow
Universität Basel Deutsches Seminar Nadelberg 4 4051 Basel Schweiz
Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mahlow@unibas.ch Web: http://www.oldphras.net
This message was sent using IMP, the Internet Messaging Program.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi Christian,
Zitat von Christian Grün christian.gruen@gmail.com:
correct, new documents will aways be added after the existing documents, which is why the existing node ids won't change. The ids returned by "node-id()" won't change, too,
Perfect.
in contrast to the values returned by "node-pre()".
What does "pre" stand for? Is this some kind of hash-table value?
Cerstin
Hi Cerstin,
BaseX’ storage layer uses a pre/distance/size encoding for XML data (see [1]). If you label the start elements during a pre-order traversal of an XML document you get the value stored in pre. The db command 'info storage' prints the pre/distance/size table for the current database.
Cheers, Alex
[1] http://cl.ly/2706070q3m0B013a2647
On 19.02.2012, at 17:56, Christian Grün wrote:
Hi Cerstin,
correct, new documents will aways be added after the existing documents, which is why the existing node ids won't change. The ids returned by "node-id()" won't change, too, in contrast to the values returned by "node-pre()".
Hope this helps, Christian ___________________________
I will implement a web interface to edit and update specific nodes in an existing database. This will probably be controlled mainly by the node-id. Therefore it is no good idea to change the collection during the editing process because node-ids would change.
However, it seems that when adding a document to a collection it will be integrated *after* all existing documents. Is it guaranteed that when adding a new document to a collection, no existing node-ids are changed? I would have to re-index the collection when adding new documents.
Best regards
Cerstin
Dr. phil. Cerstin Mahlow
Universität Basel Deutsches Seminar Nadelberg 4 4051 Basel Schweiz
Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mahlow@unibas.ch Web: http://www.oldphras.net
This message was sent using IMP, the Internet Messaging Program.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Alexander Holupirek |-- http://www.informatik.uni-konstanz.de/~holupire |-- Database & Information Systems Group, U Konstanz `-- Room E 221, 0049 7531 88 2188 (phone) 3577 (fax)
basex-talk@mailman.uni-konstanz.de