BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
661 stars 268 forks source link

Updates: Preserve namespace declarations #2206

Closed ChristianGruen closed 1 year ago

ChristianGruen commented 1 year ago

If an element without an explicit namespace declaration is wrapped and copied, the namespace declaration gets lost:

element x {
  web:response-header(headers := map { 'a':'b' })//*:header
} update { }

Result:

<x>
  <http:header name="a" value="b"/>
</x>

Expected:

<x>
  <http:header xmlns:http="http://expath.org/ns/http-client" name="a" value="b"/>
</x>

Along with the fix, various explicit namespace declarations can be omitted in the code.