Skip to Content
0
Former Member
Aug 02, 2010 at 10:24 PM

XSLT code - If Condition

349 Views

Hello,

Can someone help me to give an XSLT code for the following condition?

Source Message:

/Order/Ident/ReceiverID = 203

Condition:

If the value of Source ReceiverID is 203, then, make it to the value to 456.

I've tried this code, but seems to be many error validations.

<xsl:template match="/Order/Ident/ReceiverID">

<xsl:choose>

<xsl:when test="203">

<xsl:attribute name="203">

<xsl:value-of select="456"/>

</xsl:attribute>

</xsl:when>

<xsl:otherwise>

<xsl:attribute name="203">unknown</xsl:attribute>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

Should you have helpful links, please let me know. I will greatly appreciate it.

Thanks in advance!

Gerberto