Problems with whitespace and msxml
Peter Murray-Rust
peter at ursus.demon.co.uk
Thu Jan 1 22:21:27 GMT 1998
At 13:18 01/01/98 -0800, Alexander Hinds wrote:
[...]
>Thanks. Oddly enough, though according to MS' docs:
>
>--
>Section 2.10 says that xml-space can be specified on any element controlling
>whether white space is preserved or normalized. The default is to normalize
>white space (which means unify all white space characters down to a single
>space). To preserve whitespace set xml-space to preserve, and this is
>inherited down the hierarchy. To switch back to the default, set xml-space
>to default
This is a grey area, and one where I feel the spec gives little guidance.
The spec requires a **processor** (many of us see this as synonymous with
*parser*) to behave in the way that DavidM has described earlier. There is
nothing in the spec describing any whitespace normalisation for the content
of elements [1]. If, therefore, msxml is acting wholly as a "processor" (a
la spec) it would appear *not* to be an XML-compliant processor from what
you have quoted above. If it is a combined processor/application, then it
should not be used as a "parser" or "processor" unless it is possible to
intercept the information at the level of "parser API".
I have been vociferous in wanting to develop conventions for this area, and
this highlights the need for SAX and for conventions. There will clearly be
a demand for an "HTML-like" normalisation of whitespace, but there is no
public move towards defining such a convention. The difficulties that we
are having here will be amplified when there are dozens of
parsers/applications/ with no agreed output.
P.
[1] *Attribute values* may be normalised if they are known not to be CDATA
[3.3.3], but there is no extension to content of elements.
>
>--
>
>Well, nomatter what I do it doesn't seem to do anything with the xml-space
>attribute. Moreover, it doesn't seem to actually set the attribute for any
>of my elements. For example, getAttribute(...) always returns null for
>xml-space.
>
>
>xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
>Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
>To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
>(un)subscribe xml-dev
>To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
>subscribe xml-dev-digest
>List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
>
>
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list