Bug 120644 - [testcase] Alternate attribute is ignored in stylesheet declarations in XML
Summary: [testcase] Alternate attribute is ignored in stylesheet declarations in XML
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml xml (show other bugs)
Version: 3.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-23 10:28 UTC by Samuel Hym
Modified: 2012-06-18 14:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (xml file) (201 bytes, text/xml)
2006-01-23 10:31 UTC, Samuel Hym
Details
First stylesheet (70 bytes, text/css)
2006-01-23 10:32 UTC, Samuel Hym
Details
Second stylesheet (69 bytes, text/css)
2006-01-23 10:33 UTC, Samuel Hym
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Hym 2006-01-23 10:28:49 UTC
Version:           3.5 (using KDE 3.5.0, Debian Package 4:3.5.0-3 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.14-1-686

konqueror ignores the alternate attribute for stylesheets in XML. For instance the following lines in a xml header:

    <?xml-stylesheet title="1" href="s1.css" type="text/css"?>
    <?xml-stylesheet alternate="yes" title="2" href="s2.css" type="text/css"?>

entails that 2 stylesheets are available, the first one being the default, the second one being alternate. So konqueror should propose to choose between them in its stylesheet menu. But it simply concatenates the two stylesheets into one and apply everything at once.

By the way, if the second stylesheet is absent, the document is not rendered at all.
Comment 1 Samuel Hym 2006-01-23 10:31:56 UTC
Created attachment 14352 [details]
Test case (xml file)

Really simple xml to show the problem
Comment 2 Samuel Hym 2006-01-23 10:32:39 UTC
Created attachment 14353 [details]
First stylesheet
Comment 3 Samuel Hym 2006-01-23 10:33:07 UTC
Created attachment 14354 [details]
Second stylesheet
Comment 4 Siegfried Gipp 2006-05-19 18:17:44 UTC
This may be similar and/or related: Konqueror does ignore the "alternate" keyword in (x)html stylesheet declarations. Test page: http://www.rorkvell.de/news/RorkvellNews.html. 
Header excerpt:
<link type="text/css" rel="stylesheet" href="../style/Basic.css">
<link type="text/css" rel="alternate stylesheet" href="../style/Basic/Basic.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/Erz/Erz.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/Eis/Eis.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/Feuer/Feuer.css">
<link type="text/css" rel="stylesheet" media="screen" href="../style/Humus/Humus.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/Luft/Luft.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/Wasser/Wasser.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/System/System.css">
<link type="text/css" rel="alternate stylesheet" media="screen" href="../style/tech/Tech.css">
<link type="text/css" rel="stylesheet" href="../style/special.css">

<link type="text/css" rel="stylesheet" media="print" href="../style/Print.css">
These are many, i know. Konqueror simply mixes randomly the styles for the different parts of the web page so nothing fits together. Best for now would be to simply ignore any "alternate stylesheet". 
Comment 5 Siegfried Gipp 2006-05-19 21:10:49 UTC
I just verified this with Safari by using http://www.browsershots.org/
Comment 6 Philip Rodrigues 2006-09-23 16:17:22 UTC
Confirmed on r582187
Comment 7 Christophe Marin 2008-04-06 18:00:10 UTC
Confirmed in trunk (kdelibs rev 793966).


Side note : there's no way in Konqueror to select the stylesheet to use.
Comment 8 Myriam Schweingruber 2012-06-18 14:14:17 UTC
Message from the Bugsquad and Konqueror teams:
This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore.
If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report.
Thank you for your understanding.