XSLT, moving elements

Discussion in 'Software' started by Frank Hinrichsen, Oct 24, 2012.

  1. Frank Hinrichsen

    Frank Hinrichsen

    Joined:
    Oct 24, 2012
    Messages:
    1
    Here is my source,
    (note that E1EDL24 and E1EDL37 is at the same level in the structure )

    <E1EDL24 SEGMENT="1">
    <POSNR>000010</POSNR>
    ....
    <E1EDL24 SEGMENT="1">
    <POSNR>000020</POSNR>
    ...
    <E1EDL37 SEGMENT="1">
    <E1EDL44 SEGMENT="1">


    <POSNR>000010</POSNR>
    ...
    <E1EDL37 SEGMENT="1">
    <E1EDL44 SEGMENT="1">


    <POSNR>000010</POSNR>
    ....
    <E1EDL37 SEGMENT="1">
    <E1EDL44 SEGMENT="1">


    <POSNR>000020</POSNR>
    ...
    My issue is that E1EDL37 segments should be structured under E1EDL24

    E1EDL37/E1EDL44 contains the field “POSNR” which is the reference to the corresponding E1EDL24/”POSNR”

    Like moving E1EDL37 and all elements, field etc. to the corresponding E1EDL24 if/when “POSNR” matches.

    my target should look like this


    <E1EDL24 SEGMENT="1">
    <POSNR>000010</POSNR>
    .....
    <E1EDL37 SEGMENT="1">

    <E1EDL44 SEGMENT="1">
    <POSNR>000010</POSNR>

    .....
    <E1EDL37 SEGMENT="1">
    <E1EDL44 SEGMENT="1">
    <POSNR>000010</POSNR>

    .....

    <E1EDL24 SEGMENT="1">
    <POSNR>000020</POSNR>
    .....
    <E1EDL37 SEGMENT="1">
    <E1EDL44 SEGMENT="1">

    <POSNR>000020</POSNR>
    .....

    all segment before E1EDL24 must remain the same

    How to do this in XSLT. we are using version 1.0 :question:
    Frank Hinrichsen, Oct 24, 2012
    #1
    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. cameron

    XSLT programming

    cameron, Jan 4, 2004, in forum: Firefox
    Replies:
    0
    Views:
    503
    cameron
    Jan 4, 2004
  2. juanita_guiterrez

    xslt/xpath string manipulation

    juanita_guiterrez, Jul 29, 2006, in forum: Software
    Replies:
    0
    Views:
    1,540
    juanita_guiterrez
    Jul 29, 2006
  3. arumahi
    Replies:
    0
    Views:
    1,029
    arumahi
    Sep 3, 2007
  4. h_q
    Replies:
    0
    Views:
    1,074
  5. bhushansarwade

    Using variable in select of for-each in XSLT

    bhushansarwade, Jan 7, 2010, in forum: Software
    Replies:
    0
    Views:
    3,020
    bhushansarwade
    Jan 7, 2010
Loading...

Share This Page