Re: XSLT in Mozilla
Jonas Sicking <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
[email protected] wrote: > I can get simple text to output onto the html form, but I seem to have > trouble with the apply-templates in mozilla... Here's a reduced xsl > file > > <?xml version="1.0" encoding="utf-8" ?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0" > xmlns="http://www.w3.org/1999/xhtml/"> > <xsl:output > method="html"> You are mixing xhtml and html here. You claim that your output is going to be html and then (try to) output all content in the xhtml namespace. Mixing html and xhtml is a very bad idea and while it can work in some cases it is not supported and will break in many other. On top of this you are using the wrong namespace for xhtml. The namespace for xhtml is "http://www.w3.org/1999/xhtml" (note no slash at the end). Fixing this will most likely fix most of your problems. However, I would recommend against using xhtml unless you have a lot of experience with it. First of all I assume that you are going to insert the result document into a html document. This would mix xhtml and html which, again, is a very bad idea. Second, since IE doesn't support xml output from xslt it will ignore the xmlns attribute and just output pure html (this is why the wrong namespace isn't a problem in IE). So you would have to deal with using html in IE and xhtml in mozilla. So just remove the xmlns attribute and all should be well and easier. / Sicking