This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Avoid outputting newlines in output method="text"
On Wed, Sep 11, 2002 at 09:29:10PM +0200, J.Pietschmann wrote:
> Add <xsl:strip-space elements="*"/> to the beginning of
> your style sheet and check how much of your problem is
> solved after this (look up details in a book, tutorial or
> the spec http://www.w3.org/TR/xslt#strip).
Turned out that this in conjunction with 'normalize-space' was all I
needed.
---------------------------
<xsl:template match="p">
<xsl:element name="p">
<xsl:apply-templates />
</xsl:element>
<xsl:text> </xsl:text>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="p/text()">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>
---------------------------
--
Alex Polite
http://plusseven.com/gpg/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list