Closed
Bug 341265
Opened 20 years ago
Closed 20 years ago
Changing DOCTYPE from HTML 4.x to XHTML 1.x in example - renders text w/o HTML formatting
Categories
(Core :: XSLT, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: Rob.Simpson, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
After complaints that our web pages aren't working in Firefox, I found the example page at http://www.mozilla.org/projects/xslt/. The link to the "simple example" works fine, but if I edit the "test.xsl" file and change the DOCTYPE in the "output" from HTML 4.x (<xsl:output method="html"/>) to XHTML 1.x Transitional (<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>), Firefox renders only the transformed text, without any HTML formatting.
Reproducible: Always
Steps to Reproduce:
1. download http://www.mozilla.org/projects/xslt/test.xml and http://www.mozilla.org/projects/xslt/test.xsl
2. edit test.xsl - change the "output" statement to: <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
3. open test.xml in Firefox
Updated•20 years ago
|
Assignee: nobody → xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → Trunk
When using xml output you have to make sure to output proper XHTML, that includes giving it the proper XHTML namespace. If you place an xmlns="http://www.w3.org/1999/xhtml" attribute on the xsl:stylesheet element things should work fine.
However, i would strongly adivce against using XHTML unless you are very familiar with the differences between XHTML and HTML (such as the body fixup rule).
Especially since IE is going to interpret everything as HTML, so you'll have to live with firefox using XHTML and IE using HTML.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•