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

RE: Handling of significant whitespace in .NET XmlReade r

  • To: "Simon St.Laurent" <simonstl@s...>,<xml-dev@l...>
  • Subject: RE: Handling of significant whitespace in .NET XmlReade r
  • From: "Derek Denny-Brown" <derekdb@m...>
  • Date: Tue, 8 Jul 2003 10:01:41 -0700
  • Thread-index: AcNCMSPjpF9RnL2EToyIwBdBrGjO0wDQAYxQ
  • Thread-topic: Handling of significant whitespace in .NET XmlReade r

xml significant whitespace
That actually surprises me greatly.  Msxml's default (chosen for
performance, many moons ago) was to discard explicit text nodes for
whitespace, but to internally preserve that some whitespace did exist.
This can be turned off via xml:space or doc.preserveWhitespace = true.
The net effect was that node.text, node.xml, and xslt should insert a
space (or newline) there, but would loose the precise original
whitespace markup.  There have been bugs regarding this, but there has
always been the xml:space-"preserve" work-around.

Oddly enough, Despite the fact that this behaviour deviates from what
XML/DOM recommends, I have had many users actually _thank_ us for
behaving this way.  For document's which don't have mixed content,
Msxml's default generated DOM trees which are easier to navigate because
they don't have lots of text nodes.  From the perspective of many
xml-novices, these text nodes are 'clutter'...  Not exactly a design
goal when we decided to do things this way (primary reasoning was memory
footprint and perf, both of which it aids significantly), but an amusing
fall-out.

Whitespace handling rules is one of the top issues on my list of
problems with Xml.  There is no solution which answers all customers'
needs.  If Xml had just provided a way to unambiguously identify mixed
content without a DTD, this would not be a problem.  I remember the
(many & long) discussions on the topic and I don't fault those who made
the decision.  Hindsight is always 20/20.

-derek

> -----Original Message-----
> From: Simon St.Laurent [mailto:simonstl@s...]
> Sent: Friday, July 04, 2003 6:32 AM
> To: xml-dev@l...
> Subject: Re:  Handling of significant whitespace in .NET
XmlReade
> r
> 
> davidc@n... (David Carlisle) writes:
> >It's virtually impossible to style an input document
> ><p>
> ><b>this<b> <i>is</b> <span class="zzz">bad</span>
> ></p>
> >using (say) XSLT in IE6 without losing the interword spaces, which is
a
> >shame as otherwise it would be quite possible to use XSLT to give
XHTML
> >(1 and 2) rendering in IE.
> 
> Wow.  Now that's a serious bug.
> 
> Maybe it's worth adding to the list at:
> http://webstandards.org/opinion/archive/2003/06/27/
> 
> 
> --
> Simon St.Laurent
> Ring around the content, a pocket full of brackets
> Errors, errors, all fall down!
> http://simonstl.com -- http://monasticxml.org
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
> 



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.