[xsl] [xsl-list] MSXML 3.0/4.0 XSLT rendering bug

Subject: [xsl] [xsl-list] MSXML 3.0/4.0 XSLT rendering bug
From: Jason Kohls <jasonkohls@xxxxxxxxx>
Date: Wed, 13 Jul 2005 11:00:21 -0400
Hi everyone,

I'm having an issue performing client-side XML to XHTML
transformations using the MSXML 3.0/4.0 parser with IE 6.0.

Specifically, when I'm declaring my javascript and css includes using
XHTML, everything renders fine, in the correct order.  However, when
I'm using the XSL:ELEMENT tag to produce the <link> and <javascript>
XHTML tags, I'm only achieving partial rendering -- the background
image declared in the css is present in the <body> (where it should
be) but no other XHTML appears to be rendered in IE 6.0.

The CSS and JavaScript includes are located on a host thats defined by
an attribute parsed from the source XML file.

I've tried declaring the hostname variable within the XSL file itself;
no dice. I've also tried skipping the variable all together and just
adding the absolute URL to the XSL:ELEMENT href attribute, but to no
avail.  I've even tried placing the CSS file locally in the same
directory as the XML source document and XSL file and still nothing.

Using Stylus Studio Professional for debugging (and double-checking in
native IE 6.0), the "rendered text" view (basically, the transformed
source) appears correct.

FireFox works fine and ditto for Saxon, Xalan, and the other XSL
processors built into Stylus Studio.

Any help would be much appreciated.

Thanks,
Jason

XML:
==========
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>

<foo hostname="http://some_server";>
 <bar>
    <alpha>red</alpha>
    <bravo>blue</bravo>
    <charlie>green</charlie>
 </bar>
</foo>

XSLT:
==========
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" encoding="ISO-8859-1" indent="yes"
doctype-public="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

<!-- Variables and Constants -->

<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="hostName" select="foo/@hostname" />

<xsl:template match="*">
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title><xsl:value-of select="name(child::*[1])"/></title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />

<xsl:element name="link">
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="$hostName"
/>/css/common.css</xsl:attribute>
</xsl:element>

<xsl:element name="script">
<xsl:attribute name="type">text/javascript</xsl:attribute>
<xsl:attribute name="src"><xsl:value-of select="$hostName"
/>/js/showHide.js</xsl:attribute>
</xsl:element>

</head>
<body>
...

Current Thread