IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
 View Only

Mapping items from Typetree created by DTD

  • 1.  Mapping items from Typetree created by DTD

    Posted Mon November 20, 2017 10:09 AM

    Originally posted by: PaulBrett


    Recently I was asked why an element being mapped from an input Typetree (derived from a DTD) was being output as blank.

    Review the enclosed example.  Test1 shows the issue.

    The trace shows:

    (Level 5: Offset 217, len 5, comp 2 of 4, #1, DI 000000000009:)
    Data at offset 217 ('>Paul') was found to be of TYPE
       X'0010' (ElemDecl Name Element DTD).
    

    ...so one might assume that the reference the Name field (from the first Group) you would use:

    =Value:ElemDecl Name Element:Global:In1

    However, you will note that ALL the data first goes into the root object, and therefore the rule needs to be:

    =Value:ElemDecl Name:ElemDecl Group:Seq Comp:ElemDecl Root Element:Global:In1

    ...as demonstrated in Test2.    (I've colour coded the rules above for easier reading)

    Thank you.

    Paul

    Follow me on Twitter


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