[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Flat XML structure 2 Hierachial XML structure ....
Try a google for "XSLT positional grouping". Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mark Brand > Sent: 04 August 2003 16:56 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Flat XML structure 2 Hierachial XML structure > .... help needed > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|