IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Mapping Special characters

    Posted Wed April 27, 2016 01:29 PM

    Originally posted by: steverats


    Hi,

     

    my input data is : V"sample

    output data: V'sample

     

    by using text item subclass . It is populating as V&'sample.

     

    Can u help me out?

    My required output should be : V'sample

     

     

    Thanks.


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Mapping Special characters

    Posted Wed April 27, 2016 02:26 PM

    Originally posted by: DeM0n


    Use SUBSTITUTE command....It should work...


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Mapping Special characters

    Posted Thu April 28, 2016 04:34 AM
      |   view attached

    Originally posted by: paul.brett


    The issue you describe can be caused when the input file is escaped (but is doesn't look like it is when viewed in a browser) like this for example:

    <?xml version="1.0" encoding="utf-8"?>
    <Root xmlns="http://www.example.org/Test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/Test
    Input.xsd">
        <Data>Test &apos; String</Data>
    </Root>

    ....which viewed in a browser, looks like this:

    <?xml version="1.0" encoding="UTF-8"?>

    -<Root xsi:schemaLocation="http://www.example.org/Test Input.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.example.org/Test">

    <Data>Test ' String</Data>

    </Root>

    When WTX reads this data in, depending on input Typetree design, the XML escape strings may be removed.  My guess is that, in your case, they are not and the data is read in raw.

    On output, depending on output Typetree design, the XML escape sequences may be added, I think this is what is happening here, and you get:

    <?xml version="1.0" encoding="utf-8"?>
    <Root>
    <Data>Test &amp;apos; String</Data>
    </Root>

    Please see the enclosed example as a demonstration.

    To resolve the issue, please modify either you input or output Typetrees....  Either add the Character Exclusions that will allow the escape sequences to be recognised on input (and the XML strings will be contracted) .... or ....  remove the Character Exclusions that are expanding the XML characters on output (and the XML sequences will be written raw).

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange

    Attachment(s)

    zip
    DoubleAmp.zip   7 KB 1 version