RE: [DM] white space

> We have seen the data model generation as an application that
> understands xml:space="default" and "preserve" and have furthermore
> decided that it is up to the upper-specs and implementation to define
> what the "default" behaviour is.

"We" here being Microsoft? Certainly that seems to be the only
explanation of why (uniquely) the microsoft implementations are
inconsistent with every other implementation (and all but the most
generous reading of the XSLT1 spec).
(I'm really not trying to take part in that common and often enjoyable
sport of Microsoft bashing here, I really like msxsl as an
implementation and use it a lot (along with saxon and xalan) however you
can't help but single them out on this issue as the behaviour
is so unique to those implementations. It really is a FAQ on xsl-list:
some user posts with some inexplicable white space or node counting
problem, usually they don't say which implementation they are using but
the description of the problem allows those of us answering to identify
that they are using msxml. A version 2 of a language seems an ideal time
to tighten up the language to close this loophole that allows this
incompatible behaviour.


> I find this logical and consistent. If you want to get the upper-specs
> to mandate options to provide both skip and preserve as options, then
> please indicate where and how. We will certainly look at this.

XSLT1 (and 2) have this as a user option already, xsl:strip-space and
xsl:preserve-space.

Unfortutely the option is a no op if the default behaviour of the parser
is (contrary to the XML specification) to remove the spaces from your
document before XSLT starts, so before the user option to preserve space
can work.

Building an instance of the data model with all inter-word spaces
removed is in any case _allowed_ by the "application and build data
models how it likes" clause I just want to ensure that the application
can not do that as a default behaviour while claiming to input an XML
document.

David

Received on Friday, 5 December 2003 19:10:54 UTC