Jump to content

XSL won't work in firefox


Snatch

Recommended Posts

Hi i'm using the following XSL to display an XML page:

 

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" encoding="ISO-8859-1" 
     version="1.0" omit-xml-declaration="yes" 
     media-type="text/html" indent="yes" />


  <xsl:template match="/">

  <html>
  <head>
   <title>Shaw News</title>
   <meta http-equiv="content-type" 
     content="text/html; charset=iso-8859-1" />
    <style type="text/css">
   body {background-image: url(images/main-bg.gif); }
   </style>
  </head>
  <body>
  <p>
  <a href="index.php">Home</a>
  </p>

<xsl:for-each select="catagory/news [importance='High']">

      <p>
      <xsl:value-of select="@id" /><br />
      Title:
  <xsl:value-of select="title" /><br />
  Author:
      <i><xsl:value-of select="author/firstname"/>:<xsl:value-of select="author/lastname"/></i><br />
  Story:	
      <xsl:value-of select="content"/>
      
  </p>


    </xsl:for-each>


  </body>
  </html>
  


  </xsl:template>


</xsl:stylesheet>

 

It works fine in IE but not in FireFox (displays as one long string). Can anyone tell me why this is please?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.