We need to create an XML file without the namespace prefixes from an input XML string in which all the elements are namespace qualified. How can this be done in BW?

We need to create an XML file without the namespace prefixes from an input XML string in which all the elements are namespace qualified. How can this be done in BW?

book

Article ID: KB0086896

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
You can use transform XML activity to get rid of the namespace prefix. The following is a style sheet which you can use in the transform XML activity:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:this="http://www.asml.com/DataModel/Business"
xmlns:that="http://www.asml.com/DataModel/Technical">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

    <!--xsl:template match="node() | @*"-->        
    <xsl:template match="*[not (namespace-uri())] | *">
        <xsl:element name="{local-name(.)}">
            <xsl:apply-templates/>
        </xsl:element>
    </xsl:template>
        
</xsl:stylesheet>

Issue/Introduction

We need to create an XML file without the namespace prefixes from an input XML string in which all the elements are namespace qualified. How can this be done in BW?