Why does this query (on BaseX 7.5, basexgui)
let $ns := namespace {''} {'the-namespace'} let $c1 := <c xmlns="the-namespace">text</c> let $c2 := <c>{ $ns,'text'}</c> let $c3 := element {'c'} {$ns,'text'} let $qn := QName($ns, 'c') let $c4 := element {$qn} {'text'} let $nl := " " return ($c1,$nl, $c2,$nl, $c3,$nl, $c4,$nl, '|' || namespace-uri-from-QName(node-name($c1)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c2)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c3)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c4)) || '|',$nl)
outputs
<c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> |the-namespace| || || |the-namespace|
I.e, the namespace seems to exist on all four cases when outputted, by node-name finds it only if the namespace is given in element as text, or as QName value in computed element.
-- Arto Viitanen Microteam Oy Finland
Dear Arto,
thanks for reporting this; looks like a bug, which I’ve added to our issue tracker:
https://github.com/BaseXdb/basex/issues/618
Best, Christian ___________________________
On Fri, Jan 11, 2013 at 2:54 PM, Arto Viitanen arto.viitanen@microteam.fi wrote:
Why does this query (on BaseX 7.5, basexgui)
let $ns := namespace {''} {'the-namespace'} let $c1 := <c xmlns="the-namespace">text</c> let $c2 := <c>{ $ns,'text'}</c> let $c3 := element {'c'} {$ns,'text'} let $qn := QName($ns, 'c') let $c4 := element {$qn} {'text'} let $nl := " " return ($c1,$nl, $c2,$nl, $c3,$nl, $c4,$nl, '|' || namespace-uri-from-QName(node-name($c1)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c2)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c3)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c4)) || '|',$nl)
outputs
<c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> |the-namespace| || || |the-namespace|
I.e, the namespace seems to exist on all four cases when outputted, by node-name finds it only if the namespace is given in element as text, or as QName value in computed element.
-- Arto Viitanen Microteam Oy Finland
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi Arto,
it has been quite a while when you had stumbled upon an issue with the XQuery 3.0 namespace constructor. More specifically, it was unclear back then what happens if a dynamic default namespace is specified in an element constructor. I just wanted to let you know that we can’t offer a fix for this yet, but the issue will soon be discussed in the W3 working group [1] and may lead to an update of the XQuery specification.
More soon, Christian
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=22032 ___________________________
On Mon, Jan 14, 2013 at 12:59 PM, Christian Grün christian.gruen@gmail.com wrote:
Dear Arto,
thanks for reporting this; looks like a bug, which I’ve added to our issue tracker:
https://github.com/BaseXdb/basex/issues/618
Best, Christian ___________________________
On Fri, Jan 11, 2013 at 2:54 PM, Arto Viitanen arto.viitanen@microteam.fi wrote:
Why does this query (on BaseX 7.5, basexgui)
let $ns := namespace {''} {'the-namespace'} let $c1 := <c xmlns="the-namespace">text</c> let $c2 := <c>{ $ns,'text'}</c> let $c3 := element {'c'} {$ns,'text'} let $qn := QName($ns, 'c') let $c4 := element {$qn} {'text'} let $nl := " " return ($c1,$nl, $c2,$nl, $c3,$nl, $c4,$nl, '|' || namespace-uri-from-QName(node-name($c1)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c2)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c3)) || '|',$nl, '|' || namespace-uri-from-QName(node-name($c4)) || '|',$nl)
outputs
<c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> <c xmlns="the-namespace">text</c> |the-namespace| || || |the-namespace|
I.e, the namespace seems to exist on all four cases when outputted, by node-name finds it only if the namespace is given in element as text, or as QName value in computed element.
-- Arto Viitanen Microteam Oy Finland
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