xslt transformation help

Discussion in 'Software' started by ivenkat, Jan 31, 2010.

  1. ivenkat

    ivenkat

    Joined:
    Jan 31, 2010
    Messages:
    2
    Dear ALL,
    I am a fresh bee in xslt. i have time constraint where i have to deliver something very urgently. Could you please help me out. Thank you in advance.

    I am pasting the xml samples below. Here is small explanation I have input.xml and output.xml. these both files need to be merged as they have different formats. both files need to be merged based on element "ID". output.xml need to merged inside input.xml. if the ID of an element in input.xml matches with element ID of output.xml then child elements of output.xml need to be merged before the end tag of the matched element in the input.xml.
    If you have any questions please fire it back.

    Input.xml

    <Result ID="A">
    <Comment> blah blah blah</Comment>
    <aaa>111</aaa>
    <a1> 000</a1>
    <a2 ID="B>
    <a2a>9iu</a2a>
    <a23> kjf</a23>
    <b ID="C">
    <b1>k</b1>
    </b>
    <c>jjj</c>
    <d ID="E">
    <d12>ppp</d12>
    <d23 ID="W"/>
    </d>
    <e ID="AA">
    <d ID="G">
    <d12>ppp</d12>
    <d23 ID="O"/>
    </d>
    </e>
    </Result>

    output.xml

    <Insert>
    <mn ID="A">
    <mn1>345</mn1>
    <mn2>123</mn2>
    </mn>
    <no ID="C">
    <op>09</op>
    <io>89</io>
    </no>
    <ab ID="B">
    <ab>jik</ab>
    <dc>hdg</dc>
    </ab>
    </Insert>

    Merged.xml (should like below)

    <Result ID="A">
    <Comment> blah blah blah</Comment>
    <aaa>111</aaa>
    <a1> 000</a1>
    <a2 ID="B">
    <a2a>9iu</a2a>
    <a23> kjf</a23>
    <b ID="C">
    <b1>k</b1>
    <op>09</op>
    <io>89</io>
    </b>
    <c>jjj</c>
    <d ID="E">
    <d12>ppp</d12>
    <d23 ID="W"/>
    </d>
    <ab>jik</ab>
    <dc>hdg</dc>
    </a2>
    <e ID="AA">
    <d ID="G">
    <d12>ppp</d12>
    <d23 ID="O"/>
    </d>
    </e>
    <mn1>345</mn1>
    <mn2>123</mn2>
    </Result>

    Please give me generic solution which is not dependent on the name of the elements inside xslt.

    waiting for your reply.
    ivenkat, Jan 31, 2010
    #1
    1. Advertising

  2. ivenkat

    ivenkat

    Joined:
    Jan 31, 2010
    Messages:
    2
    Hi All,

    Could anybody help me. As it is very urgent on my side please.

    Regards
    ivenkat, Feb 1, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grinder

    Firefox XML Transformation

    Grinder, Jul 29, 2004, in forum: Firefox
    Replies:
    0
    Views:
    529
    Grinder
    Jul 29, 2004
  2. Muhammad Qasim
    Replies:
    1
    Views:
    1,079
    Maria
    Jul 9, 2003
  3. Joe

    Vista Transformation

    Joe, Jan 25, 2006, in forum: Computer Support
    Replies:
    20
    Views:
    816
    Liza Smorgaborgsson
    Jan 30, 2006
  4. Joy
    Replies:
    4
    Views:
    817
    Sachin Garg
    May 23, 2007
  5. arumahi
    Replies:
    0
    Views:
    1,029
    arumahi
    Sep 3, 2007
Loading...

Share This Page