[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] <br />'s double-space after XSL transformation
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
|
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
|