Mistaken order?
Sunday, 1 September 2013 · 2 messages · last reply 2 Sep 2013
WP
Wendell Piez1 Sep 2013 20:21 #
Dear BaseX,
Running in the GUI, I execute:
let $source := (/)[1]
let $wrapped := <wrapper>
{ $source/*/* }
<new/>
</wrapper>return $wrapped/*/name()
I expect to get a sequence of the names of element children of the document (root) element of the first entry in the currently open database, with a 'new' element named at the end.
Instead, I get 'new' followed by the names of the elements in the
document, with 'new' first. (And I see 'new' for ($insert/*/name())[1]
and not for ($insert/*/name())[last()].)When I look at $insert itself, the document itself looks like what I expect.
Where am I going wrong, or is this a bug?
Cheers, Wendell
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^
WP
Wendell Piez2 Sep 2013 18:26 #
Dear Arve,
Ouch! The behavior is indeed as expected in 7.7. It is unexpected (and non-conformant) in 7.7 beta.
The saddest thing is that I have 7.7 installed and could have tried it there before posting. :-(
Cheers, Wendell
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^
Quoted text · Arve Gengelbach · 48 lines
On Mon, Sep 2, 2013 at 2:05 AM, Arve Gengelbach <ag at basex.org> wrote: > Hi Wendell, > > running your query on any database with BaseX version 7.7, everything > works as expected. Using the latter version? > > cheers, > Arve > > > Am 01.09.13 18:21, schrieb Wendell Piez: >> Dear BaseX, >> >> Running in the GUI, I execute: >> >> let $source := (/)[1] >> >> let $wrapped := <wrapper> >> { $source/*/* } >> <new/> >> </wrapper> >> >> return $wrapped/*/name() >> >> I expect to get a sequence of the names of element children of the >> document (root) element of the first entry in the currently open >> database, with a 'new' element named at the end. >> >> Instead, I get 'new' followed by the names of the elements in the >> document, with 'new' first. (And I see 'new' for ($insert/*/name())[1] >> and not for ($insert/*/name())[last()].) >> >> When I look at $insert itself, the document itself looks like what I expect. >> >> Where am I going wrong, or is this a bug? >> >> Cheers, Wendell >> >> >> Wendell Piez | http://www.wendellpiez.com >> XML | XSLT | electronic publishing >> Eat Your Vegetables >> _____oo_________o_o___ooooo____ooooooo_^ >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery