Re: [WSG] Will HTML be nicer to PHP than XHTML?

2005-07-04 Thread Chris Gandolfo
The language is only as sloppy as the person writing it.
Back to the question, in my personal projects I have been running the
Smarty PHP template engine with xhtml 1.0 strict formatted templates
and content without any problems. At work we run a much more dynamic
version of the engine with html templates, xml content and navigation
files pulled into those templates. Still no problems, all we have to
make sure of is that we escape the necessary characters when
appropiate in our templates.

Note- This is not meant to start a discussion/arguement on the use of
this particular php engine (class), but rather to illustrate a
variation of PHP's use with both xhtml and html.

On 7/3/05, Paul Bennett [EMAIL PROTECTED] wrote:
 
 Subject: Re: [WSG] Will HTML be nicer to PHP than XHTML?
 
 Personally, I believe this is one of the strong argumens for XHTML. PHP is 
 very sloppy, and when you combine that with another sloppy language, HTML, 
 the mess is tremendos. For small projects and new people it's not much of 
 an issue, but try to maintain a large codebase without it being incredibly 
 buggy.
 
 Using XHTML forces you towards good practices, something that is good to do 
 from the begining before you develop those bad habits. I don't know who was
 objecting to using XHTML, but IMHO it will interfere with you learning of 
 PHP less than HTML because it will force you to know what your doing, which 
 is the point of learning.
 
 In PHP's defence, stupid sloppy code can be written in ANY language. (Don't 
 believe me? Head over to http://www.thedailywtf.com and see some real-world 
 examples.)
 
 PHP's lack of pickiness (compared to Java for example) is what has allowed it 
 to be accessible to so many people, without requiring the very steep learning 
 curve some other languages require. Good developers  write good code. Period.
 
 let me repeat again. THERE IS NO LINK BETWEEN BAD HTML AND PHP.
 
 This thread needs to die.
 
 
 


-- 
Chris Gandolfo
{Designer  Standards Advocate}
Twelve Horses
**
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] Will HTML be nicer to PHP than XHTML?

2005-07-03 Thread Paul Bennett
 
Subject: Re: [WSG] Will HTML be nicer to PHP than XHTML?

Personally, I believe this is one of the strong argumens for XHTML. PHP is 
very sloppy, and when you combine that with another sloppy language, HTML, the 
mess is tremendos. For small projects and new people it's not much of an 
issue, but try to maintain a large codebase without it being incredibly buggy.

Using XHTML forces you towards good practices, something that is good to do 
from the begining before you develop those bad habits. I don't know who was 
objecting to using XHTML, but IMHO it will interfere with you learning of PHP 
less than HTML because it will force you to know what your doing, which is 
the point of learning.

In PHP's defence, stupid sloppy code can be written in ANY language. (Don't 
believe me? Head over to http://www.thedailywtf.com and see some real-world 
examples.)

PHP's lack of pickiness (compared to Java for example) is what has allowed it 
to be accessible to so many people, without requiring the very steep learning 
curve some other languages require. Good developers  write good code. Period.

let me repeat again. THERE IS NO LINK BETWEEN BAD HTML AND PHP.

This thread needs to die.




Re: [WSG] Will HTML be nicer to PHP than XHTML?

2005-07-01 Thread Alan Trick
Personally, I believe this is one of the strong argumens for XHTML. PHP
is very sloppy, and when you combine that with another sloppy language,
HTML, the mess is tremendos. For small projects and new people it's not
much of an issue, but try to maintain a large codebase without it being
incredibly buggy.

Using XHTML forces you towards good practices, something that is good to
do from the begining before you develop those bad habits. I don't know
who was objecting to using XHTML, but IMHO it will interfere with you
learning of PHP less than HTML because it will force you to know what
your doing, which is the point of learning.

XHTML is a beautiful thing. I use it every day with my PHP applications.
I just can't wait till SVG gets some support.

Alan Trick

Roberto Gorjão wrote:


 Anyway, I noticed that many of you use XHTML and I sure was beginning to
 enjoy using it myself, and it seemed to me a good way to practice for
 the inevitable future… is it? I mean: a good way to practice, as I
 believe that XML is the inevitable future… I’m initiating now my study
 on PHP and MySQL and I read some objections about using XHTML with PHP…
 Will XHTML interfere with my learning of PHP? Would it be a good idea to
 stick with good old plain HTML?
 
 Obrigado!
 Roberto
**
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] Will HTML be nicer to PHP than XHTML?

2005-06-28 Thread Roberto Gorjão

Dear List Members,

I apologise for bringing up an OT theme. It was not intentional, simply 
thoughtless of me.


I thank the list members who have answered with brilliant information 
and links that were truly enlightening about the subject.


Obrigado!

Roberto

--

Peter Firminger wrote:


We're pushing the OT limits with this thread.

I understand it's importance to some people but PHP is NOT a standard and we
don't want to go too much further into it here. Many list members don't use
PHP and this is just noise to them.

I'm not closing the thread but please limit your posts on this topic to only
crucial information that hasn't been said before.

If you move the thread to the CMS list you can go for it as hard as you like
without bothering designers and others that have no interest.

Peter


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



 


**
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] Will HTML be nicer to PHP than XHTML? [ADMIN]

2005-06-28 Thread Roberto Gorjão

Dear List Members,

I apologise for bringing up an OT theme. It was not intentional, simply 
thoughtless of me.


I thank the list members who have answered with brilliant information 
and links that were truly enlightening about the subject.


Obrigado!

Roberto

--

Peter Firminger wrote:


We're pushing the OT limits with this thread.

I understand it's importance to some people but PHP is NOT a standard and we
don't want to go too much further into it here. Many list members don't use
PHP and this is just noise to them.

I'm not closing the thread but please limit your posts on this topic to only
crucial information that hasn't been said before.

If you move the thread to the CMS list you can go for it as hard as you like
without bothering designers and others that have no interest.

Peter


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



 


**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Roberto Gorjão

Olá a todos!

I’ve read Ian Hickson and Stuart Langridge objections to the use of 
XHTML without serving it as application/xhtml+xml. I also read the 
article “WaSP Asks the W3C” 
(http://www.webstandards.org/learn/askw3c/sep2003.html) and I decided 
that I sure am not going to create two versions of my sites just for the 
sake of serving XHTML as it should to browsers which can understand it, 
as suggested at the W3C tutorial about “Content-Negotiation” 
(http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation).


Anyway, I noticed that many of you use XHTML and I sure was beginning to 
enjoy using it myself, and it seemed to me a good way to practice for 
the inevitable future… is it? I mean: a good way to practice, as I 
believe that XML is the inevitable future… I’m initiating now my study 
on PHP and MySQL and I read some objections about using XHTML with PHP… 
Will XHTML interfere with my learning of PHP? Would it be a good idea to 
stick with good old plain HTML?


Obrigado!
Roberto
**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Gary Menzel
My 2c worth.

I can't see how any scripting language would be considered more or less XHTML friendly than any other scripting language. Once you move to a scripting language and not to just a plain text file with markup in it, you have to use the language to generate the markup. The markup is just strings. The scripting language knows absolutely nothing about the markup language itself (other than what people tell it - 
i.e. additional libraries or functions to make some of the generation easier).

So my call would be that PHP is no more ideally suited (or otherwise) to any particular markup language that is text based (e.g. TEX, ROFF, HTML, XHTML, XML, etc. etc.).

Similarly with MySQL as a content manager - markup is just text, store it in a text field in any database and it will all work (assuming you adhere to any character escaping that the databases language requires).


Regards,Gary

On 6/28/05, Roberto Gorjão [EMAIL PROTECTED] wrote:
Olá a todos!I've read Ian Hickson and Stuart Langridge objections to the use ofXHTML without serving it as application/xhtml+xml. I also read the
article "WaSP Asks the W3C"(http://www.webstandards.org/learn/askw3c/sep2003.html) and I decidedthat I sure am not going to create two versions of my sites just for the
sake of serving XHTML as it should to browsers which can understand it,as suggested at the W3C tutorial about "Content-Negotiation"(http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation
).Anyway, I noticed that many of you use XHTML and I sure was beginning toenjoy using it myself, and it seemed to me a good way to practice forthe inevitable future… is it? I mean: a good way to practice, as I
believe that XML is the inevitable future… I'm initiating now my studyon PHP and MySQL and I read some objections about using XHTML with PHP…Will XHTML interfere with my learning of PHP? Would it be a good idea to
stick with good old plain HTML?Obrigado!Roberto**The discussion list forhttp://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfmfor some hints on posting to the list  getting help**



RE: [WSG] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Collin Davis
Roberto,
PHP can go hand in hand with Content Negotiation!
Check out this link: http://keystonewebsites.com/articles/mime_type.php
Read through the article - it explains how it works very well.  Since XHTML
is merely a reformulation of HTML, you can use the HTTP_ACCEPT header to
serve XHTML as application/xhtml+xml to browser that recognize it, and HTML
as text/html to those that can't properly recognize XHTML.  Also of note, is
that the script properly replaces / with  when serving HTML.
Hope this helps,

Collin Davis
Web Architect
Stromberg Architectural Products
903.454.0904
e [EMAIL PROTECTED]
w http://www.strombergarchitectural.com
 
-Original Message-
From: Roberto Gorjão [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 27, 2005 4:31 PM
To: Web Standards Group
Subject: [WSG] Will HTML be nicer to PHP than XHTML?

Olá a todos!

I’ve read Ian Hickson and Stuart Langridge objections to the use of 
XHTML without serving it as application/xhtml+xml. I also read the 
article “WaSP Asks the W3C” 
(http://www.webstandards.org/learn/askw3c/sep2003.html) and I decided 
that I sure am not going to create two versions of my sites just for the 
sake of serving XHTML as it should to browsers which can understand it, 
as suggested at the W3C tutorial about “Content-Negotiation” 
(http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation).

Anyway, I noticed that many of you use XHTML and I sure was beginning to 
enjoy using it myself, and it seemed to me a good way to practice for 
the inevitable future… is it? I mean: a good way to practice, as I 
believe that XML is the inevitable future… I’m initiating now my study 
on PHP and MySQL and I read some objections about using XHTML with PHP… 
Will XHTML interfere with my learning of PHP? Would it be a good idea to 
stick with good old plain HTML?

Obrigado!
Roberto
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Chris Kennon

Hi

This could prove immensely helpful:
http://loadaveragezero.com/vnav/labs/PHP/


G/L
Chris
On Jun 27, 2005, at 2:31 PM, Roberto Gorj


Olá a todos!

I’ve read Ian Hickson and Stuart Langridge objections to the use of  
XHTML without serving it as application/xhtml+xml. I also read the  
article “WaSP Asks the W3C” (http://www.webstandards.org/learn/ 
askw3c/sep2003.html) and I decided that I sure am not going to  
create two versions of my sites just for the sake of serving XHTML  
as it should to browsers which can understand it, as suggested at  
the W3C tutorial about “Content-Negotiation” (http://www.w3.org/ 
2003/01/xhtml-mimetype/content-negotiation).


Anyway, I noticed that many of you use XHTML and I sure was  
beginning to enjoy using it myself, and it seemed to me a good way  
to practice for the inevitable future… is it? I mean: a good way to  
practice, as I believe that XML is the inevitable future… I’m  
initiating now my study on PHP and MySQL and I read some objections  
about using XHTML with PHP… Will XHTML interfere with my learning  
of PHP? Would it be a good idea to stick with good old plain HTML?


Obrigado!
Roberto
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**




**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Mordechai Peller

Collin Davis wrote:


PHP can go hand in hand with Content Negotiation!
Check out this link: http://keystonewebsites.com/articles/mime_type.php
Read through the article - it explains how it works very well.  Since XHTML
is merely a reformulation of HTML, you can use the HTTP_ACCEPT header to
serve XHTML as application/xhtml+xml to browser that recognize it, and HTML
as text/html to those that can't properly recognize XHTML.  Also of note, is
that the script properly replaces / with  when serving HTML.

My own feeling is that since text/html is also a valid content type 
for XHTML, if application/xhtml+xml isn't accepted, I just send it as 
is with text/html. For the most part, only IE is the issue since every 
other browser of note accepts application/xhtml+xml, and since IE is 
so used to eating garbage that it couldn't tell the difference between 
gourmet food and spam, why bother?


On a related note, since the W3C's validator doesn't send an 
HTTP_ACCEPT header, you should also look at the HTTP_USER_AGENT 
header as well. While I normally would advise against browser sniffing, 
I make exceptions for the W3C Validator, the W3C CSS Validator, and the 
WDG Validator.





**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Paul Bennett
ARGH! The logo's - the logo's!!!
My EYES! 

-Original Message-
Hi

This could prove immensely helpful:
http://loadaveragezero.com/vnav/labs/PHP/
**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Your Name
Quite true - in the script I use, I have this for the W3C validator:
if (stristr($_SERVER[HTTP_USER_AGENT],W3C_Validator)) {
   $mime = application/xhtml+xml;
}

As to why, my own personal reasons are three-fold:
1. The W3C is clear that XHTML 1.1 should not (different than must not, 
I'm aware) be sent as text/html - http://www.w3.org/TR/xhtml-media-
types/ (I think that's the right link - I'm using a PDA and browsing is 
a pain). 
2. Conforming UAs *should* refuse to render invalidly marked up pages if 
sent with the proper MIME type - that saves me a lot of time in 
development.
3. When dealing with MathML or XHTML Ruby at all - your documents have 
to be sent as XHTML (application/xhtml+xml, application/xml or text/xml) 
- not HTML, unless of course you want to stick it into an object tag. 
I do believe that's all for now - however I'm not at work and my mind is 
in a different place, so hopefully this came out coherently enough. :)
Cheers,

 On a related note, since the W3C's validator doesn't send an 
 HTTP_ACCEPT header, you should also look at the HTTP_USER_AGENT 
 header as well. While I normally would advise against browser 
sniffing, 
 I make exceptions for the W3C Validator, the W3C CSS Validator, and 
the 
 WDG Validator.
 
 
 
 
 **
 The discussion list for  http://webstandardsgroup.org/
 
  See http://webstandardsgroup.org/mail/guidelines.cfm
  for some hints on posting to the list  getting help
 **
 
 
 

-- 

**
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] Will HTML be nicer to PHP than XHTML?

2005-06-27 Thread Michael Cordover
On 6/28/05, Collin Davis [EMAIL PROTECTED] wrote:
 PHP can go hand in hand with Content Negotiation!

As a PHP developer first and a web designer second (sorry, I just
don't have design flare) let me say that PHP goes brilliantly for
XHTML.  If you use output buffering then you can indeed convert
between XHTML 1.0 Strict and HTML 4.01 Strict automagically using
str_replace('/', '', $output); in your output buffer callback.

I also use HTTP Accept: scanning to determine whether to send as
application/xhtml+xml or text/html.  I'm too lazy to run an output
buffer over most of my sites and do the naughty XHTML as text/html
thing then.  I figure if a browser doesn't see application/xhtml+xml
it's probably not going to notice that I'm going with something
recommended against ;)

The biggest difficulty you're likely to encounter is your ?xml
declaration - this can be confused for a php open tag if
short_open_tag is on.  Which it, in my opinion, should never be.  But
in case it is (as it is by default), turn it off in php.ini or with a
.htaccess directive:
php_flag short_open_tag Off

If you need any help with php, especially coding good php to make a
standards-conformant website, I'd recommend you look on IRC,
specifically irc.freenode.net channel ##php.

Regards,

Michael Cordover
-- 
http://mine.mjec.net/
**
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] Will HTML be nicer to PHP than XHTML? [ADMIN]

2005-06-27 Thread Peter Firminger
We're pushing the OT limits with this thread.

I understand it's importance to some people but PHP is NOT a standard and we
don't want to go too much further into it here. Many list members don't use
PHP and this is just noise to them.

I'm not closing the thread but please limit your posts on this topic to only
crucial information that hasn't been said before.

If you move the thread to the CMS list you can go for it as hard as you like
without bothering designers and others that have no interest.

Peter


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**