Re: [xsl] Result still indented despite indent="no"

Subject: Re: [xsl] Result still indented despite indent="no"
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Tue, 22 Feb 2005 09:30:46 -0800 (PST)
Thank you David for your comments..

I'll summarize my understanding of Microsoft's XSLT
processor(particularly whitespace behaviour) ..

1) IE 6's XSLT processor
We cannot control whitespaces from XSLT (with
xsl:preserve-space and xsl:strip-space). This is due
to, XML parser stripping the whitespaces by default,
and supplying a tree to XSLT engine which never
contain whitespaces..

Wish of XSLT developers..
We want XSLT stylesheet *to be able to* control
whitespaces.. However, in scripting environment we can
do it with preserveWhiteSpace property.

This is *technically not a non-conformance*, as said
by Mr. Kay earlier. Because XSLT spec says, XSLT
engine operates on input trees(i.e what a XML parser
gives it). How white spaces are handled *during XML
parsing* is outside the scope of XSLT spec.

2) MSXML4 (which is a seperate product, and presently
not usable in IE by default. It can however be used
via scripting)

XSLT developers are now *able to* control whitespaces
from stylesheets. xsl:preserve-space and
xsl:strip-space *have effect*.. The characteristic
present in IE 6(as described above) is reversed. Now
XML parser preserves whitespaces by default, before
supplying to XSLT engine..

This test case (now a sort of conformance suite for

XML file -

XSLT file -
<?xml version="1.0"?>

<xsl:output method="text"/>

<xsl:template match="/">
  <xsl:value-of select="count(/pre/child::node())"/>


Produces output 5 (with MSXML4)

If MSXML4 is able to run in IE by default, we'll get
desired behaviour.. This we can wish, will happen in
future versions of IE.

David, if you agree with my understanding, we may
close this thread.


--- David Carlisle <davidc@xxxxxxxxx> wrote:

>   If it should be like this.. Than
> xml:space="preserve"
>   or "default" would be non-functional! Since its
>   purpose is to direct XML parser to preserve or
> strip
>   white spaces!
> No. That may (or may not) be how it is implemented
> but logically
> parsing happens before XSLT starts, the _input_ to
> XSLT is a tree
> generated by the parser. xsl:strip-space is an
> instruction to xslt
> whether or not to ignore certain white space nodes
> in the input,
> not an instruction to an xml parser to not generate
> those nodes.
>   I suggested earlier.., if we can have option in
> future
>   versions of IE
> You can ask, but it will be a very long way down a
> very long list of
> requested improvements. lack of support for xhtml,
> css, svg, xforms, etc
> etc etc affect a lot more people. And that's just
> windows. IE on the mac
> is another story again. If people care about these
> things, they're
> probably using firefox already. If they don't care
> (and clearly, a lot
> don't) then it's going to be hard to persuade anyone
> to implement this
> stuff.
> If you want to put pressure on vendors to implement
> a set of standards
> in a conformant way then that is clearly a good
> thing, but W3C isn't the
> organisation to do that. It can't put pressure on
> vendors; it is,
> essentially, a private club of those vendors. Not
> everyone working on
> W3C specs works for a W3C member company (Michael
> Kay is an invited
> expert on XSL and Xquery Working Groups, I'm an
> invited expert on the
> Math Interest Group for example) but the basic
> structure is that it is a
> consortium of companies.
> David

Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 

Current Thread