[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Result still indented despite indent="no"

Subject: Re: Result still indented despite indent="no"
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Tue, 22 Feb 2005 09:30:46 -0800 (PST)
xslt no indent
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
whitespaces!):

XML file -
<pre>
  <b>bold</b>
  <i>italic</i>
</pre>

XSLT file -
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:output method="text"/>

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

</xsl:stylesheet>

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.

Regards,
Mukul

--- 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! 
http://my.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.