[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: White space - preserving white space within elemen

Subject: Re: White space - preserving white space within element data using MSXML3
From: Conor Ryan <cryan@xxxxxxx>
Date: Fri, 22 Dec 2000 10:15:25 +0000
whitespace 160
Hi Brand,

>I interested in preserving white space and not line spacing as in the
following:
>
><example>     Here is some text with white space     </example>
>
>An obvious recommendation is to use &#160;
>
><example>&#160;&#160;Here is some text with white space&#160;&#160;</example>
>
>A recommendation has also been to use <xsl:preseve-space elements = "*"/>.

<xsl:preseve-space elements = "*"/> only applies to whitespace-only nodes.
therefore, it shall not affect your <example> element above. 

>With MSXML3, I don't seem to get the results I am expecting.  I don't get any
>results at all.  I'm expecting that the white space will be preserved in the
>rendered document.  Instead the white-space is removed (default behavior). 

The default behaviour, and i stand to be corrected on this, is to preserve
leading 
and trailing whitespaces in a node also containing text. these spaces can
be removed 
using the normalize-space() function. i ran a quick check on some xml with
MSXML3 and 
the leading and trailing whitespaces are preserved.

i hope this helps. if not, could you post some code?

Conor.


---------
Conor Ryan,
XML Workshop Ltd,
10 Greenmount Industrial Estate, Harolds Cross, Dublin 12, IRELAND.
Email: cryan@xxxxxxx
Phone: +353 1 4547811; Fax: +353 1 4731626
Web: http://www.xmlw.ie/


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.