|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Whitespace again
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
|
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








