[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: No carriage return/ line feed
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|