|
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"/>
</xsl:when>
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
lines:
<xsl:when test="element/@name"
><xsl:value-of select="element/@name"
/></xsl:when>
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. http://www.CraneSoftwrights.com/s/
Box 266, V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0 F: +1(613)489-0995
Training: http://www.CraneSoftwrights.com/s/schedule.htm
Resources: http://www.CraneSoftwrights.com/s/resources.htm
Shareware: http://www.CraneSoftwrights.com/s/shareware.htm
Next XSL Training: X-Tech:1999-03-07 WWW8:1999-05-11
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: No carriage return/ line feed, Ding, Suli (GEIS) | Thread | RE: Writing xsl Stylesheets for IE0, anette . engel |
| Re: Fw: Formal parameters for style, Jason Diamond | Date | RE: Writing xsl Stylesheets for IE0, anette . engel |
| Month |