Hi List
I have a XML document (FIGURE 1) which has been created from a MSWord
document.
I need to transform it into the XML document described in FIGURE 2.
This is my first XSLT sheet, and i tried a recursive solution,
which did not seem successful. i am guessing because the source xml has
such a flat structure.
I am looking for some help from the list members - to find out what the
general solution to
this kind of problem is, and some pointers to some examples if such
things exist.
Many thanks for your help.
Best Regards
Mark Brand
Figure 1===============================================================
<DOCUMENT>
<PARAGRAPH StyleName=SECTION-01> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-02> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-03> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-03> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-01> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-02> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-02> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-02> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-03> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-01> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-02> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-03> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-04> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-05> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-05> some text </PARAGRAPH>
<PARAGRAPH StyleName=SECTION-05> some text </PARAGRAPH>
</DOCUMENT>
========================================================================
FIGURE 2================================================================
<DOCUMENT>
<SECTION-01> Content
<SECTION-02> Content
<SECTION-03> Content </SECTION-03>
<SECTION-03> Content </SECTION-03>
</SECTION-02>
</SECTION-01>
<SECTION-01> Content
<SECTION-02> Content </SECTION-02>
<SECTION-02> Content </SECTION-02>
<SECTION-02> Content
<SECTION-03> Content </SECTION-03>
</SECTION-02>
</SECTION-01>
<SECTION-01> Content
<SECTION-02> Content
<SECTION-03> Content
<SECTION-04> Content
<SECTION-05> Content </SECTION-05>
<SECTION-05> Content </SECTION-05>
<SECTION-05> Content </SECTION-05>
</SECTION-04>
</SECTION-03>
</SECTION-02>
</SECTION-01>
</DOCUMENT>
========================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list