How to change MIME type to application/xhtml+xml ?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
erlehmann
Regular
Posts: 12
Joined: Mon Jun 23, 2008 7:17 am

Re: How to change MIME type to application/xhtml+xml ?

Post by erlehmann »

To start, all your tips didn't help: The MIME type in the HTTP header still seems to be text/html. Maybe it's not a template issue and S9Y doesn't get the MIME type from the meta tag at all ?

Then:
garvinhicking wrote: Current templates focus on usability and compatibility instead of pedantic semantics ;)
Well, while I understand that somehow, I just wanted to let you know why i regard this as a very bad idea. Just look at this: Many major blogs in Germany allow (X)HTML in comments and yet, no user complained - those who can't do XHTML simply don't use it and post text without any markup.
No one expects this of you!
Yeah, but will any one else do if I don't ?
To me personally, the matter is not interesting yet because of the choking browser behavior on non-validating XHTML documents.
They will do that forever, is that clear to you ? The spec only allows a DOM tree only to be generated from well-formed documents.
I'm all for "ultra liberal HTML parsing". ;)
Sadly, this more than often violates the robustness principle - XML does, too, but with XML it is clear how to interpret the data.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to change MIME type to application/xhtml+xml ?

Post by garvinhicking »

Hi!
erlehmann wrote:To start, all your tips didn't help: The MIME type in the HTTP header still seems to be text/html. Maybe it's not a template issue and S9Y doesn't get the MIME type from the meta tag at all ?
What exactly did you try? How does your templates config.inc.php look like in that line?

S9y emits the content-type HTTP header in index.php, BEFORE the template's config.inc.php is called. So it should be able to supersed the HTTP header later on. The only way this would not work is if your Webserver is configured to not allow Content-Type changes because it fixes the mime-type.
Yeah, but will any one else do if I don't ?
That depends on if someone else also dislikes this behaviour.
They will do that forever, is that clear to you ? The spec only allows a DOM tree only to be generated from well-formed documents.
Ein Teufelskreis. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
erlehmann
Regular
Posts: 12
Joined: Mon Jun 23, 2008 7:17 am

Re: How to change MIME type to application/xhtml+xml ?

Post by erlehmann »

garvinhicking wrote:How does your templates config.inc.php look like in that line?
Ooops, my bad. Works flawlessly.

Though i have a new problem now: The admin interface page has no xmlns attribute, so the site is not displayed and I get an XML tree instead (which is, i can assure you, well-formed). Is that a template or core issue ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to change MIME type to application/xhtml+xml ?

Post by garvinhicking »

Hi!

The admin page can also be styled through templates/XXX/admin/index.tpl template files, so you should be able to add xmlns's inside there? Have a try if this works, else I'll see where inside the core it could be.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply