Namespace conflict in XQuery update

Thursday, 19 September 2013 · 2 messages
A
alxarch19 Sep 2013 13:01 #
While trying to transform an xhtml document I ran into this general case:
copy $ul :=
<ul xmlns="http://www.w3.org/1999/xhtml">
<li>item</li>
<li>item</li>
</ul>

modify
(
  rename node $ul as QName("http://www.w3.org/1999/xhtml","ol"),
  insert node attribute class {"a"} into $ul
)
return $ul
which throws an "[XUDY0024] New namespaces conflict with each other." error. After reading the XQuery update facility recomendation it wasn't clear to me if this is supposed to happen. Do I *have* to use chained copy statements to achieve both renaming a node an inserting an attribute? Thanks, Alex
CG
Christian Grün19 Sep 2013 14:43 #
Good catch, has been fixed; attributes without namespace are now ignored in the check [1]. I’ve uploaded a new snapsho. Thanks, Christian [1] https://github.com/BaseXdb/basex/commit/a587e8c9640f79fd5b5c943356164cea48a0a614 [2] http://files.basex.org/releases/latest/ ___________________________ 2013/9/19 alxarch <alxarch at gmail.com>:
Quoted text · alxarch · 30 lines
> While trying to transform an xhtml document I ran into this general case: > > copy $ul := > <ul xmlns="http://www.w3.org/1999/xhtml"> > <li>item</li> > <li>item</li> > </ul> > > modify > ( > rename node $ul as QName("http://www.w3.org/1999/xhtml","ol"), > insert node attribute class {"a"} into $ul > ) > return $ul > > > which throws an "[XUDY0024] New namespaces conflict with each other." error. > > After reading the XQuery update facility recomendation it wasn't clear to me > if this is supposed to happen. Do I *have* to use chained copy statements to > achieve both renaming a node an inserting an attribute? > > Thanks, Alex > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery