IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  Xerces imported XML type tree issues

    Posted 10/08/14 11:25 AM

    Originally posted by: Semoul


    1) How do you deactivate the character restrictions like: "&" -> "&"
    I found that somehow the file xmlsimp.xml is used when importing a schema.

    But even if you remove all the entries in that file, the restrictions still apply.

    Leaving the "character_restrictions name" tag empty or removing the elements of node "character_restrictions" will not work.
    Are restrictions also defined by default somewhere else?
    Do you have to explicitly override them?

    Also, there are no restrictions defined in the type tree properties.

    2) Is it possible to remove the restrictions from an existing type tree without having to regenerate it?

    2) What encoding is allowed in the schema for the Xerces importer? F.ex. ISO-8859-1, ISO-8859-1, Windows-1252, cp1252, ibm-1252 all produce errors during the import. UTF-8 and Latin1 are OK.

    WTX 8.3.0.2 on Windows.

    Thank you.


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


  • 2.  Re: Xerces imported XML type tree issues

    Posted 10/09/14 06:30 AM

    Originally posted by: paul.brett


    I'll try to answer these questions:

    1)  How do you deactivate the character restrictions like: "&" -> "&"

    A)  Using a Typetree imported using the Xerces option of the XML Schema importer, it is not possible to deactivate this functionality.

     

    2)  Is it possible to remove the restrictions from an existing Typetree without having to regenerate it?

    A)  Assuming you have restrictions in the Typetree, you can export this using the GUI or command line tools (texport.exe), and then directly edit the .MTS file either manually or with a script (or WTX map) to remove the restrictions.  You then re-import the .MTS file, again using the GUI or command line tools (timport.exe) and that's job done.

     

    3)  What encoding is allowed in the schema for the Xerces importer? F.ex. ISO-8859-1, ISO-8859-1, Windows-1252, cp1252, ibm-1252 all produce errors during the import. UTF-8 and Latin1 are OK.

    A)  As well as the two you mention, I believe UTF-16 is also supported.  Please review the Technote here:

    http://www-01.ibm.com/support/docview.wss?uid=swg21389780

     

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 3.  Re: Xerces imported XML type tree issues

    Posted 10/09/14 06:40 AM
      |   view attached

    Originally posted by: paul.brett


    You may also like this workaround:

    This is a *rough* example script, that I used to import an XML Schema with iso-8859-1 encoding, and the resulting typetree has all elements set to Latin1, as an example.  Please modify the environment variables at the start of the script to suit your purposes.
     
    Syntax is:
     
    timportx.cmd Test
     
    (where Test is the name of the Schema - note that the .xsd extension is not included)
     
    The Schema must be in the same directory as the script, and the Replace.mmc map source file (source included) must also exist in the same directory.
     
    In summary, the script does this:
     
        %wtx%\dtxcmdsv.exe Replace.mmc -IF1 %1.xsd -IE2 iso-8859-1 -IE3 UTF-8 -OF1 %1_temp.xsd -BI
        replace iso-88591-1 in the original schema and save it with a new temporary name.
     
        %wtx%\timport.exe -IMP XMLSCHEMA [%pwd%\%1_temp.xsd -LANG Western -VALIDATION Xerces] -O Test_temp.mtt -NOLOG
        Import the new temporary Schema as a Typetree.
     
        %wtx%\texport Test_temp.mtt
        Export the typetree to a .MTS file typetree script file.
     
        %wtx%\dtxcmdsv.exe Replace.mmc -IF1 Test_temp.mts -IE2 Test_temp.mtt -IE3 Test.mtt -OF1 Test_temp.mts -BI
        Replace the name of the Typetree to create inside the Typetree script file.
     
        %wtx%\dtxcmdsv.exe Replace.mmc -IF1 Test_temp.mts -IE2 UTF-8 -IE3 Latin1 -OF1 Test_temp.mts -BI
        Replace all instances of the UTF-8 string inside the Typetree script file with the string Latin1.
     
        %wtx%\timport Test_temp.mts
        Import the Typetree script file, to the final Typetree file.
     
    I recommend you use this script with caution, and in an empty sub-directory, containing only those files needed.

    Thank-you.

    Paul.

    Follow me on Twitter


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

    Attachment(s)

    zip
    Example.zip   7 KB 1 version


  • 4.  Re: Xerces imported XML type tree issues

    Posted 10/09/14 06:42 AM