[xsl] <br />'s double-space after XSL transformation

Subject: [xsl] <br />'s double-space after XSL transformation
From: Kathryn.Grant@xxxxxxxxxxxxxxxxx
Date: Wed, 19 Jun 2002 17:38:31 -0700
Hi all,

Got a strange question.  I have an xhtml document which contains a few
<br/>'s.  When the xhtml document is viewed in the browser,
pre-transformation, the <br/>'s behave normally, inserting a line break.

However, after I transform the document, all the <br/>'s become TWO line
breaks--in other words, they insert a double space as if they were </p>'s.
Can anyone tell me why, or suggest how I can get the <br/>'s to insert just
one line break after the transformation?

I'm using the following XSL--pretty simple:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:xhtml="http://www.w3.org/1999/xhtml";
    version="1.0">

<xsl:output method="html" encoding="UTF-8"/>

	<xsl:template match="node() | @*">
		<xsl:copy>
			<xsl:apply-templates select="node() | @*"/>
		</xsl:copy>
	</xsl:template>

</xsl:stylesheet>

The transformation is done with the following javascript code:

<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("MSXML2.DOMDocument")
xml.async = false
xml.load("3-xhtml.htm")

// Load the XSL
var xsl = new ActiveXObject("MSXML2.DOMDocument")
xsl.async = false
xsl.load("manager.xsl")

// Transform
document.write(xml.transformNode(xsl))

TIA,
Kathryn

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


Current Thread