Closed Bug 253676 Opened 20 years ago Closed 20 years ago

xml-stylesheet '#' href behavior in xhtml

Categories

(Core :: CSS Parsing and Computation, defect)

1.7 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 61675

People

(Reporter: jashugan, Assigned: dbaron)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1

I have discovered an odd behavior in firefox when handling xhtml pages.

I have found how to reproduce it:
You need:
A "Content-Type: application/xhtml+xml"
A source page like the w3c exemple in http://www.w3.org/TR/xhtml1/#C_14:

<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>An internal stylesheet example</title>
<style type="text/css" id="internalStyle">
code {
color: green;
font-family: monospace;
font-weight: bold;
}
</style>
</head>
<body>
<p>
This is text that uses our
internal stylesheet.
</p>

</body>
</html>

You add in the begining of the source page a :
<?xml version="1.0" encoding="UTF-8"?>
like encouraged by the w3c in http://www.w3.org/TR/xhtml1/#strict

It gives you the page:
http://arche.dyndns.org/~jashugan/exemple/bug.xhtml

Nothing append when you get the page ?
That's the point, firefox don't show any errors, but if you check, you will see
firefox make 2 HTTP GET command for the same page (bug.xhtml) which is obviously
not normal.
The page must not be in the cache.

It is a problem with the # in <?xml-stylesheet>.

I can't reproduce this bug in win32 plateform, or in with mozilla 1.7 (linux or
win32).
It seems to be specific to firefox 0.9.1 in linux plateform (not tested in mac os)

Reproducible: Always
Steps to Reproduce:
1.get the page at http://arche.dyndns.org/~jashugan/exemple/bug.xhtml in firefox
9.1 linux
2.
3.

Actual Results:  
firefox do 2 GET commands

Expected Results:  
the '#' href in xml-stylesheet points to the actual document, firefox should not
reload it.
Assignee: firefox → dbaron
Component: General → Style System (CSS)
Product: Firefox → Browser
QA Contact: firefox.general → ian
Version: unspecified → 1.7 Branch
Whiteboard: DUPEME
Mozilla 1.8a2 linux makes 1 HTTP GET
Firefox trunk 20040706 linux makes 2

So this difference is also available for the trunk
This is invalid.  You're saying to load the same page as a stylesheet (which
means it's going to be a different content-type, and needs to be refetched from
the server).

The text in the XHTML spec here is, frankly, completely bogus.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
I did not invent this code, i just copy paste from the w3c site specs ...
So what do you mean? you are sugesting that the specs are invalid from the start ?
This is actually "bad" defined in another specification[1], but like I hinted
before this is a duplicate.

[1]<http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/>
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 61675 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.