I'm newbie in xslt, and i have problem which i have no idea how to solve.
I had to remove empty tags from my xml code. I did that and it works fine.
But now i need to put ONLY into ccb:correlationId
tag current date (timestamp).
My xslt code:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="*[descendant::text() or descendant-or-self::*/@*[string()]]">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*[string()]">
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
And that's my xml example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ccbs="http://atos.net/ccbs_ba/">
<soapenv:Header/>
<soapenv:Body>
<ccbs:CCBSSaveAccountRequest>
<ccbs:metric>
<ccbs:system>
<ccbs:test3></ccbs:test3>
</ccbs:system>
<ccbs:serviceProviderId></ccbs:serviceProviderId>
<ccbs:correlationId>przyklad</ccbs:correlationId>
</ccbs:metric>
<!--Optional:-->
<ccbs:effectiveTime>null</ccbs:effectiveTime>
<!--Optional:-->
<ccbs:status>status</ccbs:status>
</ccbs:CCBSSaveAccountRequest>
</soapenv:Body>
</soapenv:Envelope>
Anyone could help me? Thanks.