|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: How to transform <BR> to </P><P>
Adam wrote:
><TEXT>This is first paragraph.<BR />Second paragraph.</TEXT>
>Then <TEXT> has 3 children, there is:
> TEXT/text() -- This is the first paragraph
> TEXT/BR
> TEXT/text() -- This is the second paragraph
>Each block of text that is a child of >text is its own text node.
Dimitre and Adam,
Thanks a lot for your explanations. You two are abosolutely correct.
However, I should have given all the details at the beginning:
There are more than <BR> and text() as children of <TEXT>. And I wish to
break the text into paragraphs only when it reaches a <BR TYPE="END">.
Input xml:
<TEXT>
text1
<BR TYPE="SOFT">
text2
<BR TYPE="END">
text3<NODE TYPE="SPECIAL" VALUE="HEX 27"
/>text4<AUTOITALIC>text5</AUTOITALIC>text6
<!-- there are other similar elements like NODE or AUTOITALIC among
text nodes-->
<BR TYPE="END">
<BR TYPE="END">
<BR TYPE="END">
</TEXT>
Output xml:
<TEXT>
<P>
text1 text2
</P>
<P>
text3'text4<ITALIC>text5</ITALIC>text6
</P> <!-- The last three BRs will be treated as one. -->
</TEXT>
Any thoughts? Again, thank you for your help.
Cheers,
Chris
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
|

Cart








