Hi Thomas,
I could reproduce the bug and we'll fix it soon. Your query however looks a bit strange to me:
Am 21.04.2011 14:31, schrieb Thomas Kaltofen:
insert node collection('db/docb')/rootB after collection('db/doca')/rootA
Your collection looks something like this:
collection(db) | |-- document(doca) | | | `-- <rootA .../> | `-- document(docb) | `-- <rootB .../>
Your query doesn't create a new document node (as XQuery Update doesn't operate on document level) but inserts the <rootB .../> element directly into the first document, which then has two(!) root elements:
collection(db) | |-- document(doca) | | | |-- <rootA .../> | | | `-- <rootB .../> [...]
That's allowed in XQuery Update, but isn't valid XML any more and I can't think of a scenario where it's actually desirable.
Is that what you wanted to do? If not, could you explain in more detail what you intended?
Cheers Leo
Hi Leo,
good to hear that you could reproduce the bug and that you can fix it. It is true that this query is strange and produces an invalid XML structure with two root nodes. My intention was to have several versions of one document underneath the same document node and to be honest I was seeing the document node as the "real" root node. But the example can be easily fixed by adding the other document underneath the root node 'rootA' instead of the same level as the root node. What problems could evolve from having several root nodes in one document in BaseX apart from the XML structure not being valid anymore?
Thanks for your support!
Best regards, Thomas
-----Original Message----- From: Leo Wörteler [mailto:lw@basex.org] Sent: Thursday, April 21, 2011 4:37 PM To: thomas@kaltofen.at; Thomas Kaltofen Cc: basex-talk Subject: Re: [basex-talk] Renaming of documents
Hi Thomas,
I could reproduce the bug and we'll fix it soon. Your query however looks a bit strange to me:
Am 21.04.2011 14:31, schrieb Thomas Kaltofen:
insert node collection('db/docb')/rootB after collection('db/doca')/rootA
Your collection looks something like this:
collection(db) | |-- document(doca) | | | `-- <rootA .../> | `-- document(docb) | `-- <rootB .../>
Your query doesn't create a new document node (as XQuery Update doesn't operate on document level) but inserts the <rootB .../> element directly into the first document, which then has two(!) root elements:
collection(db) | |-- document(doca) | | | |-- <rootA .../> | | | `-- <rootB .../> [...]
That's allowed in XQuery Update, but isn't valid XML any more and I can't think of a scenario where it's actually desirable.
Is that what you wanted to do? If not, could you explain in more detail what you intended?
Cheers Leo
Hi,
I just wanted to ask if the bug I described was fixed in version 6.6.2, because I just tried it with the new version and I still get the same error message and a corruption of the database. Thank you for your support!
Best regards, Thomas
-----Original Message----- From: Leo Wörteler [mailto:lw@basex.org] Sent: Thursday, April 21, 2011 4:37 PM To: thomas@kaltofen.at; Thomas Kaltofen Cc: basex-talk Subject: Re: [basex-talk] Renaming of documents
Hi Thomas,
I could reproduce the bug and we'll fix it soon. Your query however looks a bit strange to me:
Am 21.04.2011 14:31, schrieb Thomas Kaltofen:
insert node collection('db/docb')/rootB after collection('db/doca')/rootA
Your collection looks something like this:
collection(db) | |-- document(doca) | | | `-- <rootA .../> | `-- document(docb) | `-- <rootB .../>
Your query doesn't create a new document node (as XQuery Update doesn't operate on document level) but inserts the <rootB .../> element directly into the first document, which then has two(!) root elements:
collection(db) | |-- document(doca) | | | |-- <rootA .../> | | | `-- <rootB .../> [...]
That's allowed in XQuery Update, but isn't valid XML any more and I can't think of a scenario where it's actually desirable.
Is that what you wanted to do? If not, could you explain in more detail what you intended?
Cheers Leo
Dear Thomas,
seems this issue will take some more time to fix; I've added it to our issue tracker:
https://github.com/BaseXdb/basex/issues/96
Best, Christian ___________________________
2011/5/17 Thomas Kaltofen Thomas.Kaltofen@risc.uni-linz.ac.at:
Hi,
I just wanted to ask if the bug I described was fixed in version 6.6.2, because I just tried it with the new version and I still get the same error message and a corruption of the database. Thank you for your support!
Best regards, Thomas
-----Original Message----- From: Leo Wörteler [mailto:lw@basex.org] Sent: Thursday, April 21, 2011 4:37 PM To: thomas@kaltofen.at; Thomas Kaltofen Cc: basex-talk Subject: Re: [basex-talk] Renaming of documents
Hi Thomas,
I could reproduce the bug and we'll fix it soon. Your query however looks a bit strange to me:
Am 21.04.2011 14:31, schrieb Thomas Kaltofen:
insert node collection('db/docb')/rootB after collection('db/doca')/rootA
Your collection looks something like this:
collection(db) | |-- document(doca) | | | `-- <rootA .../> | `-- document(docb) | `-- <rootB .../>
Your query doesn't create a new document node (as XQuery Update doesn't operate on document level) but inserts the <rootB .../> element directly into the first document, which then has two(!) root elements:
collection(db) | |-- document(doca) | | | |-- <rootA .../> | | | `-- <rootB .../> [...]
That's allowed in XQuery Update, but isn't valid XML any more and I can't think of a scenario where it's actually desirable.
Is that what you wanted to do? If not, could you explain in more detail what you intended?
Cheers Leo _______________________________________________ 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