I'm just getting started using XSL to transform XML to HTML and I'm hopping to get help with the following to help me dive in.
Given XML like the following (A):
<Course Title="SampleCourse">
<Lesson Title="Overview"/>
<Section Title="Section1">
<Lesson Title="S1 Lesson 1" />
<Lesson Title="S1 Lesson 2" />
</Section>
<Section Title="Sections 2">
<Lesson Title="S2 Lesson 1" />
</Section>
</Course>
Or like (B):
<Course Title="SampleCourse">
<Section Title="Section1">
<Lesson Title="S1 Lesson 1" />
<Lesson Title="S1 Lesson 2" />
</Section>
<Section Title="Sections 2">
<Lesson Title="S2 Lesson 1" />
</Section>
</Course>
How would I produce an XSL file that could transform the above examples to (A):
<h3>SampleCourse</h3>
<ul>
<li>Overview</li>
<li>Section1</li>
<ul>
<li>S1 Lesson 1</li>
<li>S1 Lesson 2</li>
</ul>
<li>Sections 2</li>
<ul>
<li>S1 Lesson 1</li>
</ul>
</ul>
or (B):
<h3>SampleCourse</h3>
<ul>
<li>Section1</li>
<ul>
<li>S1 Lesson 1</li>
<li>S1 Lesson 2</li>
</ul>
<li>Sections 2</li>
<ul>
<li>S1 Lesson 1</li>
</ul>
</ul>
Thanks!