Losing part of document name when renaming directory
Sunday, 24 May 2015 · 3 messages · last reply 26 May 2015
KF
Ketill Fenne24 May 2015 18:50 #
Hi!
I am running BaseX 8.1.
This is my test case:
create database test
add to /doc/title/version=1 c:/temp/xml.xml
Running query:
*for $doc in (collection('test')) return (base-uri($doc))*
Result: *test/doc/title/version=1*
Executing this command:
*rename /doc/title/ /doc/title2/*
Running query once again:
for $doc in (collection('test')) return (base-uri($doc))
Result: *test/doc/title2/ersion=1*
So, I am losing the "v" in version, that is the first letter after the directory that is renamed, seems to disappear with each rename.
A bug, or improper usage?
Kind regards
Ketill Fenne
CG
Christian Grün26 May 2015 11:59 #
Confirmed [1]! Will be fixed very soon. In the meanwhile, you can circumvent the buggy behavior by doing without the trailing slashes:
Quoted text · Ketill Fenne · 1 line
> rename /doc/title /doc/title2
Best,
Christian
[1] https://github.com/BaseXdb/basex/issues/1148
Quoted text · Ketill Fenne · 30 lines
On Sun, May 24, 2015 at 6:50 PM, Ketill Fenne <ketill.fenne at gmail.com> wrote: > Hi! > > I am running BaseX 8.1. > > This is my test case: > create database test > > add to /doc/title/version=1 c:/temp/xml.xml > > Running query: > for $doc in (collection('test')) return (base-uri($doc)) > > Result: test/doc/title/version=1 > > Executing this command: > rename /doc/title/ /doc/title2/ > > Running query once again: > for $doc in (collection('test')) return (base-uri($doc)) > > Result: test/doc/title2/ersion=1 > > So, I am losing the "v" in version, that is the first letter after the > directory that is renamed, seems to disappear with each rename. > > A bug, or improper usage? > > Kind regards > Ketill Fenne
CG
Christian Grün26 May 2015 13:37 #
A new snapshot is available, in which the bug is fixed.
Thanks,
Christian
Quoted text · Christian Grün · 43 lines
On Tue, May 26, 2015 at 11:59 AM, Christian Grün <christian.gruen at gmail.com> wrote: > Confirmed [1]! Will be fixed very soon. In the meanwhile, you can > circumvent the buggy behavior by doing without the trailing slashes: > >> rename /doc/title /doc/title2 > > Best, > Christian > > [1] https://github.com/BaseXdb/basex/issues/1148 > > > On Sun, May 24, 2015 at 6:50 PM, Ketill Fenne <ketill.fenne at gmail.com> wrote: >> Hi! >> >> I am running BaseX 8.1. >> >> This is my test case: >> create database test >> >> add to /doc/title/version=1 c:/temp/xml.xml >> >> Running query: >> for $doc in (collection('test')) return (base-uri($doc)) >> >> Result: test/doc/title/version=1 >> >> Executing this command: >> rename /doc/title/ /doc/title2/ >> >> Running query once again: >> for $doc in (collection('test')) return (base-uri($doc)) >> >> Result: test/doc/title2/ersion=1 >> >> So, I am losing the "v" in version, that is the first letter after the >> directory that is renamed, seems to disappear with each rename. >> >> A bug, or improper usage? >> >> Kind regards >> Ketill Fenne
Written for BaseX 8.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery