Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: msxsl.exe 3.0 disagrees with IE 6.0 over simple XSL

From: "Chris Lovett" <someone@------.------>
To: NULL
Date: 7/6/2005 11:44:00 PM
This is a multi-part message in MIME format.

------=_NextPart_000_0107_01C58284.83E69D70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

What version of IE are you using?

I get the following output in IE 6.0.2900.2180.xpsp_sp2.

a.. Doberman=20
  a.. Poodle=20
  b.. Terrier
a.. Hooded=20
  a.. Blue=20
  b.. Brown=20
  c.. Norway


"Phlip" <phlip_cpp@y...> wrote in message =
news:%23SwetbcgFHA.4032@T......
> XSLers:
>=20
> Consider this dirt-simple, tutorial-level XSL:
>=20
> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
>            version=3D"1.0">
>=20
>  <xsl:output method=3D"xml"
>              media-type=3D"text/html"
>              standalone=3D"no"
>              omit-xml-declaration=3D"yes"
>              encoding=3D"UTF-8" />
>=20
>  <xsl:template match=3D"/attitude">
>    <html>
>      <head></head>
>      <body bgcolor=3D"#ffffff">
>        <ul>
>          <xsl:for-each select=3D"*">
>            <li>
>              <xsl:value-of select=3D"@title" />
>              <ul>
>                <xsl:for-each select=3D"property">
>                  <li>
>                    <xsl:value-of select=3D"@name" />
>                  </li>
>                </xsl:for-each>
>              </ul>
>            </li>
>          </xsl:for-each>
>        </ul>
>      </body>
>    </html>
>  </xsl:template>
>=20
> </xsl:stylesheet>
>=20
> We obviously need to turn this simple XML into XHTML:
>=20
> <?xml version=3D"1.0" ?>
> <?xml-stylesheet type=3D"text/xsl" href=3D"format.xslt" ?>
> <attitude>
>    <concept title=3D"Doberman">
>        <property name=3D"Poodle" />
>        <property name=3D"Terrier" />
>    </concept>
>    <concept title=3D"Hooded">
>        <property name=3D"Blue" />
>        <property name=3D"Brown" />
>        <property name=3D"Norway" />
>    </concept>
> </attitude>
>=20
> When I run that thru MSXSL.EXE (and Tidy -i), it produces this:
>=20
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <html>
> <head>
> </head>
> <body bgcolor=3D"#FFFFFF">
>  <ul>
>    <li>Doberman
>      <ul>
>        <li>Poodle</li>
>        <li>Terrier</li>
>      </ul>
>    </li>
>    <li>Hooded
>      <ul>
>        <li>Blue</li>
>        <li>Brown</li>
>        <li>Norway</li>
>      </ul>
>    </li>
>  </ul>
> </body>
> </html>
>=20
> A beautiful XHTML page containing nested lists.
>=20
> However, when I load that sample XML inside IE, it doesn't render =
beautiful
> nested frames. It renders an ugly little snip that looks like it came =
from
> <ul><li><ul><li></li></ul></li></ul>. Nothing else. It's as if the
> transformation started, and died when it encountered output text.
>=20
> The first thing to check is the transclusion tags. So is this correct =
in the
> XML input file??
>=20
> <?xml version=3D"1.0" ?>
> <?xml-stylesheet type=3D"text/xsl" href=3D"format.xslt" ?>
>=20
> Note that format.xslt is local, in a file in the same folder. It's not =
on a
> server. Would that matter? (I would prefer not to serve the XSLT =
because the
> rest of the program is an HTML GUI without a server.)
>=20
> So are the tags to declare the XSLT as outputing XHTML correct?
>=20
> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
>            version=3D"1.0">
>=20
>  <xsl:output method=3D"xml"
>              media-type=3D"text/html"
>              standalone=3D"no"
>              omit-xml-declaration=3D"yes"
>              encoding=3D"UTF-8" />
>=20
> --=20
>  Phlip
>  http://www.c2.com/cgi/wiki?ZeekLand
>=20
>
------=_NextPart_000_0107_01C58284.83E69D70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>What version of IE are you =
using?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I get the following output in IE=20
6.0.2900.2180.xpsp_sp2.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2>
<LI>Doberman=20
<UL>
  <LI>Poodle=20
  <LI>Terrier</LI></UL>
<LI>Hooded </LI>
<UL>
  <LI>Blue=20
  <LI>Brown=20
  <LI>Norway</FONT></LI></UL>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Phlip" &lt;</FONT><A=20
href=3D"mailto:phlip_cpp@y..."><FONT face=3DArial=20
size=3D2>phlip_cpp@y...</FONT></A><FONT face=3DArial size=3D2>&gt; =
wrote in=20
message </FONT><A =
href=3D"news:%23SwetbcgFHA.4032@T..."><FONT=20
face=3DArial =
size=3D2>news:%23SwetbcgFHA.4032@T...</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; =
XSLers:<BR>&gt;=20
<BR>&gt; Consider this dirt-simple, tutorial-level XSL:<BR>&gt; <BR>&gt; =

&lt;xsl:stylesheet xmlns:xsl=3D"</FONT><A=20
href=3D"http://www.w3.org/1999/XSL/Transform"><FONT face=3DArial=20
size=3D2>http://www.w3.org/1999/XSL/Transform</FONT></A><FONT =
face=3DArial=20
size=3D2>"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
version=3D"1.0"&gt;<BR>&gt; <BR>&gt;&nbsp; &lt;xsl:output=20
method=3D"xml"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
media-type=3D"text/html"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
standalone=3D"no"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
omit-xml-declaration=3D"yes"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
encoding=3D"UTF-8" /&gt;<BR>&gt; <BR>&gt;&nbsp; &lt;xsl:template=20
match=3D"/attitude"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;html&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;head&gt;&lt;/head&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;body =

bgcolor=3D"#ffffff"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
&lt;ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

&lt;xsl:for-each=20
select=3D"*"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;=20
&lt;li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;xsl:value-of select=3D"@title"=20
/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
&lt;ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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BR>&gt;&nbsp;=20
&lt;/xsl:template&gt;<BR>&gt; <BR>&gt; &lt;/xsl:stylesheet&gt;<BR>&gt; =
<BR>&gt;=20
We obviously need to turn this simple XML into XHTML:<BR>&gt; <BR>&gt; =
&lt;?xml=20
version=3D"1.0" ?&gt;<BR>&gt; &lt;?xml-stylesheet type=3D"text/xsl"=20
href=3D"format.xslt" ?&gt;<BR>&gt; =
&lt;attitude&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;concept=20
title=3D"Doberman"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

&lt;property name=3D"Poodle"=20
/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property=20
name=3D"Terrier" /&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;/concept&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;concept=20
title=3D"Hooded"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;property name=3D"Blue" =
/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;property name=3D"Brown"=20
/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property=20
name=3D"Norway" /&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;/concept&gt;<BR>&gt; =

&lt;/attitude&gt;<BR>&gt; <BR>&gt; When I run that thru MSXSL.EXE (and =
Tidy -i),=20
it produces this:<BR>&gt; <BR>&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD =
HTML=20
3.2//EN"&gt;<BR>&gt; &lt;html&gt;<BR>&gt; &lt;head&gt;<BR>&gt;=20
&lt;/head&gt;<BR>&gt; &lt;body bgcolor=3D"#FFFFFF"&gt;<BR>&gt;&nbsp;=20
&lt;ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;li&gt;Doberman<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;li&gt;Poodle&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
&lt;li&gt;Terrier&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; =
&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;=20
&lt;li&gt;Hooded<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;li&gt;Blue&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
&lt;li&gt;Brown&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
&lt;li&gt;Norway&lt;/li&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/ul&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;/li&gt;<BR>&gt;&nbsp;=20
&lt;/ul&gt;<BR>&gt; &lt;/body&gt;<BR>&gt; &lt;/html&gt;<BR>&gt; <BR>&gt; =
A=20
beautiful XHTML page containing nested lists.<BR>&gt; <BR>&gt; However, =
when I=20
load that sample XML inside IE, it doesn't render beautiful<BR>&gt; =
nested=20
frames. It renders an ugly little snip that looks like it came =
from<BR>&gt;=20
&lt;ul&gt;&lt;li&gt;&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;=
&lt;/ul&gt;.=20
Nothing else. It's as if the<BR>&gt; transformation started, and died =
when it=20
encountered output text.<BR>&gt; <BR>&gt; The first thing to check is =
the=20
transclusion tags. So is this correct in the<BR>&gt; XML input =
file??<BR>&gt;=20
<BR>&gt; &lt;?xml version=3D"1.0" ?&gt;<BR>&gt; &lt;?xml-stylesheet=20
type=3D"text/xsl" href=3D"format.xslt" ?&gt;<BR>&gt; <BR>&gt; Note that =
format.xslt=20
is local, in a file in the same folder. It's not on a<BR>&gt; server. =
Would that=20
matter? (I would prefer not to serve the XSLT because the<BR>&gt; rest =
of the=20
program is an HTML GUI without a server.)<BR>&gt; <BR>&gt; So are the =
tags to=20
declare the XSLT as outputing XHTML correct?<BR>&gt; <BR>&gt; =
&lt;xsl:stylesheet=20
xmlns:xsl=3D"</FONT><A =
href=3D"http://www.w3.org/1999/XSL/Transform"><FONT=20
face=3DArial =
size=3D2>http://www.w3.org/1999/XSL/Transform</FONT></A><FONT=20
face=3DArial=20
size=3D2>"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
version=3D"1.0"&gt;<BR>&gt; <BR>&gt;&nbsp; &lt;xsl:output=20
method=3D"xml"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
media-type=3D"text/html"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
standalone=3D"no"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
omit-xml-declaration=3D"yes"<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
encoding=3D"UTF-8" /&gt;<BR>&gt; <BR>&gt; -- <BR>&gt;&nbsp; =
Phlip<BR>&gt;&nbsp;=20
</FONT><A href=3D"http://www.c2.com/cgi/wiki?ZeekLand"><FONT =
face=3DArial=20
size=3D2>http://www.c2.com/cgi/wiki?ZeekLand</FONT></A><BR><FONT =
face=3DArial=20
size=3D2>&gt; <BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0107_01C58284.83E69D70--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent