cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping changes Required

Former Member
0 Kudos

Hello Experts,

I got one change requirment, where the name filed in the idoc contains special character (like semi colon) in between the name, I want to put double quotation for that special character at XSLT mapping.

Eg:

Input Name: Ravi ; Kumar

Out put would be: Ravi ";" Kumar

Please help me out with the required mapping changes in XSLT.

Thanks in Advace.

Edited by: ItsUrRock on Mar 23, 2011 11:55 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Chk this:

<xsl:variable name ="Input">

<xsl:value-of select="xpath"/> (ur xpath expression)

</xsl:variable>

<xsl:if test='contains($Input,".")'>

<xsl:value-of select='translate(name, ".", ";")'/>

Thanks

Amit

udo_martens
Active Contributor
0 Kudos

Hi,

use xpath function translate() and escape the semicolon and the quotes.

<output><xsl:value-of select="translate(//Name,%3B,%25%3B%25)"/></output>

If that escapes do not work google for escape sequences.

Regards,

Udo

Former Member
0 Kudos

The string that you have to convert is in a Field of source structure? If Yes, You can do this by using an UDF in message mapping.