Nested element constructors cause loss of namespace bindings

Bug #867221 reported by Federico Cavalieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Federico Cavalieri

Bug Description

Consider this query:
element {QName("http://outer","bind")}
{
    element {QName("","b")}
    {
        "inner"
    }
}
In zorba and all other libraries it creates as expected:
<?xml version="1.0" encoding="UTF-8"?>
<bind xmlns="http://outer"><b xmlns="">inner</b></bind>
Notice that b contains xmlns=""

Consider this query now:
element {QName("http://outer","bind")}
{
  element {QName("http://named","named:middle")}
  {
    element {QName("","b")}
    {
      "inner"
    }
  }
}

This one in zorba creates:
<?xml version="1.0" encoding="UTF-8"?>
<bind xmlns="http://outer"><named:middle xmlns:named="http://named"><b>inner</b></named:middle></bind>
Notice that b inherits xmlns="http://outer"

I would expect the result that is given by Saxon and BaseX:
<?xml version="1.0" encoding="UTF-8"?>
<bind xmlns="http://outer">
   <named:middle xmlns:named="http://named">
      <b xmlns="">inner</b>
   </named:middle>
</bind>
Notice that b contains xmlns=""

Tags: core-runtime
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

fixed in rev. 11986

Changed in zorba:
status: Fix Released → Fix Committed
milestone: none → 2.1
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.