Bug in computed attribute constructor

Sunday, 7 December 2014 · 3 messages · last reply 8 Dec 2014
HR
Hans-Juergen Rennau7 Dec 2014 20:36 #
Dear BaseX team, I think there is a bug in the computed attribute constructor. If the name expression evaluates to a value of type xs:string or xs:untypedAtomic and the value contains no prefix, the attribute name should be in no namespace. However, the following code: <node xmlns="http://www.infospace.org/pcollection">{ attribute a1 {'foo1'}, attribute {'a2'} {'foo2'} }</node>
yields this result:<node xmlns:ns0="http://www.infospace.org/pcollection"
   xmlns="http://www.infospace.org/pcollection"
   a1="foo1"
   ns0:a2="foo2"/>
While @a1 has the expected name, @a2 hasn't. I used the latest snapshot: BaseX 8.0 beta 95b7e5f [Standalone] Kind regards,Hans-Juergen http://www.w3.org/TR/xquery-30/#id-computedAttributes
CG
Christian Grün8 Dec 2014 14:54 #
Hi Hans-Juergen, I can confirm the bug, and I have opened a new GitHub issue for that [1]. Thanks, Christian [1] https://github.com/BaseXdb/basex/issues/1042
Quoted text · Hans-Juergen Rennau · 11 lines
On Sun, Dec 7, 2014 at 8:36 PM, Hans-Juergen Rennau <hrennau at yahoo.de> wrote: > <node xmlns="http://www.infospace.org/pcollection">{ > attribute a1 {'foo1'}, > attribute {'a2'} {'foo2'} > }</node> > > yields this result: > <node xmlns:ns0="http://www.infospace.org/pcollection" > xmlns="http://www.infospace.org/pcollection" > a1="foo1" > ns0:a2="foo2"/>
CG
Christian Grün8 Dec 2014 16:51 #
Quoted text · Christian Grün · 22 lines
On Mon, Dec 8, 2014 at 2:54 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Hans-Juergen, > > I can confirm the bug, and I have opened a new GitHub issue for that [1]. > > Thanks, > Christian > > [1] https://github.com/BaseXdb/basex/issues/1042 > > On Sun, Dec 7, 2014 at 8:36 PM, Hans-Juergen Rennau <hrennau at yahoo.de> wrote: >> <node xmlns="http://www.infospace.org/pcollection">{ >> attribute a1 {'foo1'}, >> attribute {'a2'} {'foo2'} >> }</node> >> >> yields this result: >> <node xmlns:ns0="http://www.infospace.org/pcollection" >> xmlns="http://www.infospace.org/pcollection" >> a1="foo1" >> ns0:a2="foo2"/>

⚡Generated with XQuery