Topic
  • 1 reply
  • Latest Post - ‏2013-04-05T14:16:34Z by swlinn
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic Space query in xslt

‏2013-04-05T06:41:54Z |
Hi,

I have to transform a field in xml with the help of xslt. the condition is like if a is coming in xml xslt transform it to A, if b is coming xslt transform it to B and if space is coming it has to transform to S. user can give any number of spaces. Any idea how to do the transformation for spaces.

Thanks...
Updated on 2013-04-05T14:16:34Z at 2013-04-05T14:16:34Z by swlinn
  • swlinn
    swlinn
    1348 Posts

    Re: Space query in xslt

    ‏2013-04-05T14:16:34Z  
    <xsl:variable name="newfield" select="translate($oldfield, 'ab ', 'ABS') />

    Regards,
    Steve