Closed
Bug 506518
Opened 16 years ago
Closed 16 years ago
Strict XHTML 1.0 generated with XSLT and xsl:output does not work
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: wyvernoid, Unassigned)
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
I used xsl:output to set the output method as xml, doctype as xhtml 1.0 strict. And then directly opening the xml file didn't give a good html page; however, if I use a xslt processor to parse the xml file into a html file first and then open the html file, I get the good result. It's hard to describe so just look at the steps.
Reproducible: Always
Steps to Reproduce:
1.Create a file "a.xml" with the following content.
-------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="a.xsl"?>
<root>1</root>
-------------------------------------------------------
2.Create a file "a.xsl" with the following content.
-------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes" />
<xsl:template match="/root">
<html><head><title>2</title></head><body>3</body></html>
</xsl:template>
</xsl:stylesheet>
-------------------------------------------------------
3.Use an xslt processor (Saxon for example) to parse a.xml into a.html with a.xsl.
5.Open the a.html file with Firefox, the page that shows up contains
Actual Results:
Open a.xml with Firefox, the page that shows up contains the string "23" and no title.
Open a.html with Firefox, the page that shows up contains the string "3" and has the title "2".
Expected Results:
Open a.xml with Firefox, the page that shows up contains the string "3" and has the title "2".
Open a.html with Firefox, the exact thing should appear.
| Reporter | ||
Comment 1•16 years ago
|
||
| Reporter | ||
Comment 2•16 years ago
|
||
| Reporter | ||
Comment 3•16 years ago
|
||
Comment 4•16 years ago
|
||
If you add the proper namespace to the html element does that work any better?
<html xmlns=http://www.w3.org/1999/xhtml><head><title>2</title></head><body>3</body></html>
If so this bug is invalid as that is required.
Comment 5•16 years ago
|
||
oops, don't forget the quotes (") around the attribute name as I did.
| Reporter | ||
Comment 6•16 years ago
|
||
It generates a good webpage now, but for more complex webpages where Javascript is present, the document.body object is not found (bug 496407). I guess this bug can be closed though, sorry for the inconvenience.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•