Closed
Bug 275745
Opened 20 years ago
Closed 20 years ago
Use of xsl:output with method="xml" rendered as plain text
Categories
(Core :: XSLT, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla, Assigned: peterv)
References
()
Details
Note: I wasn't sure which category to file this in, as I'm using FireFox and not SeaMonkey, and Firefox doesn't have a XSLT category...anyway... If I specifiy the xsl:output tag in my stylesheet with method="html" all is well aside from the fact that mozilla renders in html mode. I am using xhtml and would like to use that rendering mode, but if I specify method="xml" then the output I get is plain text. Ideally I would like to be using something like: <xsl:output method="xml" encoding="iso-8859-1" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> ...but alas, this isn't going to be possible whilst this bug lives. As a side note, renders fine in IE6...though going from my experiments tonight thats more due to blissful ignorance than anything else. I've posted testcases here, they're identical aside from the xsl:ouput elements: http://random.jamie-thompson.co.uk/wibble.xml (method="xml") http://random.jamie-thompson.co.uk/wibble2.xml (method="html")
Comment 1•20 years ago
|
||
Seamonkey doesn't have an XSLT component anymore either: Core, which we share, does.
Assignee: firefox → peterv
Component: General → XSLT
Product: Firefox → Core
QA Contact: firefox.general → keith
Version: 1.0 Branch → 1.7 Branch
First off, i'd recommend that you use method="html" rather then method="xml" if your creating a cross-browser xslt stylesheet. The reason is that IE doesn't support xhtml (or indeed method="xml") so you'll end up with html there wheather you like it or not. If you still want to use xhtml in mozilla you need to create the new elements in the right namespace, otherwise we won't recognize it as xhtml. Add the following attribute to the xsl:stylesheet element: xmlns="http://www.w3.org/1999/xhtml"
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > First off, i'd recommend that you use method="html" rather then method="xml" if > your creating a cross-browser xslt stylesheet. The reason is that IE doesn't > support xhtml (or indeed method="xml") so you'll end up with html there wheather > you like it or not. > > If you still want to use xhtml in mozilla you need to create the new elements in > the right namespace, otherwise we won't recognize it as xhtml. Add the following > attribute to the xsl:stylesheet element: > > xmlns="http://www.w3.org/1999/xhtml" My apoligies. In all the references I used, none mentioned the modification of the stylesheet element, and it never would have occurred to me to have two namespace attributes in it, as I was under the assumption that the stylesheet required the xsl namespace as that's what it was. The IE issue isn't, it renders appropriately, but I aim for standards compliance, then add workarounds for bad/old implementations, I find that it's better maitenence-wise in the long run. Again, cheers for your help, and sorry for wasting your time.
IE renders it as html, not xhtml. The differences in rendering are very small though, but they are there. Also the DOM of html and xhtml have quite a few differences. Basically you are bound to run into these differences sooner or later. xhtml is no more "standards complience" then html is. The choise is yours of course.
You need to log in
before you can comment on or make changes to this bug.
Description
•