| Author |
Message |
John Dunlop *nix forums Guru Wannabe
Joined: 20 Feb 2005
Posts: 283
|
|
| Back to top |
|
 |
Rik *nix forums Guru Wannabe
Joined: 16 Nov 2005
Posts: 291
|
Posted: Thu Jul 20, 2006 3:59 am Post subject:
Re: serving xhtml with php
|
|
|
Jerry Stuckle wrote:
| Quote: | Chung Leong wrote:
That's the whole point. This isn't a pointless debate like Linux vs.
Windows or Coke vs. Pepsi. People choose what OS they use. People
choose what they drink. Don't like Coke? --don't buy it. No one is
obliged to follow the Coca Company's advise. The W3C on the other
hand, as a quasi-official body, enjoys a certain aura of authority.
Keeping quiet about its decisions means implicit acquiescence.
OTOH, joining them and adding your own input means you may influence
their decisions.
|
That's true. Inluence is everything, even at W3C. They're thinking about the
pratical implications though.
Normally (not always) they're unbiased decisions. Which is a Good Thing.
Grtz,
--
Rik Wasmus |
|
| Back to top |
|
 |
Jerry Stuckle *nix forums Guru
Joined: 24 Feb 2005
Posts: 1515
|
Posted: Thu Jul 20, 2006 3:52 am Post subject:
Re: serving xhtml with php
|
|
|
Chung Leong wrote:
| Quote: | Nikita the Spider wrote:
In article <1153324936.819761.189970@h48g2000cwc.googlegroups.com>,
"Chung Leong" <chernyshevsky@hotmail.com> wrote:
What is the point of XHTML anyway? To me it always seems an exercise in
vanity. I was looking at the FAQ at the W3C and the answer to the
question as to why XHTML is necessary goes something like "Well, we had
this workshop a few years ago and everyone there thought it's a good
idea."
Hi,
See the active thread in alt.html entitled "XHTML vs HTML", especially
the part about how this question usually ignites flame wars.
That's the whole point. This isn't a pointless debate like Linux vs.
Windows or Coke vs. Pepsi. People choose what OS they use. People
choose what they drink. Don't like Coke? --don't buy it. No one is
obliged to follow the Coca Company's advise. The W3C on the other hand,
as a quasi-official body, enjoys a certain aura of authority. Keeping
quiet about its decisions means implicit acquiescence.
|
Chung,
OTOH, joining them and adding your own input means you may influence
their decisions.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
================== |
|
| Back to top |
|
 |
chernyshevsky@hotmail.com *nix forums Guru
Joined: 09 Mar 2005
Posts: 871
|
Posted: Thu Jul 20, 2006 12:30 am Post subject:
Re: serving xhtml with php
|
|
|
Nikita the Spider wrote:
| Quote: | In article <1153324936.819761.189970@h48g2000cwc.googlegroups.com>,
"Chung Leong" <chernyshevsky@hotmail.com> wrote:
What is the point of XHTML anyway? To me it always seems an exercise in
vanity. I was looking at the FAQ at the W3C and the answer to the
question as to why XHTML is necessary goes something like "Well, we had
this workshop a few years ago and everyone there thought it's a good
idea."
Hi,
See the active thread in alt.html entitled "XHTML vs HTML", especially
the part about how this question usually ignites flame wars.
|
That's the whole point. This isn't a pointless debate like Linux vs.
Windows or Coke vs. Pepsi. People choose what OS they use. People
choose what they drink. Don't like Coke? --don't buy it. No one is
obliged to follow the Coca Company's advise. The W3C on the other hand,
as a quasi-official body, enjoys a certain aura of authority. Keeping
quiet about its decisions means implicit acquiescence. |
|
| Back to top |
|
 |
william.clarke@gmail.com *nix forums beginner
Joined: 10 Nov 2005
Posts: 43
|
Posted: Wed Jul 19, 2006 10:10 pm Post subject:
Re: serving xhtml with php
|
|
|
abracad_1999@yahoo.com wrote:
| Quote: | Is it possible to serve valid xhtml with php?
xhtml requires the 1st line:
?xml version="1.0" encoding="iso-8859-1"?
But php interprets the opening <? as a php statement.
If I try to echo this in PHP:
?php
echo '<?xml version="1.0" encoding="iso-8859-1"?>';
?
The closing ?> of the xhtml bit is interpreted as closing the php.
Thus:
'; ?
is displayed in the browser.
Any way around this?
|
There is no requirements to have "<?xml version="1.0"
encoding="iso-8859-1"?> " at the top of an XHTML page, it is required
for XML though. What is required is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
or
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Read the W3C tutorials... http://www.w3schools.com/xhtml/xhtml_dtd.asp |
|
| Back to top |
|
 |
Nikita the Spider *nix forums beginner
Joined: 19 Jul 2006
Posts: 1
|
Posted: Wed Jul 19, 2006 9:40 pm Post subject:
Re: serving xhtml with php
|
|
|
In article <1153324936.819761.189970@h48g2000cwc.googlegroups.com>,
"Chung Leong" <chernyshevsky@hotmail.com> wrote:
| Quote: | What is the point of XHTML anyway? To me it always seems an exercise in
vanity. I was looking at the FAQ at the W3C and the answer to the
question as to why XHTML is necessary goes something like "Well, we had
this workshop a few years ago and everyone there thought it's a good
idea."
|
Hi,
See the active thread in alt.html entitled "XHTML vs HTML", especially
the part about how this question usually ignites flame wars.
--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more |
|
| Back to top |
|
 |
Chris F.A. Johnson *nix forums Guru
Joined: 20 Feb 2005
Posts: 2268
|
Posted: Wed Jul 19, 2006 8:12 pm Post subject:
Re: serving xhtml with php
|
|
|
On 2006-07-19, Geoff Berrow wrote:
| Quote: | Message-ID: <1153326410.946395.313070@h48g2000cwc.googlegroups.com> from
cwdjrxyz contained the following:
If I were teaching a programming course, I
would require that all programs be written in xhtml 1.1 as well as html
4.01 strict
Why both? They are two separate things used for different reasons.
|
Why either? They are not programming languages.
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) |
|
| Back to top |
|
 |
Geoff Berrow *nix forums Guru
Joined: 19 Feb 2005
Posts: 491
|
Posted: Wed Jul 19, 2006 8:09 pm Post subject:
Re: serving xhtml with php
|
|
|
Message-ID: <1153333629.382478.105670@b28g2000cwb.googlegroups.com> from
cwdjrxyz contained the following:
| Quote: | An xhtml program can be pure html, pure xml, or a combination of both.
Thus an xhtml program that has no xml only functions in some cases is
about the same as an html 4.01 strict program with the addition of a
few special things, such as closing everything, using lower case
characters only, etc. In that case the html 4.01 strict page works just
as well and does not require a special version for IE. However some
xhtml pages may contain xml content that is best handled by xhtml, or
in some cases xml only. Thus I needed an exception and would require
the reason for the exception to see if it was understood why the
exception was necessary, or far more practical. I should also have
included the inverse case when the xhtml page can not be written as
html 4.01 strict without undue complication, often because of the xml
content in the xhtml page.
|
A lot of people are jumping on the XHTML bandwagon for no better reason
than they think newer==better. I know you're not one of them. I just
wanted to make the point that the doctype should be the one that is most
appropriate, not one that is being used just because it is fashionable.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
| Back to top |
|
 |
cwdjrxyz *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 6:27 pm Post subject:
Re: serving xhtml with php
|
|
|
Geoff Berrow wrote:
| Quote: | Message-ID: <1153326410.946395.313070@h48g2000cwc.googlegroups.com> from
cwdjrxyz contained the following:
If I were teaching a programming course, I
would require that all programs be written in xhtml 1.1 as well as html
4.01 strict
|
My complete statement was:
"If I were teaching a programming course, I
would require that all programs be written in xhtml 1.1 as well as html
4.01 strict or be given a reason of why a program can not be written
in xhtml 1.1."
| Quote: | Why both? They are two separate things used for different reasons.
|
An xhtml program can be pure html, pure xml, or a combination of both.
Thus an xhtml program that has no xml only functions in some cases is
about the same as an html 4.01 strict program with the addition of a
few special things, such as closing everything, using lower case
characters only, etc. In that case the html 4.01 strict page works just
as well and does not require a special version for IE. However some
xhtml pages may contain xml content that is best handled by xhtml, or
in some cases xml only. Thus I needed an exception and would require
the reason for the exception to see if it was understood why the
exception was necessary, or far more practical. I should also have
included the inverse case when the xhtml page can not be written as
html 4.01 strict without undue complication, often because of the xml
content in the xhtml page. |
|
| Back to top |
|
 |
chernyshevsky@hotmail.com *nix forums Guru
Joined: 09 Mar 2005
Posts: 871
|
Posted: Wed Jul 19, 2006 6:18 pm Post subject:
Re: serving xhtml with php
|
|
|
cwdjrxyz wrote:
| Quote: | Of course one is still free to write code in an html level as low as
3.2 which still can be validated at the w3c and which seems to be
supported by most recent computer browsers also. The importance of
xhtml/xml is that a very large number of smaller devices now support
xml and sometimes not html. Thus traditional computer browsers need to
be brought in line to allow easy exchange of data between many
different types of devices.
|
I'm a believer in democracy and the free market. The idea that we
should all adopt a technology because a bunch of guys in a room think
it's a good thing offends me.
Having the whole world adjust to the limitation of a few devices is a
preposterous misallocation of human resource. If some devices can't
handle HTML, screw them. People will buy competing products that can. |
|
| Back to top |
|
 |
Geoff Berrow *nix forums Guru
Joined: 19 Feb 2005
Posts: 491
|
Posted: Wed Jul 19, 2006 4:34 pm Post subject:
Re: serving xhtml with php
|
|
|
Message-ID: <1153326410.946395.313070@h48g2000cwc.googlegroups.com> from
cwdjrxyz contained the following:
| Quote: | If I were teaching a programming course, I
would require that all programs be written in xhtml 1.1 as well as html
4.01 strict
|
Why both? They are two separate things used for different reasons.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
| Back to top |
|
 |
cwdjrxyz *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 4:26 pm Post subject:
Re: serving xhtml with php
|
|
|
Chung Leong wrote:
| Quote: | What is the point of XHTML anyway? To me it always seems an exercise in
vanity. I was looking at the FAQ at the W3C and the answer to the
question as to why XHTML is necessary goes something like "Well, we had
this workshop a few years ago and everyone there thought it's a good
idea."
|
Of course one is still free to write code in an html level as low as
3.2 which still can be validated at the w3c and which seems to be
supported by most recent computer browsers also. The importance of
xhtml/xml is that a very large number of smaller devices now support
xml and sometimes not html. Thus traditional computer browsers need to
be brought in line to allow easy exchange of data between many
different types of devices. If I were teaching a programming course, I
would require that all programs be written in xhtml 1.1 as well as html
4.01 strict or be given a reason of why a program can not be written
in xhtml 1.1. I would also give any program that did not completely
validate at the w3c html/xhtml and css validators a grade of zero.
Fortunately for many future students, I am very unlikely to ever teach
programming . |
|
| Back to top |
|
 |
chernyshevsky@hotmail.com *nix forums Guru
Joined: 09 Mar 2005
Posts: 871
|
Posted: Wed Jul 19, 2006 4:02 pm Post subject:
Re: serving xhtml with php
|
|
|
What is the point of XHTML anyway? To me it always seems an exercise in
vanity. I was looking at the FAQ at the W3C and the answer to the
question as to why XHTML is necessary goes something like "Well, we had
this workshop a few years ago and everyone there thought it's a good
idea." |
|
| Back to top |
|
 |
cwdjrxyz *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 3:56 pm Post subject:
Re: serving xhtml with php
|
|
|
Kimmo Laine wrote:
| Quote: | "cwdjrxyz" <spamtrap1@cwdjr.info> wrote in message
news:1153274022.331966.293190@p79g2000cwp.googlegroups.com...
If
you associate an extension such as .xhtml with the mime type for
xhtml+xml, then you may serve true xhtml using this extension. Then of
course the page can not be viewed by IE6 or IE7, because these outmoded
browsers can not handle true xhtml after all of these years.
Really? Are you talking about IE7 for sure now? It's not even out yet and
you claim it's "outmoded" and can't handle xml "after all these years"? Did
you mean IE5?
|
I said true xhtml rather than xml as you see from your quote above. You
could also include IE5 and all lower IEs if you wish but it hardly
would seem necessary if the IE6 does not support true xhtml. The
article quoted just below and many other reports confirm that IE7 will
not support true xhtml based on the mime type application/xhtml+xml. Of
course there could be a last minute change, but considering that the
browser would require extreme rewriting, this seem to be highly
unlikely unless the introduction of the IE7 id delayed for many months
and Microsoft perhaps hires some people away from Mozilla and Opera who
have experience in introduction of true xhtml.
|
|
| Back to top |
|
 |
unwiredbrain@gmail.com *nix forums beginner
Joined: 12 Jun 2006
Posts: 5
|
Posted: Wed Jul 19, 2006 10:07 am Post subject:
Re: serving xhtml with php
|
|
|
Noodle wrote:
| Quote: | It shouldn't need the line:
?xml version="1.0" encoding="iso-8859-1"?
for it to validate as XHTML (I think its just recommended).
You could just omit it if your server/php config won't let you include
it.
Yes, that's correct. It /should/ be used, but it's not /necessary/ i.e. |
normative. So you can just omit it, your pages will validate anyway.
Moreover, some browsers fall in quirks mode if you add it: check
http://www.quirksmode.org for more specific infos.
(As we say in sicily) Baciamo le mani
--
Massimo "unwiredbrain" Lombardo |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|