Re: [xsl] Netscape changes font-size in table

Subject: Re: [xsl] Netscape changes font-size in table
From: mark.clare@xxxxxxxxxxxx
Date: Mon, 26 Nov 2001 16:50:13 +0000
You tried this in Netscape 6.1 - however font sizes do not work correctly
in earlier versions of Netscape (e.g. version 4.7 which we are having to

"Thomas B. Passin" <tpassin@xxxxxxxxxxxx> on
26/11/2001 09:58:12

Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Sent by:  owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx

To:   <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  Re: [xsl] Netscape changes font-size in table

I tried your template, using a little xml file  and stylesheet I made up
around your template.  It displays correctly in both IE, Netscape 6.1,  and
Mozilla 0.9.6.  Either you are doing something odd in your stylesheet or
there's something you haven't mentioned about what you are doing.

Have you looked at the HTML produced to see if it is what you expected?

As an aside, I'd suggest applying a class to the td element rather than
using an in-line style everywhere.

Here's my test xml file:

<?xml-stylesheet type="text/xsl" href="test.xsl"?>

Here's the stylesheet:

<xsl:stylesheet version="1.0"
 <xsl:output method = "html" encoding="Windows-1252" />

 <xsl:template match="/root">
     <xsl:apply-templates select='cell'/>

 <xsl:template match='cell'>
  <xsl:element name='td'>
   <xsl:call-template name='ApplyStyle'/>
    <xsl:value-of select='.'/>

<xsl:template name="ApplyStyle">
    <xsl:attribute name="STYLE">
     font-size: 21px;
     color: black;</xsl:attribute>



Tom P

[Katie McNally]

My XSL stylesheet's main template calls the template below to set the style
of the data displayed in the page's table.  After each <td> tag in the
table, the line <xsl:call-template name="ApplyStyle"/> calls the template

<xsl:template name="ApplyStyle">
    <xsl:attribute name="STYLE">
        font-family: Verdana;
        font-size: 11px;
        color: black;

When displayed in IE, the font is all the same size for all words shown in
the table.  When displayed in the Netscape browser, however, the font-size
changes with the size of the word.  For example, for the column displaying
"Status", the size of the font for the status "New" is much larger than the
font for the status "Approved" in the same column.  The font of all the
values displayed in the "Rate" column is much smaller than the font for the
words displayed in all of the other columns (which have titles that are
longer than the word "Rate").

Any suggestions on how to set the style/font-size in the stylesheet so that
the table can be displayed correctly in both IE and Netscape?

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread