[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: processing different nodes

Subject: RE: processing different nodes
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 29 Mar 2001 10:11:54 +0100
msn different font style writing
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.