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.  XPATH function in 8.3 returning attribute values

    Posted 10/11/11 10:38 AM

    Originally posted by: repanzer1


    I have only used XPATH a small amount in 8.1 a few months ago, but, we deploy to MVS mainframe and the XPATH function did not work at all on that platform.

    So, we were told to upgrade to 8.3, as the problem was supposedly fixed.

    The problem now is, and this is on the PC side, the XPATH function in 8.3 is returning attribute values along with tag content.
    For example, in 8.1, the following would return "TEST";

    =xmllib->XPATH( TEXT(Input1), "/MxML/contracts/contract/contractHeader/contractCategory/typology", "/" )
    <contractHeader type="contractHeader">
    <contractCategory type="contractCategory">
    <typology type="string">TEST</typology>
    <mainTypologyPath type="string">/Typologies/IRD/FRA</mainTypologyPath>
    The same exact rule in 8.3 is returning;

    "stringTEST"

    So it's returning the value in the "type" attribute along with the actual content in the typology tag.

    Anyone else encounter this? I was thinking that maybe this was expected behavior, because maybe you would want to grab the value in the attribute, but there is nothing in the documentation to specify, and there is no delimiter between the attribute values and the value in the tag, so it may be difficult to distinguish the strings.

    If anyone has hit this and thought of a solution, please let me know.
    There are 10 types of people in this world. Those who understand binary and those who don't.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: XPATH function in 8.3 returning attribute values

    Posted 10/11/11 11:15 PM

    Originally posted by: Liv2luv


    I would try adding /text() to call the text node explicitly of the XML fragment:

    /MxML/contracts/contract/contractHeader/contractCategory/typology/text()

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


  • 3.  Re: XPATH function in 8.3 returning attribute values

    Posted 10/12/11 09:18 AM

    Originally posted by: repanzer1


    I’m not exactly sure what you mean, but I have tried every combination I could think of and I can’t get the rule to just return the content of the “typology” field (or any field).

    I can not believe that in one version, the XPATH function works perfectly and returns the value of the field you specify, then in another version, the same exact rule returns the attribute values along with the field content all strung together with no delimiters or anything. Just one big string with no way to differentiate which characters are the field content and which are from the attributes, and nothing in the documentation that anything changed.

    Thank you though!
    There are 10 types of people in this world. Those who understand binary and those who don't.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 4.  Re: XPATH function in 8.3 returning attribute values

    Posted 10/12/11 02:35 PM

    Originally posted by: repanzer1


    Like I mentioned, the entire reason we are going through this is because the XPATH function fails a map on the mainframe and gives a “heap memory error” when the rule is executed, though it works on the PC side (8.1.0.4). Now in 8.3.0.4, it works fine on the mainframe (TSO), but on the PC side, it returns all the values in any attribute for that field along with the data in the field, all strung together.

    We opened a ticket with IBM, I will post the results when we get them.
    There are 10 types of people in this world. Those who understand binary and those who don't.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender