On 20 abr, 10:27, bej78729 <[EMAIL PROTECTED]> wrote:
> I am trying to implement a mixed xhtml and svg document.
>
> The layout starts with:
>
> <?php echo "<?xml version='1.0'?>"; ?>
>
> <html xmlns="http://www.w3.org/1999/xhtml";
>         xmlns:svg="http://www.w3.org/2000/svg";>
>
> I can get a static page like this to render properly using a .xhtml
> file ending. Apache sends the document as Content-Type: application/
> xhtml+xml and Mozilla renders the svg.
>
> One thought is to use mod_rewrite to change the Content-Type:
>
> I'm relatively new to mod_rewrite and the hack of .htaccess bedlow
> doesn't seem to work.
>
> <IfModule mod_rewrite.c>
>     RewriteEngine on
>     RewriteRule    (.*) - [T=application/xhtml+xml]
>     RewriteRule    ^$    webroot/    [L]
>     RewriteRule    (.*) webroot/$1 [L]
>  </IfModule>
>
> The other issue is that this would change the Type of all my output -
> not just the ones with the mixed namespaces.
>
> Furthermore, I believe that IE chokes on application/xhtml+xml.
> Require conditional browser sniffing statements.
>
> Any thoughts?
>
> Thanks,
> Brian

I recently switched my blog to be application xhtml. I have no idea
why you would want to put that in your htaccess file though, as it
rather depends on what you are going to send back.

A couple of thoughts/recommendations:

1) Use the RequestHandler. If the requesting agent can't accept xhtml
there's no point serving it as such (ref 
http://www.noswad.me.uk/MiBlog/XhtmlValidity)
2) IE will use quirks mode if you include <?xml version.... in your
layout, so it's necessary to use something like
http://techpatterns.com/downloads/php_browser_detection.php, sniff for
IE, sniff mutely if it is IE, and then not include the xml declaration
if you don't want IE to F*ck up your layout by using it's broken
instead of pseudo-compliant box model.

hth,

AD



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to