Grouping neighboring elements with xsl

Discussion in 'XML' started by kcwolle, Nov 27, 2003.

  1. kcwolle

    kcwolle Guest

    Hello,
    I have an XSL stylesheet problem.
    I want to group neighboring elements by a surrounding hierarchical
    element, for example all neighboring div Elements with attribute class
    equals 1
    Source:
    <p>text</p>
    <p>text</p>
    <div class="1">text1</div>
    <div class="1">text2</div>
    <p>text</p>
    <p>text</p>
    <div class="1">text1</div>
    <div class="1">text2</div>
    <div class="1">text3</div>
    <p>text</p>

    Desired Output:
    <p>text</p>
    <p>text</p>
    <div class="1">
    <p>text1</p>
    <p>text2</p>
    </div>
    <p>text</p>
    <p>text</p>
    <div class="1">
    <p>text1</p>
    <p>text2</p>
    <p>text3</p>
    </div>
    <p>text</p>

    Can anybody help me to solve this problem?

    Yours

    Wolfgang
     
    kcwolle, Nov 27, 2003
    #1
    1. Advertisements

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. Jack Wayne
    Replies:
    0
    Views:
    555
    Jack Wayne
    Jan 24, 2005
  2. Tristan Miller

    XSL grouping (Muenchian)

    Tristan Miller, Jan 31, 2005, in forum: XML
    Replies:
    2
    Views:
    709
    Philippe Poulard
    Jan 31, 2005
  3. discomiller
    Replies:
    1
    Views:
    604
    Paul R
    Feb 1, 2005
  4. Replies:
    1
    Views:
    3,919
    A. Bolmarcich
    May 27, 2005
  5. Rob Smegma
    Replies:
    1
    Views:
    1,988
    shaun
    Sep 26, 2005
  6. Jeffrey
    Replies:
    0
    Views:
    451
    Jeffrey
    Feb 28, 2009
  7. Jeffrey
    Replies:
    0
    Views:
    795
    Jeffrey
    Feb 28, 2009
  8. boogz

    XSL Grouping

    boogz, Apr 28, 2010, in forum: XML
    Replies:
    0
    Views:
    1,385
    boogz
    Apr 28, 2010
Loading...