Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

How can I remove both empty nodes and all empty attributes from my input message.

$
0
0

Hello

 

I have input file format like below :

 

Inputfile.jpg

I am using below XSLT in my mapping:

 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:strip-space elements="*"/>

    <xsl:template match="node()|@*">

        <xsl:copy>

            <xsl:apply-templates select="node()|@*"/>

        </xsl:copy>

    </xsl:template>

    <xsl:template match="*[not(@*) and not(*) and (not(text()) or .=-1)]"/>

</xsl:stylesheet>

 

I am receiving output file as:

 

outputfile.jpg

 

current XSLT logic is only eliminating attributes of the empty node.

 

How can I remove both empty nodes and all empty attributes from my input message.

 

Thank you

John


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>