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

Re: Preserve Whitespace with Mixed Content (Text and

Subject: Re: Preserve Whitespace with Mixed Content (Text and Tags)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 13 May 2005 16:53:39 +0100
xml preserve whitespace
> I am using the XMLSpy (2004 rel. 3) built in XSLT engine, as well as
> MSXML, 

they may both use the same xml parser even if they are different xsl
engines. (I don't know)

> The problem with xsl:preserve-space seems to be 
> that it works on text-only nodes, and not on nodes with mixed content, 
> such as in my case. I have no problem retaining the spaces in text-only 
> nodes (e.g., <THD>   Blah Blah    </THD).

preserve-space would have no effect on that node as the text node is not
all white. preserve-space strip-space (and Microsof'ts non conforming
white space removal) only affect text nodes that _only_ consist of
white space.

If you are using a system that is using msxml to parse the XML and you
can't set teh whitespace property before parsing then you can put
xml:space="preserve"
in your source file (eg on the top level element) with the same result.
there is nothing you can do from XSLT as the spaces are removed by the
parser before XSLT starts.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.