Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Michael Shadle
hael Shadle wrote: From: Michael Shadle Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: "Raymond Irving" Cc: "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

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Raymond Irving
owser? __ Raymond Irving --- On Tue, 4/14/09, Michael Shadle wrote: From: Michael Shadle Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: "Raymond Irving" Cc: "php-general@lists.php.net" Date: Tuesday, April 14, 2009, 8:26 PM As michael said my

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Raymond Irving
Thanks for your feedback. __ Raymond Irving --- On Tue, 4/14/09, Michael A. Peters wrote: > From: Michael A. Peters > Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: "Raymond Irving" > Cc: php-general@lists.php.net > Date: Tuesday

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Michael Shadle
web application development? __ Raymond Irving --- On Tue, 4/14/09, Peter Ford wrote: From: Peter Ford 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: On Mon, Apr 13,

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Michael A. Peters
Raymond Irving 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

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Raymond Irving
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 wrote: > From: Peter Ford > Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: php-general@l

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Peter Ford
Michael Shadle wrote: > On Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters wrote: > >> The problem is that validating xhtml does not necessarily render properly in >> some browsers *cough*IE*cough* > > I've never had problems and my work is primarily around IE6 / our > corporate standards. Hell,

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
about the utf-8 issue with loadHTML()? __ Raymond Irving --- On Mon, 4/13/09, Michael A. Peters wrote: > From: Michael A. Peters > Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: "Michael Shadle" > Cc: "Raymond Irving" ,

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
For online examples checkout: http://raxanpdi.com/examples.html __ Raymond Irving --- On Mon, 4/13/09, Michael Shadle wrote: > From: Michael Shadle > Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: "Raymond Irving" > Cc: "php-genera

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters wrote: > The problem is that validating xhtml does not necessarily render properly in > some browsers *cough*IE*cough* I've never had problems and my work is primarily around IE6 / our corporate standards. Hell, even without a script type it sti

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
Peters Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: "Michael Shadle" Cc: "Raymond Irving" , "php- gene...@lists.php.net" Date: Monday, April 13, 2009, 5:36 AM Michael A. Peters wrote: function makeHTML($docum

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
. On Apr 13, 2009, at 8:01 AM, Raymond Irving wrote: Michael, You are absolutely right! It's loadHTML() that's causing the problems. Best regards, __ Raymond Irving --- On Mon, 4/13/09, Michael A. Peters wrote: From: Michael A. Peters Subject: Re: [PHP] Generate XHTML (HTML

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
Michael, You are absolutely right! It's loadHTML() that's causing the problems. Best regards, __ Raymond Irving --- On Mon, 4/13/09, Michael A. Peters wrote: > From: Michael A. Peters > Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument >

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: I wonder if the real utf8 problem people experience is really with loadHTML() and not with saveHTML() ?? Go to http://www.clfsrpm.net/xss/dom_script_test.php The page was meant to test something else but enter some UTF-8 into the textarea (well formed xhtml) -

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: function makeHTML($document) { $buffer = $document->saveHTML(); $output = html_entity_decode($buffer,ENT_QUOTES,"UTF-8"); return $output; } I'll try it and see what it does. Huh - not tried above yet - but with $test = $myxhtml->createElement('p','שלום'

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael Shadle wrote: On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: $html = preg_replace('/<\!\[CDATA\[(.*)\]\]><\/script>/s','//',$html); question - the output of this would be right? is the cdata truly necessary? I typically use XHTML 1.0 transit

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: >    $html = > preg_replace('/<\!\[CDATA\[(.*)\]\]><\/script>/s','//',$html); question - the output of this would be right? is the cdata truly necessary? I typically use XHTML 1.0 transitional and I don't have

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael A. Peters
Raymond Irving wrote: Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom) { $html = $dom->saveXML(null,LIBXML_NOEMPTYTAG);

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
It appears that the email system stripped out the "& #13;" from this line: $html = str_replace(' ','',$html); Best regards, __ Raymond Irving --- On Sun, 4/12/09, Raymond Irving wrote: > From: Raymond Irving > Subject: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: "ph

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
Hi Michael, --- On Sun, 4/12/09, Michael Shadle wrote: > If this will maintain utf-8 I might be able to use it :) > which > according to the last thread, saveHTML munges utf-8 stuff > due to > libxml... > > Hopefully this week I can give it a go. I think it should work just fine as saveXML pro

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: > > Hello, > > After talking with Michael about how to generate XHTML code using the DOM I > came up with this little function that I'm thinking of using to generate > XHTML code that's HTML compatible: > > function saveXHTML($dom) { >    $h