Topic
8 replies Latest Post - ‏2013-01-09T18:14:59Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Not able to make xsl:analyze-string work on incoming SOAP XML

‏2013-01-07T18:10:27Z |
Hi,
I am trying to log the incoming SOAP XML to my WSP via SYSLOG and since the logtarget truncates messages after size 2K ,I am trying to split the xml based on size and then log the message.Before splitting the xml ,I am first removing the security header and then performing the split .
Below is the xsl I am using,
<xsl:output method="xml"/>
<xsl:template name="secheader" match="wsse10:Security | wsse-d12:Security | wsse-d13:Security">
<!-- strip Security -->
</xsl:template>
<xsl:template name="matchall" match="@*">
<xsl:copy/>
</xsl:template>
<xsl:template name="matchelse" match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="/">
<xsl:call-template name="secheader"/>
<xsl:call-template name="matchall"/>
<xsl:variable name="incomingRequest">
<xsl:call-template name="matchelse"/>
</xsl:variable>

<xsl:analyze-string regex=".{{7}}" select="$incomingRequest">
<xsl:matching-substring>
<xsl:message dp:type="txnLog" dp:priority="notice">
<xsl:value-of select="."/>
</xsl:message>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:message dp:type="txnLog" dp:priority="notice">
<xsl:value-of select="."/>
</xsl:message>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:template>

The xsl is not producing any results.Please help
Updated on 2013-01-09T18:14:59Z at 2013-01-09T18:14:59Z by SystemAdmin