[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
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! 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
|