Re: Generate XHTML (HTML compatible) Code using DOMDocument
| From: | Michael Shadle | Date: | Thu, 16 Apr 2009 03:21:45 +0000 |
| Subject: | Re: Generate XHTML (HTML compatible) Code using DOMDocument | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291547@lists.php.net to get a copy of this message | ||
I use XHTML 1.0 transitional and I've yet to have anyone tell me my sites don't work. Mobile and desktop browsers too. So I'm not sure that's an issue at all (?)
On Apr 15, 2009, at 6:31 PM, Raymond Irving <xwisdom@yahoo.com> wrote:
Thanks for the feedback. I too like xhtml but I think I like the option of serving both. My only concern is that a proxy server might cache an xhtml page and then serve it to a non-xhtml browser. Do you think it's possible that a proxy might serve the xhtml source to the wrong browser? __ Raymond Irving --- On Tue, 4/14/09, Michael Shadle <mike503@gmail.com> wrote: From: Michael Shadle <mike503@gmail.com> Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: "Raymond Irving" <xwisdom@yahoo.com> Cc: "php-general@lists.php.net" <php-general@lists.php.net> Date: Tuesday, April 14, 2009, 8:26 PM As michael said my main reason is strictness. It's much easier to parse a document when an XML parser can read it. I like the idea of closing tags etc. On Apr 14, 2009, at 4:38 PM, Raymond Irving <xwisdom@yahoo.com> wrote:Hi, I'm thinking about using the html5 doctype for all html documents since it's supported by all the popular browsers available today. Two Quick questions... Why do we need to send XHTML code to a web browser when standard html code (with html 5 doctype) will do just fine? Is there any advantage of using xhtml in the web browser over html for normal web application development? __ Raymond Irving --- On Tue, 4/14/09, Peter Ford <pete@justcroft.com> wrote:From: Peter Ford <pete@justcroft.com> Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: php-general@lists.php.net Date: Tuesday, April 14, 2009, 5:05 AM Michael Shadle wrote:-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpOn Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters<mpeters@mac.com> wrote:necessarily render properly inThe problem is that validating xhtml does notaround IE6 / oursome browsers *cough*IE*cough*I've never had problems and my work is primarilycorporate standards. Hell, even without a script typeit still works:)solve the utf8 problem?Would this function work for sending html and$document->saveHTML();function makeHTML($document) {$buffer =html_entity_decode($buffer,ENT_QUOTES,"UTF-8");$output =moment, and I was athis was the only workaround I received for thereturn $output; }I'll try it and see what it does.bit afraid it would not process the full range ofutf-8; it appearedon a quick check to work but I wanted to run it on ourentire databaseand then ask the native geo folks to examine it forcorrectness. I find that IE7 (at least) is pretty reliable as long as I use strict XHTML and send a DOCTYPE header to that effect at the top - that seems to trigger a standard-compliant mode in IE7. At least then I only have to worry about the JavaScript incompatibilities, and the table model, and the event model, and .... --Peter Ford phone: 01580 893333 Developerfax: 01580 893399Justcroft International Ltd., Staplehurst, Kent --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php