Re: display of xml in firefox

Jim Patterson <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Bell Sympatico
Message-ID <[email protected]>
Andy Ford wrote:
> Anyone subscribed to this group have any knowledge of this..
> I am trying to get the following simple xml/xsl stuff to format
> correctly. It doen't in the linux version of firefox 1.0_pre-r2 but does
> (according to my colleague) format correctly in I.E
> 

> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:template match="root">
> <table border="1">
...

Getting the mime type right will help, but you'll also want to include 
this before your first template:

<xsl:output method="html"/>

The XML processor is supposed to guess what the output should be if 
there isn't an output method specified, but that guess is based on what 
the root element is, specifically whether it's "html" or not, and your 
document doesn't do that. So, it appears to me that Firefox does the 
right thing by displaying it as XML here.  (Check out the spec at 
http://www.w3.org/TR/xslt#section-HTML-Output-Method if you want the 
nitty gritty details).

-- 
Jim Patterson
Ottawa, Ont
CANADA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.