[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>

Subject: RE: RE: How to transform <BR> to </P><P>
From: "Sun, Christine (Cahners)" <csun@xxxxxxxxxxx>
Date: Thu, 18 Jan 2001 21:00:16 -0500
br in text
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&#039;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


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.