Re: [WSG] usage of new entities in dtd's
Ah, yes. Gecko does the same thing once it's given xhtml. only it's a bit more picky. You have to use the xmlns="http://www.w3.org/1999/xhtml" if your going to get any styling action. Alan Trick Kornel Lesinski wrote: On Thu, 07 Apr 2005 19:41:16 +0100, Alan Trick [EMAIL PROTECTED] wrote: I'm just curious if any popular browser would display this page properly http://www.tarunz.org/~vassilii/html-is-an-sgml-dtd.html I though Moz would, but it disapointed me. Opera does, but only for XML (i.e. application/xhtml+xml). I've saved it as .xml, tided it to be well-formed and got: "Your browser (Opera/8.0 (Windows NT 5.1; U; en)) rules! Drop me a line..."
RE: [WSG] usage of new entities in dtd's
In both Mozilla and Opera, I found that what was crucial was that the server (Apache, in this instance) was configured to deliver the file as application/xhtml+xml (+ being well formed, of course). Merely setting this in the document head was not sufficient. Thus, tidying up the code and adding "AddType application/xhtml+xml .xhtml" to httpd.conf got everything running smoothly. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan TrickSent: 08 April 2005 15:07To: wsg@webstandardsgroup.orgSubject: Re: [WSG] usage of new entities in dtd's Ah, yes. Gecko does the same thing once it's given xhtml. only it's a bit more picky. You have to use the xmlns="http://www.w3.org/1999/xhtml" if your going to get any styling action.Alan TrickKornel Lesinski wrote: On Thu, 07 Apr 2005 19:41:16 +0100, Alan Trick [EMAIL PROTECTED] wrote: I'm just curious if any popular browser would display this page properly http://www.tarunz.org/~vassilii/html-is-an-sgml-dtd.html I though Moz would, but it disapointed me. Opera does, but only for XML (i.e. application/xhtml+xml). I've saved it as .xml, tided it to be well-formed and got: "Your browser (Opera/8.0 (Windows NT 5.1; U; en)) rules! Drop me a line..." DISCLAIMER: This e-mail is confidential and should not be used by anyone who is not the original intended recipient. If you have received this e-mail in error please inform the sender and delete it from your mailbox or any other storage mechanism. Neither Macmillan Publishers Limited nor any of its agents accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of Macmillan Publishers Limited or one of its agents. Please note that neither Macmillan Publishers Limited nor any of its agents accept any responsibility for viruses that may be contained in this e-mail or its attachments and it is your responsibility to scan the e-mail and attachments (if any). No contracts may be concluded on behalf of Macmillan Publishers Limited or its agents by means of e-mail communication. Macmillan Publishers Limited Registered in England and Wales with registered number 785998 Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
Re: [WSG] usage of new entities in dtd's
As far as I know, no User Agent (besides the W3C validator) repects the content-type header. It's a bit of a pain. Sans headers (like if your opening a local file) Firefox (and I'm gruessing the whole Gecko family) will treat a file as application/xhtml+xml if the extention is .xhtml, if it's .xml it will call it text/xml, but the rendering effect will be the same. With websites it's a bit tricky. The problem is that some of the legacy browsers (at least IE) go all funny when you send them application/xml+xtml. Ideally you can use something like PHP and check the "HTTP_ACCEPT" header like this. Otherwise IE tries to save your pages instead of view them. Alan Trick Townson, Chris wrote: In both Mozilla and Opera, I found that what was crucial was that the server (Apache, in this instance) was configured to deliver the file as application/xhtml+xml (+ being well formed, of course). Merely setting this in the document head was not sufficient. Thus, tidying up the code and adding "AddType application/xhtml+xml .xhtml" to httpd.conf got everything running smoothly.
Re: [WSG] usage of new entities in dtd's
Alan Trick wrote: Ideally you can use something like PHP and check the HTTP_ACCEPT the following came across a list (maybe this one) a while back ?php //Sends the correct MIME type depending on the browser //Created on 11th November 2004 //Amended on n/a //Version 0.1 $charset = iso-8859-1; $mime = text/html; if(stristr($_SERVER[HTTP_ACCEPT],application/xhtml+xml)) { # if there's a Q value for application/xhtml+xml then also # retrieve the Q value for text/html if(preg_match(/application\/xhtml\+xml;q=0(\.[1-9]+)/i, $_SERVER[HTTP_ACCEPT], $matches)) { $xhtml_q = $matches[1]; if(preg_match(/text\/html;q=0(\.[1-9]+)/i, $_SERVER[HTTP_ACCEPT], $matches)) { $html_q = $matches[1]; # if the Q value for XHTML is greater than or equal to that # for HTML then use the application/xhtml+xml mimetype if($xhtml_q = $html_q) { $mime = application/xhtml+xml; } } # if there was no Q value, then just use the # application/xhtml+xml mimetype } else { $mime = application/xhtml+xml; } } # special check for the W3C_Validator if (stristr($_SERVER[HTTP_USER_AGENT],W3C_Validator)) { $mime = application/xhtml+xml; } # set the prolog_type according to the mime type which was determined if($mime == application/xhtml+xml) { $prolog_type = ?xml version='1.0' encoding='$charset' ? !DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd' html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'; } else { $prolog_type = !DOCTYPE HTML PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd' html lang='en'; } # finally, output the mime type and prolog type header(Content-Type: $mime;charset=$charset); header(Vary: Accept); print $prolog_type; ? ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
[WSG] usage of new entities in dtd's
I'm just curious if any popular browser would display this page properly http://www.tarunz.org/~vassilii/html-is-an-sgml-dtd.html I though Moz would, but it disapointed me. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] usage of new entities in dtd's
Tom Livingston wrote: On Thu, 07 Apr 2005 14:41:16 -0400, Alan Trick [EMAIL PROTECTED] wrote: I'm just curious if any popular browser would display this page properly http://www.tarunz.org/~vassilii/html-is-an-sgml-dtd.html I though Moz would, but it disapointed me. ** Opera 7.54u2 Mac does. I think. What should I see? you should not see: |But; your; fine; browser; does; n0t; care;| or the |]| at the top ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] usage of new entities in dtd's
you should not see: |But; your; fine; browser; does; n0t; care;| or the |]| at the top Opera 7.54u2 screenie attached... oh well... -- Tom Livingston Senior Multimedia Artist Media Logic mlinc.com Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ Picture 1.pdf Description: Adobe PDF document
Re: [WSG] usage of new entities in dtd's
On Apr 7, 2005 8:41 PM, Alan Trick [EMAIL PROTECTED] wrote: I'm just curious if any popular browser would display this page properly http://www.tarunz.org/~vassilii/html-is-an-sgml-dtd.html I though Moz would, but it disapointed me. I thought it was common knowledge that no browser in common use (and by common use I include every browser that has ever been above 0.1% in usage statistics for the net) uses a true SGML engine. HTML as employed on the web requires a tagsoup parser, or the majority of all pages would experience problems. There are just too much error correction that needs to be done in the HTML engine to allow a browser to use a true SGML engine. Look for example on all XHTML sent as HTML. The element/ syntax has a different meaning in SGML. You can have a look at uri:http://liorean.net/sgml-goodness.html for an example of a perfectly valid HTML 4.01 Strict document that no browser in common use handles due to their lack of SGML parsing. -- David liorean Andersson uri:http://liorean.web-graphics.com/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **