xsl-list
[Top] [All Lists]

Structuring linear input

2002-10-22 01:41:58
I need to change a linear input into something more structure; e.g. 
        <A/>    <B/>    <C/>    <D/>    <D/>    <C/>    <B/>    <D/>    <A/>
<B/>

The result should look like this:
        <A>
                <B>
                        <block>
                                <C/><D/>
                        </block>
                        <block>
                                <D/>
                        </block>
                        <block>
                                <C/>
                        </block>
                </B>
                <B>
                        <block>
                                <D/>
                        </block>
                </B>
        <A/>
        <A>
                <B/>
        </A>

The linear input can be described by the following regular expression:
        (A (B (C* D*)*)*)*

Does anyone has any idea how this problem can be solved?


Alain


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



<Prev in Thread] Current Thread [Next in Thread>