You will improve the chances that you will receive prompt and helpful responses
by:
- asking specific enough questions that answers are possible. Describe
what you are trying to do, how you approached it, what happened, and
why you don't like the result you got
- supplying small samples of files that illustrate your question or
problem. For example, an XML file, an XSLT stylesheet, the result
you got, and the result you want - all in miniature (and remembering
that everything posted to XSL-List is archived in public)
- describing the topic of your question concisely in the subject line
Good subject lines - those that describe the subject matter of your
message - not only increase the chances that you will receive answers
to questions or responses to comments, they also make your message
and any replies to it accessible in the list archives.
-- Tommie Usdin
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
======================================================================
B. Tommie Usdin
mailto:btusdin(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Phone: 301/315-9631
Suite 207 Direct Line: 301/315-9634
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--