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

making <p>s or <br> in html from a stylesheet

Subject: making <p>s or <br> in html from a stylesheet
From: Ronald Kent Gibson <Kent.Gibson@xxxxxxxxxxx>
Date: Mon, 1 Sep 2003 17:22:37 +0200
br problem in ie
Dear All,

I seem to be stuck on something really simple, and I can't find a clear
answer in all the thousands of docs related to white space so I appeal to
someone's wisdom.

I have some xml which has line feed, carriage returns, whatever, on each
line, and I want to transform this into html and I want to keep these little
buggers or make something that breaks a line in html. So what should i do ?!

I have experimented with a find an replace of all the cr's with <p> </p> but
then I have some silly problem selecting, ie I cannot select a <MACRO> with
and <p> inside them, hmm, maybe its cuz its late on this side of the world.

The line terminator can be anything ie &#xA;. or \n or \r\n  

Here is a sample xml:

<?xml version="1.0" encoding="UTF-8"?>
<MACRO_SET>
<DOCUMENT_HEADER>
.***************************************************************************
****
.************************        MACROS
******************************
.* Created on 01.09.2003 16:43:28
.***************************************************************************
****
</DOCUMENT_HEADER>
<MACRO>
<COMMENT_HEADER>.*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++
.*++++++++++++++++++++++ BEGIN BEGIN_LINE_RULE
.*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
</COMMENT_HEADER>
</MACRO>
</MACRO_SET>

Here is a sample xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:template match="/">
		<HTML>
			<xsl:for-each select="MACRO_SET">
				<xsl:value-of select="MACRO"/>
			</xsl:for-each>
		</HTML>
	</xsl:template>
</xsl:stylesheet>

any help would be grand.



 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.