Hi,
I am using an XSL in which I tried to rename the root node. It worked fine when I tested in JDeveloper but it is not working when I placed the xsl in maximo.Here are the input xml and xsl .
<?xml version="1.0" encoding="UTF-8"?>
<MESSAGE>
<ER>...</ER>
<IR>
<MXABCIface xmlns="
http://www.mro.com/mx/integration" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" language="EN">
<Header operation="Notify" event="1">....
</Header>
<Content>
... </Content>
</MXABCIface>
</IR>
</MESSAGE>
And xsl is
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:mro="
http://www.mro.com/mx/integration"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
version="1.0" exclude-result-prefixes="mro">
<xsl:template match="/MESSAGE">
<xsl:apply-templates select="IR"/>
</xsl:template>
<xsl:template match="IR">
<xsl:apply-templates select="@*|*|text()"/>
</xsl:template>
<xsl:template match="@*|*|text()">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()"/>
</xsl:copy>
</xsl:template>
<!-- Change the name of the root node from MXABCInterface to MXXYZInterface.
The following code is not working
-->
<xsl:template match="mro:MXABCInterface">
<xsl:element name="MXXYZInterface" namespace="
http://www.mro.com/mx/integration">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- Rename the Sub to SubRename
This code is working
-->
<xsl:template match="mro:Sub">
<xsl:element name="SubRename" namespace="
http://www.mro.com/mx/integration">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
In the output, 'Sub' is renamed to 'SubRename'. But 'MXABCIface' is not getting renamed to 'MXXYZIface'.
My expected output is
<MXXYZIface...>
<Header operation="Notify" event="1">....
</Header>
<Content>
<SubRename>...</SubRename>
</Content>
</MXXYZIface>.
Can anyone help me out in resolving this isuue..
Thanks and Regards
Rama