This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of sony
> sebastian
> Sent: 28 March 2001 22:18
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]