Recently I faced a problem when using processXSLT Transform step. The transform step produced tags with xmlns="" at few places.
For eg:
<ns1:ParentTag xmlns="http://mynamespace.com/parent">
<MyCRMHeader xmlns=""> ....</MyCRMHeader>
</ns1:ParentTag>
Due to this the receiving side application was unable to process the specific tags that had this empty namespace.
xmlns="" indicates that a particular element is not included in a parent tag's namespace and without this empty xmlns="", i.a., the element would be in the same namespace as its parent.
The big question though - Why did my XSL produce tags that had these tags? Did I deliberately format tags that didn't belong to a specific namespace.
Probably yes. My XSLT had a namespace string passed as a parameter and substituted as a value dynamically. Ideally declaring this along with other namespace declarations to the xsl:stylesheet or xsl:transform element may have helped me avoid the situation, but that was not a choice.
As a fix I've explicitly output the namespace uri attribute in the XSLT on the tags, which were emitted with an empty xmlns="" attribute.
<!--My XSLT File ->
<xsl:template match="/">
...
<ns1:PatentTag>
....
<MyCRMHeader xmlns=http://www.siebel.com/module/ns/input/01>
<xsl:value-of ..../>
</MyCRMHeader>
</ns1:PatentTag>
</xsl:template>
This helped me in getting rid of the empty namespace.
<ns1:ParentTag xmlns="http://mynamespace.com/parent">
<MyCRMHeader> ....</MyCRMHeader>
</ns1:ParentTag>