strip non-text space, returns, tabs, etc...

Subject: strip non-text space, returns, tabs, etc...
From: "Russell Allen" <rallen@xxxxxxxxxxxx>
Date: Mon, 29 Nov 1999 13:33:23 -0600
We have run into a problem with xsl including things like returns and
white-space from the source xml in the result xml.  I realize it is supposed
to do this, but we would like it to strip these. For Example:

Source XML:
<myValue>
        1234
</myValue>

XSL segment:
<xsl:element name="A">
        <xsl:attribute name="href"><xsl:value-of
select="myValue"/></xsl:attribute>
        <xsl:text>This is a link.</xsl:text>
</xsl:element>

Produces:
<A href="&#10;        1234&#10;">This is a link.</A>

What I would like:
<A href="1234">This is a link.</A>


The obvious solution of striping the whitespace and returns from the source
xml when generated works, but makes it virtually unreadable to the human
eye.  I would like to avoid this.
We are using LotusXSL for parsing.

TIA,
Russell Allen
ComFrame Software Corp.



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


Current Thread