This discussion is archived
8 Replies Latest reply: Mar 4, 2013 4:12 PM by user10879274 RSS

Issue copying only Non-Empty element via XSLT Transformation

Enceladus Newbie
Currently Being Moderated
Below transformation is copying even empty tag :( ...... I want only those tag with value copied.

<xsl:template match="/">
<ns56:ValidateProductForReactivationResponse>
<xsl:if test="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService">
<internetService:InternetService>
<internetService:CustomerUserName>
<xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:CustomerUserName"/>
</internetService:CustomerUserName>
<internetService:Login>
<xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:Login"/>
</internetService:Login>
</xsl:if>
</ns56:ValidateProductForReactivationResponse>
</xsl:template>

Please Help.

Regards,
En

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points