[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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.
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.
<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
[xsl] Flat XML structure 2 Hierachial XML structure .... help needed
Subject: [xsl] Flat XML structure 2 Hierachial XML structure .... help needed From: Mark Brand <mark.brand@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 05 Aug 2003 01:55:47 +1000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] For-each error, AROSO Jose Antonio | Thread | RE: [xsl] Flat XML structure 2 Hier, Michael Kay |
RE: [xsl] Need to wrap XML in <![CD, Matt Trimmer | Date | Re: [xsl] for-each error, David Carlisle |
Month |