XSL: Unique elements

Discussion in 'XML' started by =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jun 22, 2004.

  1. I have a xml file with a lot of repeting <title> tags, and I want to
    show the content of <title> tags on a site. However I don't want to show
    <title>C.S.I</title> many times.

    E:G:
    ----xml-----
    ....
    <program>
    <time>23:15</time>
    <title>C.S.I</title>
    </program>
    ...other programs..
    <program>
    <time>21:10</time>
    <title>C.S.I</title>
    </program>
    --------------------

    ---Output----
    -Angel
    -C.S.I
    -Band of brothers
    .....

    You see I don't want C.S.I to appear twice just because it exists in two
    different times in the xml file. How do I solve this?

    Jørn T
     
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jun 22, 2004
    #1
    1. Advertising

  2. Jørn Tommy Kinderås wrote:
    > I have a xml file with a lot of repeting <title> tags, and I want to
    > show the content of <title> tags on a site. However I don't want to show
    > <title>C.S.I</title> many times.
    >
    > E:G:
    > ----xml-----
    > ...
    > <program>
    > <time>23:15</time>
    > <title>C.S.I</title>
    > </program>
    > ..other programs..
    > <program>
    > <time>21:10</time>
    > <title>C.S.I</title>
    > </program>
    > --------------------
    >
    > ---Output----
    > -Angel
    > -C.S.I
    > -Band of brothers
    > ....
    >
    > You see I don't want C.S.I to appear twice just because it exists in two
    > different times in the xml file. How do I solve this?
    >
    > Jørn T


    hi,

    have a look at the muenchian method

    for example :
    http://www.jenitennison.com/xslt/grouping/muenchian.html

    --
    Cordialement,

    ///
    (. .)
    -----ooO--(_)--Ooo-----
    | Philippe Poulard |
    -----------------------
     
    Philippe Poulard, Jun 23, 2004
    #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. Victor Engmark
    Replies:
    4
    Views:
    738
    Piet Blok
    Jun 1, 2004
  2. Replies:
    1
    Views:
    3,613
    A. Bolmarcich
    May 27, 2005
  3. Rob Smegma
    Replies:
    1
    Views:
    1,818
    shaun
    Sep 26, 2005
  4. ToshiBoy
    Replies:
    6
    Views:
    852
    ToshiBoy
    Aug 12, 2008
  5. Token Type
    Replies:
    9
    Views:
    360
    Chris Angelico
    Sep 9, 2012
Loading...

Share This Page