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

Need XSL coding

Subject: Need XSL coding
From: Selva Ganesh <selvaganesh1985@xxxxxxxxx>
Date: Wed, 20 May 2009 21:04:48 +0530
 Need XSL coding
Dear All,

I hope your help for the below given the xhtm to xml convertion, I
need the xsl coding.

Anyone help me

I have give more details with in the input lines

Input file
=======
<root>
<h2 class="LegP1GroupTitle">TITLE TEXT</h2>
<p class="LegP1ParaText">
<span class="LegP1No">1.</span>(1) s1-level pt text </p>
<p class="LegP2ParaText">(2) s1-level pt text </p>
<p class="LegP3Container"><span class="LegP3No">(a)</span><span
class="LegP3Text">2 </span></p>
<p class="LegP2ParaText">(3) s1-level pt text </p>
<h2 class="LegP1GroupTitle">TITLE TEXT </h2>
<p class="LegP1ParaText"><span class="LegP1No">2.</span> This is
reg-level pt text (Here not came "(number)", This kind of text not
available in beginning line)</p>
<h2 class="LegP1GroupTitle">TITLE TEXT </h2>
<p class="LegP1ParaText"><span class="LegP1No">3.</span> This is
reg-level pt text (Here not came "(number)", This kind of text not
available in beginning line)</p>
<p class="LegP3Container"><span class="LegP3No">(a)</span><span
class="LegP3Text">s2-level pt text </span></p>
<p class="LegP3Container"><span class="LegP3No">(b)</span><span
class="LegP3Text">s2-level pt text </span></p>
<p class="LegP4Container"><span class="LegP4No">(i)</span><span
class="LegP4Text">s3-level pt text </span></p>
<p class="LegP4Container"><span class="LegP4No">(ii)</span><span
class="LegP4Text">s3-level pt text </span></p>
<p class="LegP5Container"><span class="LegP5No">(aa)</span><span
class="LegP5Text">s4-level pt text </span></p>
<p class="LegP5Container"><span class="LegP5No">(ab)</span><span
class="LegP5Text">s4-level pt text </span></p>
</root>

What I need:
=========
<body>
<reg><no>1.</no><ti>TITLE TEXT</ti>
<s1><no>(1)</no><pt>s1-level pt text </pt></s1>
<s1><no>(2)</no><pt>s1-level pt text </pt>
<s2><no>(a)</no><pt>s2-level pt text </pt></s2></s1>
<s1><no>(3)</no><pt>s1-level pt text </pt></s1></reg>
<reg><no>2.</no><ti>TITLE TEXT</ti>
<!--here not avilable ([0-9]), so here start only <pt>, not <s1>-->
<pt>This is reg-level pt text (Here not came "(number)", This kind of
text not available in beginning line) </pt></reg>
<reg><no>3.</no><ti>TITLE TEXT</ti>
<!--here not avilable ([0-9]), so here start only <pt>, not <s1>-->
<pt>This is reg-level pt text (Here not came "(number)", This kind of
text not available in beginning line) </pt></reg>
<!-- here not came s1 (0-9), so directly start s2-->
<s2><no>(a)</no><pt>s2-level pt text </pt></s2>
<s2><no>(b)</no><pt>s2-level pt text </pt>
<s3><no>(i)</no><pt>s3-level pt text </pt></s3>
<s3><no>(ii)</no><pt>s3-level pt text </pt>
<s4><no>(aa)</no><pt>s4-level pt text </pt></s4>
<s4><no>(ab)</no><pt>s4-level pt text </pt></s4></s3></s2>

<!--
Note: if <p> will be start at
(1) that's (0-9) is the para return as <s1> part
(a) that's (a-z) is the para return as <s2> part
(i) that's (roman letters) is the para return as <s3> part
(aa) is the para return as <s4> part, totaly s4 levels only -->

</body>

Thanks in advance
Selva

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.