Menu
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<?xml-stylesheet type=”text/xsl” href=”copy.xsl”?>
<?xml version=”1.0″ encoding=”UTF-8″?>
What the heck are these? I’ve seen them mentioned in XHTML tutorials, and I’m wondering what they do and if I should use them in my XHTML site.
[i]Originally posted by Charles [/i]
[B]And if you are asking this question then you don't really know what you are doing.
Do not use XHTML. [/B][/QUOTE]
[i]Originally posted by Fang [/i]Having IE in quirks is a good thing. It means that for all intents and purposes, IE5 and IE6 can be treated the same, so rather than writing styles for IE5, IE6 and the standards browsers, you only have to write styles for IE5/6 and the standards browsers.
[B]Do not use the XML declaration (<?xml version="1.0" ....) as it will put IE into "quirks mode".[/B][/QUOTE]
[B]lavalamp[/B] wrote:
you only have to write styles for IE5/6 and the standards browsers[/QUOTE]
[i]Originally posted by Fang [/i]I used to think like that, and if I recall correctly, I was able to create
[B]one style sheet no hacks![/B][/QUOTE]
[i]Originally posted by Robert Wellock [/i]Who suggested that? ?
[B]It amuses me to some extent suggesting XHTML Strict 1.0, I assume not served as text/html because that kind of defeats the objectives.[/B][/QUOTE]
[i]Originally posted by Robert Wellock [/i]
[B]It amuses me to some extent suggesting XHTML Strict 1.0, I assume not served as text/html because that kind of defeats the objectives. [/B]
[/QUOTE]
[i]Originally posted by lavalamp [/i]
[B]You've gone and confused me now. [/B][/QUOTE]
<?php
if(stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) {
header("content-type: application/xhtml+xml");
}
else {
header("content-type: text/html");
}
?>
[i]Originally posted by Fang [/i]
[B]xhtml is xml, when done properly.
[B]Robert Wellock[/B] was refering to serving it as application/xhtml+xml which means adding:
<?php
if(stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) {
header("content-type: application/xhtml+xml");
}
else {
header("content-type: text/html");
}
?>
for browsers that understand xml [/B][/QUOTE]
[URL=http://www.w3.org/International/articles/serving-xhtml/]from the W3C[/URL]
XHTML 1.0 can also be served as XML, and XHTML 1.1 is always served as XML. To serve XHTML as XML you use one of the MIME types application/xhtml+xml, application/xml or text/xml. The W3C recommends that you serve XHTML as XML using only the first of these MIME types - ie. application/xhtml+xml.[/QUOTE]
[i]Originally posted by jbot [/i]That's not why I was confused...
[B]isn't XHTML meant to be a hybrid XML and HTML. so, the page get's served as XHTML.[/B][/QUOTE]
[i]Originally posted by Robert Wellock [/i]
[B]
In fact it's one big mockery that M$ Explorer doesn't really understand HTML 4.01 Strict either so it's a no win situation... that's what amused me so deeply. [/B][/QUOTE]
[i]Originally posted by Mr Herer [/i]
[B]The damned thing doesn't even understand doctypes, so how the hell it's gonna understand any versions of html I don't know. God I hope IE fades into obscurity fast. [/B][/QUOTE]
0.1.9 — BETA 6.2