[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: processing different nodes
I'm sure someone, probably Jeni, will come up with a splendid XSLT solution to this, but frankly, the XML is so badly structured that I would start by writing a SAX2 filter to turn it into something more sanitary. All that this filter has to do is to generate a <bulletlist> start tag when it encounters a <par def="1">, and to generate a </bulletlist> end tag when it encounteres a <par def="2/>. You then have a structure that uses XML the way it was intended to be used, and the XSLT transformation becomes trivial. Mike Kay Software AG > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of sony > sebastian > Sent: 28 March 2001 22:18 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: processing different nodes > > > Hi, > > I had posted a similar question before. I am afraid the XML > I had did not > reflect the complexity and was wrong. > > Please take a look at the new XML code. > > <document> > <item name="Body"> > <richtext> > <pardef id="1" leftmargin="1in" rightmargin="7.5000in" /> > <par def="1"> > <run> > <font style="bold" /> > aaaa > </run> > </par> > <pardef id="2" leftmargin="1.2500in" rightmargin="7.5000in" > list="bullet" > /> > <par def="2">bbb<par><!--bullet list starts here--> > <par>ccc</par> > <par>ddd</par> > <par>eee</par> > <par def="1" /> <!--ends here--> > <par> > <run> > <font style="bold" /> > fff > </run> > </par> > <par>ggg</par> > <par def="2">hhh</par> <!--bullets start here--> > <par>iii</par> > <par def="1" /> <!--bullets end here--> > <par> > <run> > <font style="bold" /> > jjjj > </run> > </par> > <par>kkk</par> > </richtext> > </item> > </document> > Output I am looking for is: > > aaaa > *bbb > *ccc > ... > *eee > fff > ggg > *hhh > *iii > > Can somebody please help me on this? Jeni, last time I had > you confused. > Sorry about that. I got the XML wrong. > > > Thank you very much in advance. > > -Sony. > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > > 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
|