Hi Guys,
I'm have problems with BASE-X and namespaces when I'm using put function for e.g
declare namespace bk := "http://acision.com.uri"; put( copy $nn := doc('D:/tstxml.xml') modify insert node <x/> into $nn/site/region/bk:africa return $nn, 'D:/tstxml.xml')
start of the tstxml.xml look like this
<site xmlns:bk="http://acision.com.uri"> <regions> bk:africa
I found out that when I use this the same query without specifying namespace it inserts element <x/> into bk:africa but it changes the document and it looks like:
<site > <regions> <bk:africa xmlns:bk="http://acision.com.uri%22%3E .... ... </x> </bk:africa>
Is this a bug or am I doing something wrong? I need to use namespace prefix in put function is it possible or it's not supported by BASE-X at all?
Thank for help
Jiri
Dear Jiří,
I tried to trace your problem, but I'm sorry I didn't succeed. If you omit the namespace declaration in your query, you'll most likely get an unknown prefix exception (XPST0081), and no document should be changed.
Please don't hesitate to supply us with more concise XML snippets and XQuery expressions, which allow reproducing the core problem.
Best, Christian
On Mon, Mar 8, 2010 at 10:07 AM, Jiří Kadlec jir.kadlec@post.cz wrote:
Hi Guys,
I'm have problems with BASE-X and namespaces when I'm using put function for e.g
declare namespace bk := "http://acision.com.uri"; put( copy $nn := doc('D:/tstxml.xml') modify insert node <x/> into $nn/site/region/bk:africa return $nn, 'D:/tstxml.xml')
start of the tstxml.xml look like this
<site xmlns:bk="http://acision.com.uri"> <regions> <bk:africa>
I found out that when I use this the same query without specifying namespace it inserts element <x/> into bk:africa but it changes the document and it looks like:
<site > <regions> <bk:africa xmlns:bk="http://acision.com.uri"> .... ... </x> </bk:africa>
Is this a bug or am I doing something wrong? I need to use namespace prefix in put function is it possible or it's not supported by BASE-X at all?
Thank for help
Jiri
basex-talk@mailman.uni-konstanz.de