RE: [DM] white space

> [Michael Rys] I believe that in document-centric XML they are important
> and thus should be guarded with an explicit xml:space="preserve" (

I do not believe that the Xquery spec (DM spec actually) can
re-interpret xml:space in this way. I want to be able to query XML
documents writen by others, based on the xml spec, and they won't have
xml:space in necessarily.


> (or an
> external data model generation flag that sets the default preservation
> of such whitespace only text nodes to preserve)

I'm not sure what you mean by external, but I need to be able to set this
flag in an xquery or xslt file (as that is the only portable place to
put it, and without it many (almost all of mine) stylesheets  will
produce broken results.. As a compromise (because I'm feeling
generous) I'd note that this flag only need affect building a new
datamodel from a "real" xml file (ie a string of characters matching the
productions in the xml spec) if the input is a pre-cooked datamodel or
being built on the fly from some database or (for MK, a sax-emiting
gedcom parser) and the spaces are gone, then so be it.

> . However in data-centric XML they are not.
Granted they are not useful but having them there takes a bit (or a lot)
of space,  compared with the bad effects of removing spaces that
_are_ needed, I think it's clear which should be the default. (I'm still
a pure mathematician at heart, I don't care waiting 2000 years if the
right answer comes out in the end...) But seriously I can see that in
many situations the white space is just indentation cruft and not
putting in the dom as a user option could give savings. If it is
automatic (ie not a user option), the most that is safe to do is remove
white space in _declared_ element content, but even that isn't
particularly safe. 

> 
> So I argue that we need to provide support for both and the place to put
> that support is outside of the data model specification itself.

If xsl:preserve-space and xsl:strip space can be re-interpretted as a
higher level setting of some flag that affects the building of the
datamodel (and xquery has something similar) then the exact nature of
these commands needn't be in the DM document, I agree.


> [Michael Rys] I agree that it is a problem in IE and that they should
> have used the preserve whitespace property. Now the cost of changing is
> probably too high

I really wasn't trying to complain about IE, but it's the only system I
know that acts in the manner that the DM document appeared to be
explictly authorising, and it's hard to speak against that without
mentioning some real experience. Whether IE can change its msxml3/XSLT1
setup is really a commercial matter not for this list, but if there is
ever an XSLT2 (I hope so:-).... Then hopefully they could look at that
again (especially if the  bunch of specs said somewhere that if there is
a mechanism to strip spaces there must be some place that a user can
turn the  thing off.)

David

Received on Monday, 8 December 2003 18:39:44 UTC