Re: [xsl] Grouping Problem in HTML Header Tag

Subject: Re: [xsl] Grouping Problem in HTML Header Tag
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 3 Jul 2006 10:02:57 +0100
> Thanks you for suggestion. But ( <!-- If i am creat another <h2> text here,
> its not converting properly. -->) 

As I said, your "new" h2 has just been added in the same div as an
existing h2 so does not match the same structure as the rest of your
input. If you have a list of h.. elements at the same level you need to
group them using for-each-group. If every section is in its own div
then you do not need to group anything. If you have a mixture of both
styles, that is also possible to fix, but you have to describe your
input format better.

Why for example are the first two sections in the same div and the thrid
one in a different div:

<div>
<h2>Introduction to Wi-Fi</h2>
<p>Welcome to the world</p>
                                                    <!-- Just concentrate
Here -->
<h2>Introduction Wi-Fi</h2>
<p>Once gone through</p>
</div>
<div>
<h2>The History and Basics of 802.11</h2>
<p>The desire of people</p>
</div>


It would be more normal to see them all at teh same level, either all in
the same div

<div>
<h2>Introduction to Wi-Fi</h2>
<p>Welcome to the world</p>
                                                    <!-- Just concentrate
Here -->
<h2>Introduction Wi-Fi</h2>
<p>Once gone through</p>

<h2>The History and Basics of 802.11</h2>
<p>The desire of people</p>
</div>



or all in threir own div


<div>
<h2>Introduction to Wi-Fi</h2>
<p>Welcome to the world</p>
</div>
<div>                                                    <!-- Just concentrate
Here -->
<h2>Introduction Wi-Fi</h2>
<p>Once gone through</p>
</div>
<div>
<h2>The History and Basics of 802.11</h2>
<p>The desire of people</p>
</div>


The last form is the easiest to convert (just change some element names,
as I showed in my previous reply) the for above that is only slightly
harder, just use for-each-group to group the h2 elements. the format you
have could also be hanedled either by giving a specification of where
the divs appear, or if it is just random, first make a transform that
removes the divs, so giving teh middle format aboave, and then use
for-each-group.

David

Current Thread