Prevalence of XHTML?

N

Neo Geshel

I am curious about the prevalence of XHTML usage among web developers,
and its usage in web sites in general. Does anyone have any statistics
that could show the numbers of sites created in XHTML (all flavours) in
comparison to traditional HTML (including spaghetti code sites)?

Just curious.
...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************
 
C

cwdjrxyz

I am curious about the prevalence of XHTML usage among web developers,
and its usage in web sites in general. Does anyone have any statistics
that could show the numbers of sites created in XHTML (all flavours) in
comparison to traditional HTML (including spaghetti code sites)?

Many write code in xhtml. However, this is useless unless the page is
served properly as aplication/xml+xhtml, since if you just serve as
the usual text/html, the xhtml code gets treated as ordinary html and
not xhtml. The IE browsers can not handle true xhtml served properly,
and if a page claiming to be xhtml can be viewed on an IE browser, it
is not - just mis-served xhtml being treated as html. You have to
convert an xhtml page to html for it to be seen on IE. This can
involve separate xhtml and html pages with some mechanism to detect if
the browser will accept xhtml at all, sometimes done with header
exchange info, or if xhtml support is not detected, php or some other
server side script is used to convert a single xhtml page to a html
4.01 strict page for IE and other browsers that do not handle xhtml. I
would guess that at least 95% of pages claiming to be xhtml are mis-
served as only html. Since most servers already associate .html with
the mime type for text/html, you must then use some other extension
such as .xhtml or .xml and associate it with the mime type application/
xml+xhtml for a true xhtml page.
 
J

Jukka K. Korpela

Scripsit Neo Geshel:
I am curious about the prevalence of XHTML usage among web developers,

There are many ways to get cured from pointless curiosity. Did you try
getting some interesting hobby?
Does anyone have any statistics
that could show the numbers of sites created in XHTML (all flavours)
in comparison to traditional HTML (including spaghetti code sites)?

There are lots of statistics on the web, but you can generate statistics of
comparable quality by using your favorite random number generator.

But as a reliable piece of information, I can tell you that the percentage
of web sites using genuine XHTML, declared as XHTML in HTTP headings, is
zero (0), with a sufficient accuracy.
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************

If that's your attitude, please report me as a spammer. Oh, and please keep
that attitude visible in your sig as long as your message contents are not
worth reading.
 
A

asdf

Jukka K. Korpela said:
Scripsit Neo Geshel:


There are many ways to get cured from pointless curiosity. Did you try
getting some interesting hobby?

It is a valid question, and worth pursuing. Your response reveals more about
your own boring life than that of the OP.
 
S

Steve Pugh

I am curious about the prevalence of XHTML usage among web developers,
and its usage in web sites in general. Does anyone have any statistics
that could show the numbers of sites created in XHTML (all flavours) in
comparison to traditional HTML (including spaghetti code sites)?

The biggest survey that I know of was the one carried out by Ian Hixie
at Google: http://code.google.com/webstats/index.html This was carried
out over a billion documents in December 2005.

He doesn't record any data concerning doctypes but the occurence of
the xmlns attribute on the html element was quite low:
http://code.google.com/webstats/2005-12/pageheaders.html

Steve
 
M

mbstevens

On Mon, 16 Apr 2007 18:37:55 -0700, cwdjrxyz wrote:
The IE browsers can not handle true xhtml served properly,
and if a page claiming to be xhtml can be viewed on an IE browser, it
is not - just mis-served xhtml being treated as html.

You are right that IE does not serve xml pages as xml. But
some pages can be served as xml to an IE browser and the browser still
displays them as the author wishes. One should avoid serving xml to IE
only if the page displays in a way the author does not want in IE. I find
it easy to write pages that display as I want in IE -- probably because my
style is not to use overly complicated layouts.
 
T

Toby A Inkster

Jukka said:
There are lots of statistics on the web, but you can generate statistics of
comparable quality by using your favorite random number generator.

Tee hee. I like this.

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
B

Benjamin Niemann

Hello,

Neo said:
I am curious about the prevalence of XHTML usage among web developers,
and its usage in web sites in general. Does anyone have any statistics
that could show the numbers of sites created in XHTML (all flavours) in
comparison to traditional HTML (including spaghetti code sites)?

<http://triin.net/2006/06/12/HTML#document-types> might be what you are
looking for. The author analyzed ~1.2 million documents.
Unfortunately Googles Web Authoring Statistics
<http://code.google.com/webstats/>, which analyzed a much larger number of
documents, did not look at the DOCTYPE declaration...

HTH
 
J

Jukka K. Korpela

Scripsit Benjamin Niemann:
<http://triin.net/2006/06/12/HTML#document-types> might be what you
are looking for. The author analyzed ~1.2 million documents.
Unfortunately Googles Web Authoring Statistics
<http://code.google.com/webstats/>, which analyzed a much larger
number of documents, did not look at the DOCTYPE declaration...

What makes you think the DOCTYPE declaration determines whether a document
is in fact an XHTML document? In principle, it simply specifies the DTD that
the document purports to comply with. It cannot actually _make_ a document
an XHTML document, any more than a boilerplate text "This message is
certified virus free" makes anything virus free. In practice, there is a
huge number of pages that are a horrendous mix of HTML and XHTML with lots
of syntax errors, using an XHTML DOCTYPE.
 
J

Jim Ford

Jukka said:
There are many ways to get cured from pointless curiosity. Did you try
getting some interesting hobby?
There are lots of statistics on the web, but you can generate statistics
of comparable quality by using your favorite random number generator.

You're a hard man Jukka - it must be the Finnish Climate!

;^)

Jim Ford
 
C

cwdjrxyz

Many write code in xhtml. However, this is useless unless the page is
served properly as aplication/xml+xhtml, since if you just serve as
the usual text/html, the xhtml code gets treated as ordinary html and
not xhtml. The IE browsers can not handle true xhtml served properly,
and if a page claiming to be xhtml can be viewed on an IE browser, it
is not - just mis-served xhtml being treated as html. You have to
convert an xhtml page to html for it to be seen on IE. This can
involve separate xhtml and html pages with some mechanism to detect if
the browser will accept xhtml at all, sometimes done with header
exchange info, or if xhtml support is not detected, php or some other
server side script is used to convert a single xhtml page to a html
4.01 strict page for IE and other browsers that do not handle xhtml. I
would guess that at least 95% of pages claiming to be xhtml are mis-
served as only html. Since most servers already associate .html with
the mime type for text/html, you must then use some other extension
such as .xhtml or .xml and associate it with the mime type application/
xml+xhtml for a true xhtml page.

I have 4 simple example pages served as html 4.01 strict using the
usual .html extension, xhtml 1.1 served with the mime type application/
xhtml+xml associated with the extension .xhtml, xhtml 1.1 served with
the mime type application/xml associated with the extension .xml, and
a php page that rewrites a xhtml 1.1 page as html 4.01 strict if
header exchange can not establish or can not detect that the page can
handle the mime types for true xhtml .

http://www.cwdjr.info/extensions/auto.php

http://www.cwdjr.info/extensions/xhtml11.xhtml

http://www.cwdjr.info/extensions/xhtml11.xml

http://www.cwdjr.info/extensions/html401strict.html

Text on the pages tells more.
 
B

Benjamin Niemann

Jukka said:
Scripsit Benjamin Niemann:


What makes you think the DOCTYPE declaration determines whether a document
is in fact an XHTML document? In principle, it simply specifies the DTD
that the document purports to comply with. It cannot actually _make_ a
document an XHTML document, any more than a boilerplate text "This message
is certified virus free" makes anything virus free. In practice, there is
a huge number of pages that are a horrendous mix of HTML and XHTML with
lots of syntax errors, using an XHTML DOCTYPE.

You're certainly right that the usage of a XHTML DOCTYPE does not imply that
the document is actually XHTML. But it does say something about the
intentions of the document author. Unless the OP gives us a detailed and
unambiguous definition of "XHTML usage", I would say that a document which
the author wants to be XHTML (but often fails to implemented even remotely
correct) is XHTMLish enough to fit the (guessed) definition. Mostly because
your strict (and formally correct) definition is (sadly) of little use in
the real world.
 
N

Neredbojias

You're a hard man Jukka - it must be the Finnish Climate!

No, it's just that "jukka" means "joke" in the land of the Finn and the
poor man is just awfully sick of being seriously juked.
 
N

Neo Geshel

Jukka said:
Scripsit Neo Geshel:


There are many ways to get cured from pointless curiosity. Did you try
getting some interesting hobby?

This may be pointless to you, but I am genuinely curious about this
prevalence. After all, I would like to know if I am at the crest of a
newly forming movement, or simply tilting at windmills like some digital
Don Quixote.
There are lots of statistics on the web, but you can generate statistics
of comparable quality by using your favorite random number generator.

True, but I am looking for statistics with more than just a mere whiff
of reality and reliability. While the line, “lies, damn lies and
statistics†is often quite true, statistics (when used correctly,
logically and skeptically) can be a powerful compass; providing *some*
consistency and direction in cases where nothing else will.
But as a reliable piece of information, I can tell you that the
percentage of web sites using genuine XHTML, declared as XHTML in HTTP
headings, is zero (0), with a sufficient accuracy.

Really? Taking into account that “hacking†IE to accept application/xml
as something other than a dowloadable file causes an unacceptable 15 -
20 second “parsing wait†due to the xslt transformation, check out the
following site in any non-IE browser: http://www.renogoldcorp.com/

• Validates as XHTML 1.1
• Validates on all interior pages
• UTF-8 Character Encoding throughout
• application/xhtml+xml mime type for *all* *non*-IE web clients
• *Great* print preview (has nothing it shouldn’t) via CSS
• Accessible to thin client devices like Blackberry’s and PDA’s
If that's your attitude, please report me as a spammer. Oh, and please
keep that attitude visible in your sig as long as your message contents
are not worth reading.

I made a strong sig because some people need a cudgel over the head to
impart some common sense on the Internet. Sigs worded more softly rarely
worked, and plenty of people got caught by my automated spam honeypot.

BTW, what is with *your* attitude? I would have expected more maturity
and restraint from someone of your online stature. How did I get around
to pissing in *your* teapot today?

Oh, well.
...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************
 
N

Neo Geshel

Neo said:
• Validates as XHTML 1.1
• Validates on all interior pages

Hmmm... it seems that having <xhtmlConformance mode="Strict" /> in the
web.config fails to throw ASP.NET 2.0 into standards compliance mode for
the W3C Validator. As such, when the Validator grabs the page, ASP.NET
2.0 will litter forms with name attributes and unencapsulated input
elements (check the source under Firefox... no name attributes or
unwrapped input elements!!). Great, just what I wanted. NOT.

So the W3C validator *will* complain on any page that has a form, but
Firefox gets kosher XHTML and so therefore will not throw a parser
error. Thank heavens for small miracles.

I will have to ask a MCSE MVP about this one. It’s clearly an ASP.NET
2.0 issue and how the script handles different clients. Problem is, this
host doesn’t allow me to access and recompile .browser files, so I can’t
exactly fix the problem by changing the server’s recognition of the W3C
Validator.

...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************
 
N

Neo Geshel

Neo said:
Hmmm... it seems that having <xhtmlConformance mode="Strict" /> in the
web.config fails to throw ASP.NET 2.0 into standards compliance mode for
the W3C Validator. As such, when the Validator grabs the page, ASP.NET
2.0 will litter forms with name attributes and unencapsulated input
elements (check the source under Firefox... no name attributes or
unwrapped input elements!!). Great, just what I wanted. NOT.

So the W3C validator *will* complain on any page that has a form, but
Firefox gets kosher XHTML and so therefore will not throw a parser
error. Thank heavens for small miracles.

I will have to ask a MCSE MVP about this one. It’s clearly an ASP.NET
2.0 issue and how the script handles different clients. Problem is, this
host doesn’t allow me to access and recompile .browser files, so I can’t
exactly fix the problem by changing the server’s recognition of the W3C
Validator.

...Geshel

And I think I have solved the problem:

http://idunno.org/archive/2005/01/01/216.aspx

and for good measure (even though it’s not related):

http://www.kowitz.net/2006/12/11/ASPNET+20+Mozilla+Browser+Detection+Hole.aspx

Now the W3C Validator gets kosher markup from ASP.NET 2.0, and everyone
can be happy with this fully XHTML 1.1 site.

...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************
 
J

Jukka K. Korpela

Scripsit Benjamin Niemann:
You're certainly right that the usage of a XHTML DOCTYPE does not
imply that the document is actually XHTML. But it does say something
about the intentions of the document author.

Does it? It might be simply copied from somewhere. It probably is. Whether
the author has an idea of what it means remains to be seen.

Besides, intentions as such don't mean much.
Unless the OP gives us a
detailed and unambiguous definition of "XHTML usage", I would say
that a document which the author wants to be XHTML (but often fails
to implemented even remotely correct) is XHTMLish enough to fit the
(guessed) definition.

I don't try to make such guesses, and the OP apparently has a vague idea
that is assumed to relate to whether XHTML is fashionable or not.

If a document has an XHTML DOCTYPE and it is in fact not syntactically
XHTML, then it's not XHTML at all for any reasonable purpose. The very point
of X in XHTML is to play by XML rules, and they include the principle (to
put it somewhat roughly) that a document shall not be displayed - instead,
_an_ error message is to be shown - if there is the slightest deviation from
general XML rules ("well-formedness" rules). Along the same lines, a
document purported to be XHTML should be treated in a similar manner if it
violates any of the syntax rules in the DTD.

What might possibly be the reason for and benefit from using XHTML syntax,
as opposite to HTML 4.01 syntax, if XHTML syntax is not used? Using a little
bit of XHTML syntax here and there might be common, but this doesn't make it
any less foolish.
 
G

Greg N.

Jukka said:
What might possibly be the reason for and benefit from using XHTML
syntax, as opposite to HTML 4.01 syntax, if XHTML syntax is not used?

Using XHTML syntax if XHTML syntax is not used? Please explain, I don't
get it.
Using a little bit of XHTML syntax here and there might be common, but
this doesn't make it any less foolish.

I recently started using Google maps, see
http://hothaus.de/greg-tour-2006/route.htm

I could only get it to work on IE by obeying Googles suggestion to make
the doctype XHTML with some special xmlns incantation:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml">

I then made it XHTML as good as I could by just fixing whatever the
validator told me to fix.

Could I have gotten away without XHTML? Is there a working, but less
foolish approach?
 
A

Andy Dingley

Now the W3C Validator gets kosher markup from ASP.NET 2.0, and everyone
can be happy with this fully XHTML 1.1 site.

It's invalid under IE7 as you appear to be applying XHTML 1.0 Appendix
C to XHTML 1.1

If you're going to do this (pointless, but not harmful if done
carefully), at least stick with XHTML 1.0 Strict
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top