xsl-list
[Top] [All Lists]

Re: Result still indented despite indent="no"

2005-02-21 09:19:48
Hi David,
  Thanks for your response. I did some searching, and
found this link -
http://msdn.microsoft.com/msdnmag/issues/0900/xml/

It mentions, MSXML 3.0 is XSLT 1.0/XPath 1.0
compliant. Hence IE 6 should show XSLT 1.0 behaviour
(since it uses MSXML 3.0).

But it shows a bug with xsl:preserve-space
instruction. Do you agree that it is bug?

You are saying IE 6's default setting for
preservewhitespace property is "false". Is it possible
to make it true? 
I found this example in MSXML4 SDK help, regarding
preserveWhiteSpace property -
var xmlDoc = new
ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.preserveWhiteSpace = true;
xmlDoc.load("books.xml");
alert(xmlDoc.xml);

It seems, its possible to change preserveWhiteSpace
property with script only. 

You earlier gave this workaround in response to Mr.
Holman's query -
if anyone knew how to trigger this in the browser
environment.
your answer -
"simplest (which is what I do) is to give in to
overwhelming force and stick xml:space="preserve" on
the top level element of your source file. Then
styling with a stylesheet refenced via the
xml-styleshet Pi more or less works as expected.

Plan b is to use xml-stylesheet PI to reference a
styleseet that generates a small html file that uses
javascript to reload the xml source after setting
preserveWhiteSpace."

So it seems, using scripts is 1st option to preserve
spaces in IE.. Or use xml:space="preserve" on the top
level element of source file (as you suggested). Or
use a JavaScript workaround as 3rd solution (as you
suggested)..

I feel, this will cause problem to develop
cross-browser applications..

Regards,
Mukul

--- David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:


Since IE 6 is using MSXML 3.0 , which seems not
100%
XSLT 1.0 compliant, we are getting wrong result
with
IE.

Once again, No.

The differences you are seeing are nothing to do
with the difference
between msxml3 and msxml4. they are to do with the
setting of the
preservewhitespace property. IE6 sets this to false
(which is the
default value) and if it is set to false msxml3 and
msxml4 will both
lose these spaces as has been stated many times in
this thread.

Probably they will develop XSLT 2.0

blogs from key microsoft developers indicate that
there are no current
plans to do an xslt2 implementation at microsft.

David


________________________________________________________________________
This e-mail has been scanned for all viruses by
Star. The
service is powered by MessageLabs. For more
information on a proactive
anti-virus service working around the clock, around
the globe, visit:
http://www.star.net.uk




                
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page ? Try My Yahoo!
http://my.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--