Unwanted namespace decalarations after tamino update

I am trying to update an XML document in Tamino using a Mediator sequence as follows:

  • Get the original document from Tamino using the SagTaminoQuery. I use an xql query and an accessor of ‘stream’. This puts the ino:response document into my Mediator message.
  • Apply an xslt stylesheet using the SagTransformer. This extracts the payload document and applies my updates. My mediator message now consists of the updated payload document.
  • Update the document in Tamino using the SagTaminoSingleAccessor component with an accessor of ‘XML’ and an action of 'update’

All works fine except that my updated document contains unwanted namespace declarations on the root node that creates problems in downstream processing. These declarations are for the xmlns:ino and xmlns:xql namespaces and they appear to be inherited from the ino:response when applying the xslt.

Does anybody have any ideas on how to avoid/remove these unwanted namespace declarations?

Hi David,

Take a look at the “exclude-result-prefixes” attribute of the “stylesheet” element in XSLT. Adding
exclude-result-prefixes="ino xql"
might do what you want.

I would add a brief comment from Michael Kay’s XSLT book -
"The simplest way to decide which namespace prefixes to list here is by trial and error; run the stylesheet, and if the output document contains namespace declarations that clearly serve no purpose, add them to the exclude-result-prefixes attribute and run the stylesheet again."

Hope this helps.

Best regards,