This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: RE: How to transform <BR> to </P><P>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] RE: How to transform <BR> to </P><P>
- From: "Sun, Christine (Cahners)" <csun at cahners dot com>
- Date: Thu, 18 Jan 2001 21:00:16 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
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