How to Remove namespace and prefix of an XML file using TIBCO ActiveMatrix BusinessWorks.

How to Remove namespace and prefix of an XML file using TIBCO ActiveMatrix BusinessWorks.

book

Article ID: KB0084661

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Description:
============
We have a parent schema which imports three sub schemas. We want to render this schema and remove all prefixes and namespaces from it.

Environment:
===========
BW Versions 5.x

Resolution:
==========
TIBCO ActiveMatrix BusinessWorks does not provide such a feature to modify the format of XML data directly. You can create an XSLT and use "Transform XML" An example is available at http://wiki.tei-c.org/index.php/Remove-Namespaces.xsl

--------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>

<xsl:template match="/|comment()|processing-instruction()">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
</xsl:template>

<xsl:template match="*">
    <xsl:element name="{local-name()}">
      <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
</xsl:template>

<xsl:template match="@*">
    <xsl:attribute name="{local-name()}">
      <xsl:value-of select="."/>
    </xsl:attribute>
</xsl:template>
</xsl:stylesheet>

Issue/Introduction

How to Remove namespace and prefix of an XML file using TIBCO ActiveMatrix BusinessWorks.