How to aggregate data with XSL ?

Discussion in 'XML' started by Guiding5, Feb 28, 2006.

  1. Guiding5

    Guiding5 Guest

    Hi group!

    How do I aggregate elements based on one of it node's values ?

    For example:

    Input XML:
    <dataset>
    <value>
    <name>Bob</name>
    <desc>Silent</desc>
    </value>
    <value>
    <name>Bob</name>
    <desc>Fat</desc>
    </value>
    <value>
    <name>Jay</name>
    <desc>Stupid</desc>
    </value>
    </dataset>

    Needed result:
    <dataset>
    <value>
    <name>Bob</name>
    <desc>Silent</desc>
    <desc>Fat</desc>
    </value>
    <value>
    <name>Jay</name>
    <desc>Stupid</desc>
    </value>
    </dataset>
     
    Guiding5, Feb 28, 2006
    #1
    1. Advertising

  2. http://jenitennison.com/xslt/grouping/index.xml


    Cheers,
    Dimitre Novatchev

    "Guiding5" <> wrote in message
    news:...
    > Hi group!
    >
    > How do I aggregate elements based on one of it node's values ?
    >
    > For example:
    >
    > Input XML:
    > <dataset>
    > <value>
    > <name>Bob</name>
    > <desc>Silent</desc>
    > </value>
    > <value>
    > <name>Bob</name>
    > <desc>Fat</desc>
    > </value>
    > <value>
    > <name>Jay</name>
    > <desc>Stupid</desc>
    > </value>
    > </dataset>
    >
    > Needed result:
    > <dataset>
    > <value>
    > <name>Bob</name>
    > <desc>Silent</desc>
    > <desc>Fat</desc>
    > </value>
    > <value>
    > <name>Jay</name>
    > <desc>Stupid</desc>
    > </value>
    > </dataset>
    >
     
    Dimitre Novatchev, Feb 28, 2006
    #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. rickman
    Replies:
    3
    Views:
    5,025
    rickman
    Jul 15, 2003
  2. aggregate operator

    , Jul 11, 2005, in forum: VHDL
    Replies:
    3
    Views:
    1,414
  3. Replies:
    1
    Views:
    3,694
    A. Bolmarcich
    May 27, 2005
  4. Nate Eldredge

    Re: Copying Aggregate Data Types in C

    Nate Eldredge, Dec 17, 2008, in forum: C Programming
    Replies:
    12
    Views:
    681
    Barry Schwarz
    Dec 19, 2008
  5. CBFalconer

    Re: Copying Aggregate Data Types in C

    CBFalconer, Dec 17, 2008, in forum: C Programming
    Replies:
    46
    Views:
    1,087
    CBFalconer
    Dec 25, 2008
Loading...

Share This Page