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. 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. Frank-Ralph Reiser

    Re: XSL: grouping data and group header?

    Frank-Ralph Reiser, Jul 31, 2003, in forum: XML
    Replies:
    0
    Views:
    1,429
    Frank-Ralph Reiser
    Jul 31, 2003
  2. Dimitre Novatchev

    .Re: Grouping neighboring elements with xsl

    Dimitre Novatchev, Nov 28, 2003, in forum: XML
    Replies:
    0
    Views:
    481
    Dimitre Novatchev
    Nov 28, 2003
  3. Jack Wayne
    Replies:
    0
    Views:
    465
    Jack Wayne
    Jan 24, 2005
  4. Replies:
    1
    Views:
    3,612
    A. Bolmarcich
    May 27, 2005
  5. Rob Smegma
    Replies:
    1
    Views:
    1,816
    shaun
    Sep 26, 2005
Loading...

Share This Page