Browsers

1. Browser handling of XSLT
2. XSLT client side, supporting multiple browsers.
3.

1.

Browser handling of XSLT

Dimitre Novatchev

Warning: Dated May 2005.

at present IE 6 uses MSXML 3, Firefox/Netscape uses TransforMiiX, which even does not have support for the xxx:node-set() extension function. Safari supports XSLT 1.0 via libxslt.

All this is XSLT 1.0.

So, in short, no known browser today has support for XSLT 2.0 (and this is logically due to the fact that there isn't any XSLT 2.0 W3 recommendation yet).

and also include this link: w3cSchools

which hopefully will be kept up-to-date in the future.

Probably, it would be a good idea to specify the varying degree to which each of these platforms has some support for EXSLT.

2.

XSLT client side, supporting multiple browsers.

Chris Bayes.

I finally got netscape 6.1 to display something using a stylesheet but I noticed that no matter in what order I put the processing instructions it always used the last one in the list. I already knew that ie4/5/5.5 always uses the first one in the list so I put the old TR-WD stylesheet first

<?xml-stylesheet type="text/xsl" href="MS-TR-WD.xsl" ?>

The alternate="yes/no" is ignored by ie4/5/5.5 but ie6 reads the alternate attribute and if it is set to no then it will use that one.

Ie6 will always have the new version of the parser. So I always put that second

<?xml-stylesheet type="text/xsl" href="MS-TR-WD.xsl" ?>
<?xml-stylesheet type="text/xsl" href="MS-XSL-Transform.xsl"
alternate="no"?>

So one way or another just having 2 Pis keeps all of the ie's happy.

As netscape always uses the last one and ignores the alternate attribute I can put the netscape stylesheet last

<?xml-stylesheet type="text/xsl" href="MS-TR-WD.xsl" ?>
<?xml-stylesheet type="text/xsl" href="MS-XSL-Transform.xsl"
alternate="no"?>
<?xml-stylesheet type="text/xsl" href="NS-XSL-Transform.xsl"?>

So this doc

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="MS-TR-WD.xsl" ?>
<?xml-stylesheet type="text/xsl" href="MS-XSL-Transform.xsl"
alternate="no"?>
<?xml-stylesheet type="text/xsl" href="NS-XSL-Transform.xsl"?>

And these stylesheets

-------MS-TR-WD.xsl-------

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:output method = "html" />
<xsl:template match="/">
<html>
<head></head>
<body>
<p>This will display in ie/4/5/5.5
without msxml2 in replace mode</p>
<p>some normal html</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

-------MS-XSL-Transform.xsl-------

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "html" />
<xsl:template match="/">
 <html>
  <head></head>
  <body>
   <p>This will display in ie/4/5/5.5 with msxml2 in replace mode</p>
   <p>This will display in ie6+ andnetscape 6.1+ but will be chosen 
      by ie6 to display the above xml.</p>
    <p>some normal html</p>
  </body>
 </html>
 </xsl:template>
</xsl:stylesheet>

-------MS-XSL-Transform.xsl-------

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "html" />
<xsl:template match="/">
 <html>
   <head></head>
   <body>
     <p>This will display in ie6+ and netscape 6.1+ but will be chosen 
      by netscape to display the above xml.</p>
     <p>some quirky html that only netscape understands</p>
   </body>
 </html>
</xsl:template>
</xsl:stylesheet>

Will display something in all new browsers. Netscape 4.7 isn't really a new browser so that is still at a loss.

I realised why I have not been able to get netscape to display anything so far. It spits the dummy if you have a doctype in the xml and most of the stuff I want to use it for has a doctype so it never worked.

3.