Advertisement

05.09.2008 at 05:17PM PDT, ID: 23391114 | Points: 500
[x]
Attachment Details

Create a tree from a list

Tags: xslt, list, tree, hierarchy, inflate
I have an XHTML document like

<h1>Title I</h1>
Some text 1
<h2>Subtitle 11</h2>
Some another text 11
<h2>Subtitle 12</h2>
Some another text 12
 .
<h1>Title II</h1>
Some text 2
<h2>Subtitle 21</h2>
Some another text 21
<h2>Subtitle 22</h2>
Some another text 22
 .
 .
 .

I need to create a tree like:

<sec>  
   <title>Title I</title>
   Some text 1
   <sec>
       <title>Subtitle 11</title>
       Some another text 11
   </sec>
   <sec>
       <title>Subtitle 12</title>
       Some another text 12
   </sec>
</sec>
<sec>  
   <title>Title II</title>
   Some text 2
   <sec>
       <title>Subtitle 21</title>
       Some another text 21
   </sec>
   <sec>
       <title>Subtitle 22</title>
       Some another text 22
   </sec>
</sec>
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: zc2
Question Asked On: 05.09.2008
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
05.09.2008 at 11:01PM PDT, ID: 21538003

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 08:11AM PDT, ID: 21547652

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 08:21AM PDT, ID: 21547743

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 08:24AM PDT, ID: 21547772

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2008 at 09:25AM PDT, ID: 21548310

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_EXPERT_20070906