on 08-02-2010 11:24 PM
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
Thanks very much!
The code is ok now!
Many thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gerberto,
Try this -
<xsl:choose>
<xsl:when test="*[local-name()='ReceiverID']='203' ">
<ns:YourField>
<xsl:value-of select="456"/>
</ns:YourField>
</xsl:when>
<xsl:otherwise>
<ns:YourField>
<xsl:value-of select="203"/>
</ns:YourField>
</xsl:otherwise>
</xsl:choose>
Let me know if this works for you.
Regards,
Neetesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.