Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-12-06T12:20:11Z by HermannSW
Jaango
Jaango
266 Posts
ACCEPTED ANSWER

Pinned topic transformation to ebcdic

‏2012-12-06T07:40:44Z |
Hi,

I have the below xml, to be converted to ebcdic format

<Root>Tá</Root>


I use the below xslt

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
  <xsl:output omit-xml-declaration="yes" encoding="ebcdic-de"/>
 
  <xsl:template match="/">
    
    <xsl:value-of select="."/>
  </xsl:template>
 
</xsl:stylesheet>


The character 'T' is transformed fine to ebcdic. However 'á' is getting transformed to the corresponding entity character encoding, that is &#225's ebcdic; ebcdic encoded hex which is 50 7b f2 f2 f5 5e

How can i get the ebcdic encoded value of 'á' , instead of its entity encoded value's hex?
Updated on 2014-03-25T02:44:53Z at 2014-03-25T02:44:53Z by iron-man
  • Jaango
    Jaango
    266 Posts
    ACCEPTED ANSWER

    Re: transformation to ebcdic

    ‏2012-12-06T10:38:27Z  in response to Jaango
    I tries usinh dp parse, however still getting the same
    & # 2 2 5 ;

    ebcdic encoded of the entity encoded data.
    • HermannSW
      HermannSW
      4513 Posts
      ACCEPTED ANSWER

      Re: transformation to ebcdic

      ‏2012-12-06T12:20:11Z  in response to Jaango
      Hi Maneesh,

      you have to define a "Minimum Output Escaping" rule in the service's XML Manager's Compile Options policy.
      Here you can see the different outputs, without and with "Minimum Output Escaping" rule
      (its always good to have both coproc2 endpoint types available):
      $ echo "<Root>Tá</Root>" | coproc2 to-ebcdic-de.xsl - http://dp3-l3:2223 -s | od -tcx1
      0000000 343   P   { 362 362 365   ^
               e3  50  7b  f2  f2  f5  5e
      0000007
      $ echo "<Root>Tá</Root>" | coproc2 to-ebcdic-de.xsl - http://dp5-l3:2223 -s | od -tcx1
      0000000 343   E
               e3  45
      0000002
      $
      


      Find the "ebcdic-de" codepage layout here.

       
      Hermann <myXsltBlog/> <myXsltTweets/>
      Updated on 2014-03-25T02:44:57Z at 2014-03-25T02:44:57Z by iron-man