This is what is displayed in my XML output (note the line breaks)
<root>
<Item type="Comment">
<comment>this is a test
this is a test
this is a test</comment>
</Item>
</root>
In my stylesheet
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="urn:user-scripts">
<xsl:output method="html" omit-xml-declaration="yes" standalone="yes" indent="yes" cdata-section-elements="script msxsl:script"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/Root">
<xsl:apply-templates select="Item"/>
</xsl:template>
<xsl:template match="Item[@type='Comment']">
<html>
<head>
<title>
Comment: <xsl:value-of select="comment_no"/>
</title>
</head>
<style>
* {
font-family: "Arial", sans-serif;
font-size: 10pt;
}
body {
min-width: 775px;
max-width: 775px;
margin-left: auto;
margin-right: auto;
}
td {
padding: 0px;
}
.layoutTable {
width: 100%;
}
.fieldValue {
width: 99%;
padding-left: 7px;
}
.layoutTable {
width: 100%;
}
div.layoutBin {
page-break-inside: avoid;
overflow: hidden;
border: solid;
border-width: 1px;
margin-bottom: 10px;
padding-left: 3px;
padding-right: 3px;
}
</style>
<body>
<div class="layoutBin" id="keyInfo">
<div class="left" style="width: 25%">
<table class="layoutTable">
<tr>
<td class="fieldValue">
<xsl:value-of select="comment"/>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The line breaks are removed and my browser displays the result in a single line instead.
How do I preserve/display the line breaks?