0

I am new to XSLT and would like to remove the "xsi:nil="true"" from all the attributes that are created with this tag in the payload that is generated from Maximo.

<ROUTESTOPID xsi:nil="true" />
<SCHEDFINISH xsi:nil="true" />
<SCHEDSTART xsi:nil="true" />

Could someone please suggest the how to achieve this using XSLT.

Thanks in advance.

user2732988
  • 71
  • 3
  • 12

1 Answers1

0

remove the "xsi:nil="true"" from all the attributes that are created with this tag

If that's all your styleheet is supposed to do, make it:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>

<!-- identity transform -->
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
</xsl:template>

<xsl:template match="@xsi:nil[.='true']"/>

</xsl:stylesheet>
michael.hor257k
  • 113,275
  • 6
  • 33
  • 51