Subject: RE: [xsl] xml:preserve space makes xsl:attribute fail in IE6 From: "Dunning, John" <JDunning@xxxxxxxxx> Date: Wed, 11 Dec 2002 15:48:48 -0500 |
Neil, The xml:space attribute should be used in the source XML doc: <a xml:space="preserve"> The XSL equivalent is a top-level element in the stylesheet that list a whitespace-separated list of elements for which to preserve the space: <xsl:preserve-space elements="a pre (etc)"/> HTH, John -----Original Message----- From: Neil Smith [mailto:neil@xxxxxxxxxxxxxxx] Sent: Wednesday, December 11, 2002 3:48 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] xml:preserve space makes xsl:attribute fail in IE6 Hello - I searched the archives for this string and got no results. Maybe it's a known problem so I apologise if I have misunderstood : For my xsl stylesheet, using <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xml:space="preserve"> in IE6, I had a problem. I found that when using the xsl:attribute construct like this, no attributes were added to my anchor tag (by checking the HTML source) <a> <xsl:attribute name="href"> <xsl:value-of select="@start"/> </xsl:attribute> <xsl:value-of select="title"/> </a> I used the space="preserve" to keep my HTML tidy and readable. Finally after trying a number of otherwise working examples, I removed space="preserve" from the stylesheet tag and presto, the attribute was added as expected. I am transforming the XML source in javascript, setting up an XML object with MSXML2.DOMDocument ... Questions : is there a known problem with preserve space on IE6 ? Would this occur if I were to transform the XML server side (is it a javascript problem) ? Is there any other way to keep the HTML output formatting as indented in the stylesheet ? Thanks for any feedback. Regards, Neil Smith. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xml:preserve space makes , Michael Kay | Thread | RE: [xsl] xml:preserve space makes , Dunning, John |
[xsl] xml:preserve space makes xsl:, Neil Smith | Date | RE: [xsl] xml:preserve space makes , Dunning, John |
Month |