Whitespace problem

Subject: Whitespace problem
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Jun 1999 13:33:56 -0400

I am having quiet a bit of trouble with whitespace. I'd like to capture the
text of a particular element in a javascript array, so that I can retrieve
it from another window, when it is opened. I thought of using the DOM for
this purpose but would like to stick to XSL and Javascript. Anyways, I can't
seem to capture this text since all of the carriage returns in my source are
preserved, which Javascript doesn't like.

My question: How do I force XSL to strip out the carriage returns in the
text of an element? I am using the 1998-12-16 draft, as I want to stay
compatible with IE5.

I've tried:

<xsl:template match='MCOMMENT'>
 <A><xsl:attribute name="href">#</xsl:attribute>
 <IMG src="&images;mcomment.gif" border="0"/>

<xsl:strip-space element="MCOMMENT/PARA"/>

<xsl:template match='MCOMMENT/PARA'>

Note: MCOMMENT only contains PARA elements.

I've also tried adding the following as an attribute in the xsl:stylesheet


Still, the output of MCOMMENT/PARA includes preserved carriage-returns. What

Note: I'm currently using an alert box, as you may see, as opposed to a
proper window, until I can get the whitespace problem fixed.



Richard Lander
relander at uwaterloo.ca

Professional XML Authoring

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

Current Thread