RE: No carriage return/ line feed

Subject: RE: No carriage return/ line feed
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Feb 1999 09:45:00 -0500
At 99/02/03 08:14 -0500, Ding, Suli (GEIS) wrote:
>I am using XSL to convert an XML document into some proprietary format
>document using MSXSL. An carriage return and line feed (^M character) are
>always added for each
>	<xsl:value-of select="element/@name"/>
>Is there a way I can instruct MSXSL not to insert these characters?

MSXSL doesn't yet treat whitespace as specified in the Working Draft.

By having introduced whitespace into the stylesheet, MSXSL is copying this
(undesireably) into the result tree.

The Working Draft says that the following should add no stylesheet
whitespace to the result tree:

   <xsl:when test="element/@name">
     <xsl:value-of select="element/@name"/>

For MSXSL, I've done the following to suppress the trailing whitespace:

   <xsl:when test="element/@name">
     <xsl:value-of select="element/@name"/></xsl:when>
... or the following to remove all whitespace but not have enormously long

   <xsl:when test="element/@name"
    ><xsl:value-of select="element/@name"

Note how whitespace *inside* tags is never significant and the above has no
whitespace *between* the tags.

I hope this helps.

.................. Ken

G. Ken Holman         mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Next XSL Training:      X-Tech:1999-03-07  WWW8:1999-05-11

 XSL-List info and archive:

Current Thread