niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » PHP
serving xhtml with php
Post new topic   Reply to topic Page 2 of 2 [24 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2
Author Message
cwdjrxyz
*nix forums beginner


Joined: 19 Jul 2006
Posts: 4

PostPosted: Wed Jul 19, 2006 6:27 pm    Post subject: Re: serving xhtml with php Reply with quote

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
Geoff Berrow
*nix forums Guru


Joined: 19 Feb 2005
Posts: 491

PostPosted: Wed Jul 19, 2006 8:09 pm    Post subject: Re: serving xhtml with php Reply with quote

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
Chris F.A. Johnson
*nix forums Guru


Joined: 20 Feb 2005
Posts: 2268

PostPosted: Wed Jul 19, 2006 8:12 pm    Post subject: Re: serving xhtml with php Reply with quote

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
Nikita the Spider
*nix forums beginner


Joined: 19 Jul 2006
Posts: 1

PostPosted: Wed Jul 19, 2006 9:40 pm    Post subject: Re: serving xhtml with php Reply with quote

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
william.clarke@gmail.com
*nix forums beginner


Joined: 10 Nov 2005
Posts: 43

PostPosted: Wed Jul 19, 2006 10:10 pm    Post subject: Re: serving xhtml with php Reply with quote

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
chernyshevsky@hotmail.com
*nix forums Guru


Joined: 09 Mar 2005
Posts: 871

PostPosted: Thu Jul 20, 2006 12:30 am    Post subject: Re: serving xhtml with php Reply with quote

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
Jerry Stuckle
*nix forums Guru


Joined: 24 Feb 2005
Posts: 1515

PostPosted: Thu Jul 20, 2006 3:52 am    Post subject: Re: serving xhtml with php Reply with quote

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
Rik
*nix forums Guru Wannabe


Joined: 16 Nov 2005
Posts: 291

PostPosted: Thu Jul 20, 2006 3:59 am    Post subject: Re: serving xhtml with php Reply with quote

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
John Dunlop
*nix forums Guru Wannabe


Joined: 20 Feb 2005
Posts: 283

PostPosted: Thu Jul 20, 2006 1:44 pm    Post subject: Re: serving xhtml with php Reply with quote

william.clarke wrote:

Quote:
Read the W3C tutorials... http://www.w3schools.com/xhtml/xhtml_dtd.asp

don't think w3schools is affiliated with W3C.

http://www.google.com/search?q=site:w3c.org%20w3schools

--
Jock
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 2 [24 Posts] Goto page:  Previous  1, 2
View previous topic :: View next topic
The time now is Fri Nov 21, 2008 9:10 pm | All times are GMT
navigation Forum index » Programming » PHP
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts xhtml generation library Mitchel Haas C++ 0 Tue Jun 27, 2006 3:54 am
No new posts serving request only when http -X (debug mode 1 worker) Meir Yanovich Apache 5 Thu Jun 08, 2006 7:42 am
No new posts Dumb-as-rocks WSGI serving using standard library Ben Finney python 2 Mon May 22, 2006 8:18 am
No new posts Problem - Serving web pages on the desktop (SimpleHTTPSer... Ben python 1 Tue May 09, 2006 6:06 am
No new posts Problem - Serving web pages on the desktop (SimpleHTTPSer... test@test.test python 0 Tue May 09, 2006 5:54 am

Internet Advertising | Bad Credit Mortgages | Anime Downloads | Remortgages | Hotels in Central london
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.5262s ][ Queries: 16 (0.4190s) ][ GZIP on - Debug on ]