[xsl] Flattening parts of a document heirarchy

Subject: [xsl] Flattening parts of a document heirarchy
From: David Holden <dh@xxxxxxxx>
Date: Fri, 17 Oct 2003 14:10:39 +0100
I know there are faq's on flattening but as  newbie i'm  a little unclear on 

My problem:

incoming document is something like this:

    text text text
    <sec id="sec1">
        <sec id="sec1.1">
           <p>text2 text2 text2</p>
       <p>text3 text3 text3</p>

i.e <sec> tags are nested to arbitary level.

I need

   text text text
   <section id="s1" level="1">
       <p>text1 text1 text1</p>
   <section id="s2" level="2">
        <p>text text text</p>
   <section id="s3" level="1">
       <p>text3 text3 text3</p>

 thanks in advance,


Dr. David Holden. (Systems Developer)
Crystallography Journals Online: <http://journals.iucr.org>

Thanks in advance:-
Please avoid sending me Word or PowerPoint attachments.
See: <http://www.fsf.org/philosophy/no-word-attachments.html>

UK Privacy (R.I.P)  : http://www.stand.org.uk/commentary.php3
Public GPG key available on request.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread