webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

preserving data: most urget.

  • 1.  preserving data: most urget.

    Posted Thu January 06, 2005 10:47 AM

    I am woking on xslt. I am not using some nodes and data in my transfermation file. But now I have to get the input xml file using the output xml file(reverse of the transformation). Can anybody tell how to preserve the data in forward xml file and get the input file using the transformation.

    Here is examlple:
    input file:

    1002

    maverick
    reticent

    34000

    and output after applying transformation is


    1002
    maverick reticent
    34000


    now can I get the input file if I apply the transfermatins to the above file.

    my main objective is to preseve the data in the output file in any form so that I can use it in my reverse transformation. Can anybody hlep in this regard. it is most urgent for me.

    Thanks


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: preserving data: most urget.

    Posted Fri January 07, 2005 10:21 AM

    Hi,
    In the example you give, I don’t think anything significant is lost in the first transformation, so the transformation appears to be completely reversible. For example:

    id → number;
    number → id;
    name\firstname + name\lastname → name
    name → name\firstname + name\lastname
    [which are always separated by a single space].

    So it should always be possible to reconstruct the orginal xml from the new xml in this example case.

    If your real transformation loses information which is significant, you could preserve the original data as comments or cdata in the output xml. This has already been discussed in your other posts so I won’t cover it again here.

    Alternatively you could keep a copy of the original xml in a separate doctype or file, linked to the new doctype by some ‘primary key’ value (such as ‘id’).

    I hope this helps.

    [This message was edited by Bill Leeney on 07 January 2005 at 10:18.]


    #Tamino
    #API-Management
    #webMethods