This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
A variant on the flat file to structured file problem.
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] A variant on the flat file to structured file problem.
- From: "Nicholas Waltham" <info at nwaltham dot com>
- Date: Fri, 12 Oct 2001 16:01:44 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Thanks to the help of many on this list. I got my last flat to structured
problem
working fine. However I have a slight variant on this problem.
Now I am trying to convert something like this
<doc>
<p style="L1">First Level 1</p>
<p style="L1">Second Level 1</p>
<p style="L2">First <em>Level</em> 2</p>
<p style="L2">Second Level 2</p>
<p style="L3">First Level 3</p>
<p style="L1">Third<em>Level</em> 1</p>
<p style="L1">Forth Level 1</p>
<p style="normal">Normal</p>
</doc>
to something like this:
<ol>
<li>First Level 1</li>
<li>Second Level 1</li>
<ol>
<li>First Level 2</li>
<li>Second Level 2</li>
<ol>
<li>First Level 3</li>
</ol>
</ol>
<li>Third Level 1</li>
<li>Fourth level 1</li>
</ol>
<p>Normal</p>
If the <p@style> is something completely different, then
it assumed its dropped out of the list structure completely.
Lists could start with L1,L2,or L3 depending too.
I tried to get it working with something similar to the solution used for
headings, but I really couldn't get anything sensible.
I hope you can provide me with some points in the right direction.
Thanks again for your help,
Nicholas Waltham
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list