What is XHTML?

P

Paul Furman

I checked google and this page seems to be trying to say it but still
doesn't tell me:
http://www.w3.org/TR/xhtml1/#xhtml
So it lets people design new types of web presentation tools (like new
html tags?) in a way that can be easily standardized (and automatically
interpreted?). What I also have understood is that it's sort of a
database type format that allows relation many-to-many type
associations. It seems like it somehow takes whatever tricks the author
has up their sleeve and interprets that into plain old html pages. So
it's kind of a programming language like java where trickier things can
be done and the browser knows how to read the script. In this canse I
guess it must be limited to things that would not pose a security risk,
such as simply presenting information but not effecting your machine in
any way like java will do.

Am I understanding this?

Any examples of tricky things that could be done such as database
manipulation?
 
M

Matthias Gutfeldt

Paul said:
I checked google and this page seems to be trying to say it but still
doesn't tell me:
http://www.w3.org/TR/xhtml1/#xhtml

It says at the top of the page: "A Reformulation of HTML 4 in XML 1.0".

That's what most people use it for: As a slightly updated version of HTML.

Whether you actually do all the 'wonderful' things that you could do
because XHTML is also XML, is up to you.

So unless your project actually requires all those wonderful XML things,
there's no real reason to use XHTML apart from the fact that it's hip,
cool, and gets you all the girls, of course.


Matthias
 
P

Paul Furman

Matthias said:
It says at the top of the page: "A Reformulation of HTML 4 in XML 1.0".

That's what most people use it for: As a slightly updated version of HTML.

Whether you actually do all the 'wonderful' things that you could do
because XHTML is also XML, is up to you.

So unless your project actually requires all those wonderful XML things,
there's no real reason to use XHTML apart from the fact that it's hip,
cool, and gets you all the girls, of course.


OK so I guess I've got the general idea. Sounds like nobody is really
using it yet. I can't find any example that looks special or does
obvious database cartwheels. It seems to have more to do with custom
database applications in web format than presentation formatting. I'm
not clear what XML does that an SQL database doesn't do with server side
scripting. Maybe that it contains it's own scripting so the database can
be queried without stressing the server's machinery?
 
S

SpaceGirl

Paul Furman said:
OK so I guess I've got the general idea. Sounds like nobody is really
using it yet. I can't find any example that looks special or does
obvious database cartwheels. It seems to have more to do with custom
database applications in web format than presentation formatting. I'm
not clear what XML does that an SQL database doesn't do with server side
scripting. Maybe that it contains it's own scripting so the database can
be queried without stressing the server's machinery?

XML provides a way of handling data at the client side that can be reused or
distributed. XML is *not* for layout, purely for data. You then use XSL to
format that data (stylesheets basically).

XHTML is a more "perfect" version of HTML. It forces all tags to be closed
with />, and is much less forgiving of the sort of cludges and fixes used in
HTML. XHTML *is* used for layout (structure) while CSS is used to format
objects inside that structure.

Example; you can have an XHTML page that contains dynamic data (XML) that is
fed from a SQL database. You could then happily have a portable web aware
device (such as a PDA, cellphone, games console, whatever...) read that
page - it would read the data (XML) totally independently from any screen
"design", meaning that your content is readable anywhere, any how on any
platform. It's a way of totally separating data (content) from design. XML
is definatly the future. There are lots of web sites already doing this,
have another look around.

One word of caution with XML; Internet Explorer has fairly ropey support,
while all the rival browsers seem to support it fully. While it works most
of the time, it's essential XHTML/XML site are tested on as many platforms
as possible while you're building sites... it's way less forgiving if you
get it wrong!
 
F

Firas D.

Matthias said:
So unless your project actually requires all those wonderful XML things,
there's no real reason to use XHTML apart from the fact that it's hip,
cool, and gets you all the girls, of course.

I can tell you from experience that talking about XHTML is a serious
turn-off for girls, even the geeky sort :(
 
S

SpaceGirl

Matthias Gutfeldt said:
It says at the top of the page: "A Reformulation of HTML 4 in XML 1.0".

That's what most people use it for: As a slightly updated version of HTML.

Whether you actually do all the 'wonderful' things that you could do
because XHTML is also XML, is up to you.

So unless your project actually requires all those wonderful XML things,
there's no real reason to use XHTML apart from the fact that it's hip,
cool, and gets you all the girls, of course.


Matthias

XHTML and XML are two different things.

XHTML = replacement of HTML, better structured, easier to code and read,
less likely to explode :)

XML = way of handling data regardless of browser, platform or physical
hardware being used to read that data.
 
F

Firas D.

SpaceGirl said:
depends on the girl honey ;)
Maybe :) I've only discussed it on IM, and got some of the 'you need to
get out more' innuendo..

(Someone should try this: "baby, I'm a strict XML parser, and you've got
no unescaped ampersands!")
 
S

Samuël van Laere

Matthias Gutfeldt said:
So unless your project actually requires all those wonderful XML things,
there's no real reason to use XHTML apart from the fact that it's hip,
cool, and gets you all the girls, of course.

I use HTML 4.01 Strict, and i don't get any girls.
Do you reckon i should start using XHTML?
I mean i could use some girls you know, specially for the dirty work ;)

Regards,
Samuël
 
P

Paul Furman

SpaceGirl said:
XML provides a way of handling data at the client side that can be reused or
distributed...

XHTML is a more "perfect" version of HTML. It forces all tags to be closed
with />, and is much less forgiving


OK 'cause I keep hearing I should follow those rules if I want my pages
to work in the future.

Example; you can have an XHTML page that contains dynamic data (XML) that is
fed from a SQL database. You could then happily have a portable web aware
device (such as a PDA, cellphone, games console, whatever...) read that
page - it would read the data (XML) totally independently from any screen
"design", meaning that your content is readable anywhere, any how on any
platform. It's a way of totally separating data (content) from design. XML
is definatly the future. There are lots of web sites already doing this,
have another look around.


So should I be learning XML client side rather than monkeying around
connecting to MySQL with PHP server side? I don't want to waste my time
with the old school stuff because I don't know that at all yet and it
looks like it will be a considerable chore to learn, I might as well dig
into what will be most useful in the future. I'm not too concerned if
old browsers can't read it for a couple years. Or is this going to get
too "difficult" for someone who isn't a hard core programmer? There are
limits to how much energy I'm going to spend on this but I definitely
want to get into database stuff on the web one way or another.
 
D

David Dorward

Paul said:
So should I be learning XML client side rather than monkeying around
connecting to MySQL with PHP server side?

No.

Server side is reliable and doesn't depend on browser support.
Server side can take changes from users and give them to other users.

Learning PHP is far more useful then XML IMO.
 
C

Cameron

SpaceGirl wrote:
XML provides a way of handling data at the client side that can be reused or
distributed. XML is *not* for layout, purely for data. You then use XSL to
format that data (stylesheets basically).

Just thought I would add that XML isn't just for the client side.

~Cameron
 
P

Phil Roberts

With total disregard for any kind of safety measures Paul Furman
OK so I guess I've got the general idea. Sounds like nobody is
really using it yet. I can't find any example that looks special
or does obvious database cartwheels. It seems to have more to do
with custom database applications in web format than
presentation formatting. I'm not clear what XML does that an SQL
database doesn't do with server side scripting. Maybe that it
contains it's own scripting so the database can be queried
without stressing the server's machinery?

XHTML is just HTML with the strict formatting rules of XML applied.
It also loses all the "presentational" tags such as <font> which
are deprecated in favour of CSS.

The general point of XHTML is that well-formed XML is a lot easier
to parse than the badly-formed cludge of XML that is HTML. So if
you have a well-formed XHTML page then you can use an ordinary XML
parse to extract data.

As for the advantages of XML over a proper relational database,
well, there are none. Because the two are totally different and
intended for different uses.

XML is basically just a standardised method of formatting data that
can be easily read by a parser which can run in any system. Which
makes it ideal for data syndication (such as the RSS feeds found in
many blogs and news sites) and web services (such as those operated
by Google and Amazon)
 
D

David Dorward

Phil said:
XHTML is just HTML with the strict formatting rules of XML applied.
It also loses all the "presentational" tags such as <font> which
are deprecated in favour of CSS.

Not so.

XHTML 1.0 and HTML 4.01 are exactly the same save for the differences
between SGML And XML. XHTML 1.0 Transitional includes all the obsolete
presentational markup of HTML 4.01 Transitional.
 
P

Paul Furman

David said:
Paul Furman wrote:




No.

Server side is reliable and doesn't depend on browser support.
Server side can take changes from users and give them to other users.

Learning PHP is far more useful then XML IMO.


I've been led to believe I would use both because I'm told to make my
PHP code comply with XHTML. XML would be used for the database aspect,
PHP for constructing other non-database related customization. Cameron
says below that XML can be done server side but I don't know if this
means needing a special interpreter on my web host or if that's a common
way to use it.

I'm also kind of getting the feeling that XML is more of a deluxe system
for the big players who can afford professional programmer staff, and
not real easy to learn or simple to implement.
 
D

David Dorward

Paul said:
I've been led to believe I would use both because I'm told to make my
PHP code comply with XHTML.

You don't need to know XML to use XHTML. The list of differences between
HTML 4.01 and XHTML 1.0 is quite small.

http://www.w3.org/TR/xhtml1/#diffs
XML would be used for the database aspect,

This wouldn't be very efficient. Parsing XML is a lot slower then a decent
database. XML is a good format for exchanging data, but not really for
storing it.
PHP for constructing other non-database related customisation. Cameron
says below that XML can be done server side but I don't know if this
means needing a special interpreter on my web host or if that's a common
way to use it.

XML is just a data format. You can manipulate it like any other file. There
are plenty of specialised XML handling tools though, and one of those would
probably come in handy if you plan to do anything with it.
I'm also kind of getting the feeling that XML is more of a deluxe system
for the big players who can afford professional programmer staff, and
not real easy to learn or simple to implement.

XML is not very complex, but it isn't all that useful unless you are
planning to shunt data between systems.
 
M

Matthias Gutfeldt

Samuël van Laere said:
I use HTML 4.01 Strict, and i don't get any girls.
Do you reckon i should start using XHTML?

I hear that using aftershave is even more effective, but XHTML is a good
start.

I mean i could use some girls you know, specially for the dirty work ;)

Like wiping up the spilled tag soup?


Matthias
 
S

SpaceGirl

David Dorward said:
You don't need to know XML to use XHTML. The list of differences between
HTML 4.01 and XHTML 1.0 is quite small.

http://www.w3.org/TR/xhtml1/#diffs


This wouldn't be very efficient. Parsing XML is a lot slower then a decent
database. XML is a good format for exchanging data, but not really for
storing it.


XML is just a data format. You can manipulate it like any other file. There
are plenty of specialised XML handling tools though, and one of those would
probably come in handy if you plan to do anything with it.


XML is not very complex, but it isn't all that useful unless you are
planning to shunt data between systems.


That's very true; XML adds a *huge* amount of flexibility, because once your
data in XML format any XML-compliant device should read it seamlessly. How
that data is formatted is then controlled by XSL stylesheets which (can be)
platform specific. Example; if you have a web site that contains news that's
fed from a database, it would make sense to make sure that the data is
contained inside XML rather than HTML because it would allow for your data
to be read on cellphones, web pages, ticker bars on your faveorite tv news
channel etc etc... It also makes the conversion into a format that can be
fed into other databases pretty easy; The XML markup is pretty straight
forwards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top