dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: how do I make a 'reunion' between 2 lists

  1. #1
    Join Date
    Sep 2003
    Posts
    3

    how do I make a 'reunion' between 2 lists

    If I have 2 lists with different nodes, but some of them have the same name, how do I make a third list which contains all the nodes from the first 2 lists but does not have 2 elements with the same name?

    EX:

    <SWP>
    <P0>
    ...........
    </P0>
    <P1>
    ...........
    </P1>
    </SWP>


    <APP>
    <P0>
    ...........
    </P0>
    <P1>
    ...........
    </P1>
    <P3>
    ...........
    </P3>
    </APP>

    So, in this case if I have list1 with the nodes from SWP and list2 with the nodes from APP, how do I make list 3 which contains only the nodes P0, P1 and P3?

  2. #2
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    37
    You could try using "//P0" "//P1" this should help u pick up all the P0 and P1 elements, and then for-each through all of them....forming ur third list.....

  3. #3
    Join Date
    Sep 2003
    Posts
    3

    question for paps

    Ok, but I don't know how to create a variable that contains a list of nodes (node-set) through a for-each.

    <xsl:variable name"test">
    <xsl:for-each select"initial_list">
    <xsl:value-of select="current()"/>
    </xsl:for-each>
    </xsl:variable>

    I want that variable 'test' to contain a list of nodes.

    Is it possible to do something like this? (to change the value of a variable during a for-each cycle?)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles