RE: [xsl] Problem with IE5.5 and MSXML4.0

Subject: RE: [xsl] Problem with IE5.5 and MSXML4.0
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jan 2002 17:00:28 -0000

Also, your stylesheet wasn't well-formed (meaning it shouldnt have worked at
all...)

This is a well-formed version of your stylesheet which can be parsed using
msxml3, although without a sample xml file I cant test it with msxml4.

cheers

andrew

===


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="changes">
<html>
<body background="../images/bkrnd2.gif">
<p CLASS="header">Changes</p>
<p CLASS="body">

<table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr>
  <td CLASS="boldhead" width="10%"><a href="#"
onClick="top.updateSort('reference_number');">Reference No.</a></td>
  <td CLASS="boldhead" width="5%">Trans.ID</td>
</tr>

  <xsl:variable name="selectField" select="@sortBy" />
  <xsl:choose>
    <xsl:when test="@orderBy = 'ascending'">
      <xsl:apply-templates select="allocation_change">
		<xsl:sort select="*[name()=$selectField]" order="ascending"/>
      </xsl:apply-templates>
    </xsl:when>
    <xsl:when test="@orderBy = 'descending'">
    <xsl:apply-templates select="allocation_change">
      <xsl:sort select="*[name()=$selectField]" order="descending"/>
      </xsl:apply-templates>
    </xsl:when>
    <xsl:otherwise/>
  </xsl:choose>
</table>
</p>
</body>
</html>
</xsl:template>

<xsl:template match="allocation_change">
   <tr>
		<td CLASS="text">
			<xsl:value-of
select="reference_number"></xsl:value-of>
		</td>

		<td CLASS="text" bgcolor="FDE6B5">

			<xsl:value-of
select="transaction_id"></xsl:value-of>
		</td>

   </tr>
</xsl:template>

</xsl:stylesheet>




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Andrew Welch
Sent: Thursday, January 10, 2002 4:37 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Problem with IE5.5 and MSXML4.0



Hi,

How are you applying the stylesheet to the XML?


cheers

andrew

===






-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Belala,
Yacine
Sent: Thursday, January 10, 2002 1:42 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] Problem with IE5.5 and MSXML4.0






I am using the following stylesheet to build and sort a table.  It works
fine with IE6 but causes IE5.5 to crash. I am using MSXML4.0 and Win2K (The
updateSort function simply adds the sort field to the XML as an attribute)
Could anyone please help?

Thanks!!

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="changes">
  <html>
		<body background="../images/bkrnd2.gif">
			<p CLASS="header">Changes</p>
			<p CLASS="body">

  			<table border="0" cellpadding="4" cellspacing="1"
width="100%">
				<tr>
		    		<td CLASS="boldhead" width="10%"><a href="#"
onClick="top.updateSort('reference_number');">Reference No.</a></td>
				<td CLASS="boldhead" width="5%">Trans.
ID</td>
				<tr>

			<xsl:variable name="selectField" select="@sortBy" />
			<xsl:choose>
                    		<xsl:when test="@orderBy = 'ascending'">
                    			<xsl:apply-templates
select="allocation_change">
						<xsl:sort
select="*[name()=$selectField]" order="ascending"/>
					</xsl:apply-templates>
                    		</xsl:when>
				<xsl:when test="@orderBy = 'descending'">
                    			<xsl:apply-templates
select="allocation_change">
						<xsl:sort
select="*[name()=$selectField]" order="descending"/>
					</xsl:apply-templates>
                    		</xsl:when>
                                 	<xsl:otherwise/>
                 		</xsl:choose>
			</table>
			</p>
		</body>
	</html>
</xsl:template>

<xsl:template match="allocation_change">
   <tr>
		<td CLASS="text">
			<xsl:value-of
select="reference_number"></xsl:value-of>
		</td>

		<td CLASS="text" bgcolor="FDE6B5">

			<xsl:value-of
select="transaction_id"></xsl:value-of>
		<td>

   </tr>
</xsl:template>

</xsl:stylesheet>


Yacine Belala
Sr. Technical Consultant

Phone: 412.201.6011
Fax: 412.201.6088
Toll Free: 1.888.790.1744
ybelala@xxxxxxxxxxxx <mailto:ybelala@xxxxxxxxxxxx>

Access Data
Two Chatham Center, 2nd Floor
Pittsburgh, PA 15219
www.accessdc.com <http://www.accessdc.com/>





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread