Closed
Bug 239787
Opened 22 years ago
Closed 22 years ago
XSLT transformation loses some CSS properties (width, height)
Categories
(Core :: XSLT, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: fperrad, Assigned: peterv)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
With the following example 'input.xml', the CSS property 'background-color' is OK,
but the CSS property 'width' is lost.
// input.xml
<?xml-stylesheet href="input.xsl" type="text/xsl" ?>
<input/>
// input.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="input">
<html>
<head>
<style type="text/css">
input { background-color : yellow; width : 100; }
</style>
</head>
<body>
<input type="button" value="test"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And if the transformation is done externaly by the command :
xsltproc input.xml > input.html
Both CSS properties are OK.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1•22 years ago
|
||
The CSS requires a unit for lengths (unless it's 0).
That this works in *some* HTML is because quirks mode has a fixup. Try your
result with the doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
and you'll see width not getting applied as well.
<style type="text/css">
input { background-color : yellow; width : 100px; }
</style>
in the stylesheet fixes it allright.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Just to clairify what's happening here: XSLT pages are always rendered in strict
mode (as opposed to quirks mode). This means that we'll be more strict with
following standards.
Quirks mode is designed for old pages when the author didn't care about
standards, or where the standards simply didn't exist when the page was written.
This is obviously not the case with pages using XSLT.
You need to log in
before you can comment on or make changes to this bug.
Description
•