OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Problems with whitespace and msxml

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <ak117@freenet.carleton.ca>
  • To: <xml-dev@ic.ac.uk>
  • Date: Thu, 1 Jan 1998 08:43:20 -0500

Alexander Hinds writes:

[on xml:space]

 > Moreover, no matter what I set it to, I always get back whitespace
 > in my tree, even without a mixed content model (for example, for
 > element book, it's first sib is always whitespace).
 >  My question, basically is: how do I eliminate whitespace from my
 > tree entirely?  Or failing that how do I get the current value of
 > xml-space in my ElementImpl subclass?  It appears that nameXMLSPACE
 > is private, not protected (why?) so a subclass can't really search
 > it.  But even when I change the visibility, it's always null
 > anyway.

I have not used msxml recently, so I do not know what it does, but the
PR is very clear that the 'xml:space' attribute is strictly
informative (from 2.10, "White Space Handling"):

   An XML processor must always pass all characters in a document that
   are not markup through to the application. A validating XML processor
   must distinguish white space in element content from other non-markup
   characters and signal to the application that white space in element
   content is not significant.

   A special attribute named "xml:space" may be inserted in documents to
   signal an intention that the element to which this attribute applies
   requires all white space to be treated as significant by applications.

In other words, the value of xml:space should _not_ affect the
information that msxml returns to your application; instead, it is up
to your application to read the value, if present, and to take
appropriate action.  Msxml should return all whitespace, no matter
what.

I have heard rumours that xml:space may some day be removed from the
core XML spec and put into a separate "XML Conventions" spec -- that
would be a very good idea.


All the best,


David

-- 
David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS