Re: Whitespace again

Subject: Re: Whitespace again
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jun 1999 09:00:32 -0700
At 99/06/18 14:44 +0200, Joerg Bauer wrote:
>I have a xml documnet:
>...
>and a xsl document:
>...
>My problem is that in the html output there is no linebreak. 

Actually, in the HTML *display* there is not a line break, but in the HTML
output there is, indeed, a line break using the stylesheet fragment you used.

>Could anybody give me an example / solution..... ? 

The browser is joining the lines for you ... your output is what you asked
for from your XML and XSL.

I hope this helps.

........ Ken

T:\joerg>type test.xml
<?xml version="1.0"?>
<text>line 1
line 2
</text>
T:\joerg>type test.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
                xmlns="http://www.w3.org/TR/REC-html40";
                result-ns="">

<xsl:template match="/">                    <!--root rule-->
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="text">
	<textarea id="input" name="mytext" rows="5" cols="30" wrap="physical">
		<xsl:value-of select="text()"/>
	</textarea>
</xsl:template>

</xsl:stylesheet>

T:\joerg>call xsl test.xml test.xsl test.htm
T:\joerg>type test.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<textarea id="input" name="mytext" rows="5" cols="30" wrap="physical">line 1
line 2
</textarea>

T:\joerg>



--
G. Ken Holman                    mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Website:  XSL/XML/DSSSL/SGML services, training, libraries, products.
Publications:   Introduction to XSLT (3rd Edition) ISBN 1-894049-00-4


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread