xsl-list
[Top] [All Lists]

RE: Result still indented despite indent="no"

2005-02-21 08:01:59
Hello,
  I just cross checked Mr. Holman's findings.. Below
are my findings, and my views after that..

Test 1
------
I tested the XML (test.xml) -
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<pre>
  <b>bold</b>
  <i>italic</i>
</pre>

with XSL (test.xsl) -
<?xml version="1.0" encoding="iso-8859-1"?>
<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>

I removed <xsl:preserve-space elements="*"/> from XSL
for this test(as shown in Mr. Holman's example).

Results -
1) IE 6 
result - 2

2) MSXML4 (from command line)
result - 5
(msxsl test.xml test.xsl) - Using Microsoft's
msxsl.exe wrapper utility

3) Saxon 8.1.1
result - 5

I feel, IE 6 is non-conformant to XSLT 1.0 here; while
MSXML4 and Saxon are conformant.

Test 2
------
XML is same,

XSL is -
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

<xsl:output method="text"/>

<xsl:preserve-space elements="*"/>

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

</xsl:stylesheet>

(I am now using preserve-space)

Results -
1) IE 6 
result - 2

2) MSXML4 (from command line)
result - 5

(msxsl test.xml test.xsl)

3) Saxon 8.1.1
result - 5

I feel, IE 6 is non-conformant here; while MSXSL4 and
Saxon are conformant. But now, it is a serious problem
with IE 6(as compared to Test 1). This seems a bug in
implementation of xsl:preserve-space in IE 6.

MSXML4 SDK documentation says..
"The default XML parser for Internet Explorer is MSXML
2.0 or MSXML 3.0, depending on the version of Internet
Explorer. Until Internet Explorer ships with MSXML 4.0
or later as its default XML parser, the MSXML 4.0
features are available in Internet Explorer only via
scripting."

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

My request to Microsoft people..
As MSXML4 seems a great XSLT 1.0 processor, it should
now be provided with IE 6. They can release a XSLT
1.0(or called MSXML4) patch  for IE 6. Now that IE 7
would come in market, it will be great if Microsoft
ships MSXML4 XSLT 1.0 engine with it(and not old MSXML
3.0).

But there could be practical problem for Microsoft to
implement this.. There may be lot of applications
already developed for IE 6 using old MSXML 2.0/3.0, so
there could be problem.. 

If we can have an option in IE 6 like : Tools ->
Internet Options -> Advanced - XML. And user can
choose MSXML 2.0, MSXML 3.0 or MSXML 4.0 from here. Is
it possible to update IE browsers world over like this
via a patch from Microsoft's Windows Update site. 

I guess it should be possible!

I will complete my wishlist with this!
I would also wish Microsoft develop a XSLT 2.0/XPath
2.0 processor (a fully Schema Aware processor), and
provide it with IE and MSXML. I have heard Microsoft
has released MSXML5, but that is only shipping with
Office 2003. Probably they will develop XSLT 2.0/XPath
2.0 engine and gift us with MSXML6(or beyond!). XSLT
2.0 is an important enhancement to the XSLT language,
that having support for it in popular platforms, would
be a boon to developrs and the users.

Regards,
Mukul

--- "G. Ken Holman" <gkholman(_at_)CraneSoftwrights(_dot_)com>
wrote:

Oh, I'm glad you could find something to refute the
evidence ... could you 
please show me in your experimentation how MSXSL
does not strip white-space 
text nodes in the presence of an xsl:preserve-space
instructions?

I posted last night that I was not able to get MSXSL
to preserve 
white-space text nodes even when using
xsl:preserve-space:

  

http://www.biglist.com/lists/xsl-list/archives/200502/msg01063.html

.......................... Ken

--
World-wide on-site corporate, govt. & user group
XML/XSL training.
G. Ken Holman                
mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.         
http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   
+1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness 
http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: 
http://www.CraneSoftwrights.com/legal




                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
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>
--~--