473,698 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I shall jump on the XHTML bandwagon

I shall jump on the XHTML bandwagon.
I run my perfectly good html4/strict pages thru
$ tidy -asxhtml -utf8 #to get:
<!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"> <head><meta
http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta
http-equiv="Content-Language" content="zh-tw" />
knowing all the time as http://hixie.ch/advocacy/xhtml says,
that all I am doing is downgrading my pages from html4/strict.dtd to
quirks mode... (I suppose one day some Prince Charming browser will
come along and detect all this so there will be some actual benefit.)

I will not use any .htaccess files on my web host. No more single
point of failures for me. Anyway my pages are to look the same if read
from file:/// or http://.

Furthermore, I will still use their same .html filenames and not
..xhtml, as I don't want to break everybody's links to me. (I
understand that one needs .xhtml and
content="applic ation/xhtml+xml..." in e.g., firefox to trigger any
XHTML treatment. I am thus far from that.)

For my English pages, even though I could still declare ISO-8859-1, I
shall declare utf-8, being modern and such.

So I suppose my only questions are:
Shall I fear the old browsers of
http://www.yourhtmlsource.com/access...xmldeclaration
or go ahead and use tidy --add-xml-decl 1, producing a
<?xml version="1.0"?> or better yet add
<?xml version="1.0" encoding="UTF-8"?>
UTF-8 or utf-8?

Though tidy doesn't, shall I still proceed and bother with the
<html xmlns="..." lang="zh-tw" xml:lang="zh-tw"> lang stuff, or is my
http-equiv line above "equiv" enough?

Feb 16 '06 #1
24 2630
Dan Jacobson wrote:
I shall jump on the XHTML bandwagon.
Please don't - as text/html it is, at best, silly. With the proper
content-type it enjoys little support from browsers, and support is
generally worse then for text/html documents (e.g. say goodbye to
document.write and incremental rendering in Firefox).
that all I am doing is downgrading my pages from html4/strict.dtd to
quirks mode... (I suppose one day some Prince Charming browser will
come along and detect all this so there will be some actual benefit.)
So this browser will check that the document is well formed XML, then push
it through an XML parser instead of a tag soup slurper? Sounds like a lot
of work for ... no benefit.
Furthermore, I will still use their same .html filenames and not
.xhtml, as I don't want to break everybody's links to me. (I
understand that one needs .xhtml and
content="applic ation/xhtml+xml..." in e.g., firefox to trigger any
XHTML treatment. I am thus far from that.)
No. For local files I believe Firefox pays attention to the file extensions,
for remote files only the content-type in the HTTP header counts. The Meta
data is used only to find out the character encoding when webservers fail
to specify it.
For my English pages, even though I could still declare ISO-8859-1, I
shall declare utf-8, being modern and such.
There are characters that one might use in an English language document that
have different locations in ISO-8859-1 and UTF-8. Don't lie about your
content type.
So I suppose my only questions are:
Shall I fear the old browsers of
http://www.yourhtmlsource.com/access...xmldeclaration or go ahead and use tidy --add-xml-decl 1, producing a
<?xml version="1.0"?> or better yet add
<?xml version="1.0" encoding="UTF-8"?>
The text/html spec says that XHTML 1.0 defines a profile of use of XHTML
which is compatible with HTML 4.01 and which may also be labelled as
text/html. Appendix C of the XHTML 1.0 spec (which is the HTML
compatibility[1] guidelines) says that you shouldn't include an XML prolog.
Thus an <?xml etc ?> has no place in a text/html document.
Though tidy doesn't, shall I still proceed and bother with the
<html xmlns="..." lang="zh-tw" xml:lang="zh-tw"> lang stuff, or is my
http-equiv line above "equiv" enough?


http-equiv is also a joke. Use a real content type header. Use a lang
attribute in documents served as text/html. Use a xml:lang attribute in XML
documents.

Just avoid serving XHTML to clients, it is utterly pointless at present.

[1] This is a joke. It only makes it compatible with broken implementations
of HTML in *most* browsers. You get problems if a user agent treats <img />
in a text/html document as per the HTML specs.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 16 '06 #2
Dan Jacobson wrote:
I shall jump on the XHTML bandwagon.


I invite you to check out my page .....

http://jp29.org/test.php

Feb 16 '06 #3
On Fri, 17 Feb 2006, Dan Jacobson wrote:
I shall jump on the XHTML bandwagon.
OK. But could you offer some coherent explanation of what benefit you
hope to gain by serving that out to the WWW ? If you could, I think
you'd be the first.
I run my perfectly good html4/strict pages thru
$ tidy -asxhtml -utf8 #to get:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Good to see that you chose Strict. Whereas XHTML 1.0 Strict is merely
silly - at least as text/html, XHTML 1.0 Transitional is frankly
absurd, after all this time for the "transition " to be completed.
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head><meta
http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta
So you're serving it out as text/html, ergo you are relying on the
dreaded Appendix C.
http-equiv="Content-Language" content="zh-tw" />
we'll come back to that detail later
knowing all the time as http://hixie.ch/advocacy/xhtml says,
that all I am doing is downgrading my pages from html4/strict.dtd to
quirks mode...
Hmmm? As long as you retain the above DOCTYPE, and avoid pre-pending
any <?xml... thingy, I'm under the impression that those browsers
which have a concept of standards versus quirks will be in standards
mode. Am I missing something? Do you have a cite?
(I suppose one day some Prince Charming browser will
come along and detect all this so there will be some actual benefit.)
Well, no, since XHTML/1.0 was *designed* to be functionally equivalent
to HTML/4.01, so there is nothing to be gained, even with an ideal
browser: with the browsers that are currently around, there's a bit to
be lost by changing from HTML to XHTML at *this* level.

XHTML only brings worthwhile benefits when you can go further than
HTML4 (equiv. XHTML/1.0): but that's scarcely feasible yet on the WWW
(except for specialised usages, such as math, svg, ruby-annotation
etc., whose readers can be *expected* to get capable browsers).
I will not use any .htaccess files on my web host. No more single
point of failures for me. Anyway my pages are to look the same if read
from file:/// or http://.
No particular comment, other than to suspect that you are mostly
missing the point...
Furthermore, I will still use their same .html filenames and not
.xhtml, as I don't want to break everybody's links to me.
OK, but there's no compulsion to use *any filename extension at all*:
the WWW was designed to work with *URLs* and with *HTTP
content-types*, irrespective of the local peculiarities of a file
system. It's your responsibility to sort that out with your own HTTPD
configuration (.htaccess and so on).
(I understand that one needs .xhtml and
content="applic ation/xhtml+xml..." in e.g., firefox to trigger any
XHTML treatment. I am thus far from that.)
It wouldn't be of any value to you at the moment anyway - in fact it
has some disadvantages, as you'd know if you'd been reading earlier
discussions.

I must say, the more that I read of your posting, the less convinced I
become that you have bothered to read any of the previous discussions
of any of these issues.
So I suppose my only questions are:
But you seem to have missed all the important questions of principle,
so I'm not sure there's any point in bothering with your questions of
detail.
Shall I fear the old browsers of
http://www.yourhtmlsource.com/access...xmldeclaration
or go ahead and use tidy --add-xml-decl 1, producing a
<?xml version="1.0"?> or better yet add
<?xml version="1.0" encoding="UTF-8"?>
UTF-8 or utf-8?
Don't you fear the "old browser" called MSIE6 and its predecessors?
Though tidy doesn't, shall I still proceed and bother with the
<html xmlns="..." lang="zh-tw" xml:lang="zh-tw"> lang stuff, or is my
http-equiv line above "equiv" enough?


HTTP content-language and (X)HTML language are not the same thing -
they are at different levels of the protocol, for one thing. <meta
http-equiv=...> from HTML's point of view is just an opaque container,
it means nothing to HTML itself. Whether it means anything to XHTML
is even more dubious, IMHO. If you want an HTTP Language, then you'd
be better advised to tell your HTTP server about it. If you want an
HTML language (and the WAI guidelines say that you do) then you need
to put it on the <html...> container. Plus language attributes for
any elements which differ, if you're doing the job properly.
Feb 16 '06 #4
James Pickering wrote:
I invite you to check out my page .....

http://jp29.org/test.php


So I visit the page and get ...

application/xhtml+xml D)ownload, or C)ancel

How helpful.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 16 '06 #5
On Thu, 16 Feb 2006, David Dorward wrote:
James Pickering wrote:
I invite you to check out my page .....

http://jp29.org/test.php


So I visit the page and get ...

application/xhtml+xml D)ownload, or C)ancel


I recognise a Lynx response - but I don't understand why that
happened.

My Lynx sends his server a rather elaborate Accept: header, but I note
that it contains text/html explicitly, but does *not* contain
application/xhtml+xml; it ends with "*/*;q=0.01" - but that clearly
should take second place, when text/html is Accept-ed (with default
q). The server headers say:

HTTP/1.1 200 OK
Server: Zeus/3.4
Date: Thu, 16 Feb 2006 23:56:10 GMT
Connection: close
Content-Type: application/xhtml+xml;chars et=utf-8
Vary: Negotiate, Accept
X-Powered-By: PHP/4.1.2

The headers (see "Vary:") *do* imply that some kind of negotiation is
happening, but, based on what we see here, it seems to me that the
server-side negotiation is b0rked.

AFAIK, Zeus is based on Apache, and probably has a perfectly good
mod_negotiate built in. Not clear why PHP needs to invent a square
wheel?
Feb 17 '06 #6
Dan Jacobson wrote:
I shall jump on the XHTML bandwagon.
Good for you. You'll jump off it again one day when you realise it's
not going anywhere yet.

Although, this endless debate about HTML vs. XHTML that keeps coming up
every few weeks on every related mailing list, newsgroup and forum
around the world is really pointless. The debate was won long ago (HTML
4 was victorious). But in the end, the most important issue is that the
document is accessible and degrades gracefully in older browsers, and
the use of a DOCTYPE that triggers standards mode (i.e. don't use the
XML Declaration, it triggers quirks mode in IE)
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Do you realise that the meta element is completely useless in XHTML, and
is an inferior substitute for real HTTP headers in HTML?
I will not use any .htaccess files on my web host.


Why?

I think you need to read my article and address all the issues involved
with using XHTML correctly. If you don't, there really is no point in
using XHTML at all.

http://lachy.id.au/log/2005/12/xhtml-beginners

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Feb 17 '06 #7

On Fri, 17 Feb 2006, Lachlan Hunt wrote:
http://lachy.id.au/log/2005/12/xhtml-beginners


Aaaargh, microfonts.
Feb 17 '06 #8
Alan J. Flavell wrote:
On Fri, 17 Feb 2006, Lachlan Hunt wrote:
http://lachy.id.au/log/2005/12/xhtml-beginners


Aaaargh, microfonts.


Yeah, I know. I'm way too busy (and lazy) to do anything about changing
from the default WP stylesheet to that used on the rest of my site,
which doesn't use small fonts. Sorry, although then there's nothing
stopping you from increasing it.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Feb 17 '06 #9

On Fri, 17 Feb 2006, Lachlan Hunt wrote:
Alan J. Flavell wrote:
On Fri, 17 Feb 2006, Lachlan Hunt wrote:
http://lachy.id.au/log/2005/12/xhtml-beginners
Aaaargh, microfonts.


[...] Sorry, although then there's nothing stopping you from increasing
it.


Sure - I normally have min. font size in effect (thanks to Mozilla).
I just happened to have disabled that (thanks to Chris Pederick ;-) a
little earlier, to review someone else's site for CSS, and had left it
disabled, otherwise I wouldn't have noticed.

But I was thinking more about the impression it creates for someone
who really is a "beginner". Although, to move the discussion back on
topic for ciwah, it might be that your content is written *for*
experts, even though it's *about* beginners.

best
Feb 17 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1655
by: Peter Rohleder | last post by:
Hi, I have a few simple questions in order to use modularized xhtml and getting it to work. A simple example may make this obviouse: Lets say we want to create a simple xml-file to reflect a faq-structure.
4
2202
by: Sleepless on the Web | last post by:
Is there a limit to how many items can be in a jump list? My script worked fine with 126 items, but at 152 items it just doesn't work. When I select a page from the drop down menu it will only bring me to one particular Web page among the 152, a page I haven't selected. It's the same page all the time. The alternative reason why it doesn't work is that I've munged up some part of the javascript. I've had to adjust all 152 items by...
3
3439
by: Amy Young-Leith | last post by:
So I'm now inspired to jump on the Web standards bandwagon. I've used CSS for font control for some time, but haven't moved to it for positioning. Great time to kill two birds with one stone, so I jump in. I create a needed page and it's fantastic when viewed in my browser of choice, Mozilla Firebird. So I tinker with it, then switch over to IE and view it and... it renders as the XML tree. I tinker a bit, then finally I just open a...
10
2088
by: oopaevah | last post by:
When using innerHTML to insert xhtml IE5+ mangles the xhtml completely. For example it removes the quotes from attributes. It also does other ridiculous things like on a <div> it will insert the enbedded style="DISPLAY:BLOCK"! This is a documented feature you can find in msdn. Is there a way to disable this quite appalling feature?
16
7106
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe"); MyDiv.appendChild(iframeObject); var data = "<html><head><title>testing</title></head><body>data</body></html>" iframeObject.contentDocument.open(); iframeObject.contentDocument.writeln(data);
4
2008
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation is essentially to just copy the 'model' database and give it the name of the application with the extension ".tmp". Then code opens the temp database and links to the tables. This has always worked flawlessly until today. Today, I needed to...
6
5039
by: Todd A. Anderson | last post by:
I have a function foo of which I need to get the address. The problem is that when you say "&foo" (or just foo for that matter), you get the address of this function's entry in a jump table and not the address of the function itself. Are there any BKMs for getting the real address or am I going to have to write a function that looks to see whether the address is a jump instruction and if so compute the real address from the jump target?...
30
2258
by: abracad_1999 | last post by:
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"?>'; ?>
3
10180
by: wavedancer | last post by:
I am trying to get a link back to the top of the page I'm on. For the anchor, I've got <a name="topofpage" id="topofpage"></a> and for the link I've got <p><a href="#topofpage">back to the top</a></p> It works (or maybe it doesn't work!) in IE6/Win and IE5.2/Mac, but in Safari it will only take me right back to the top of the page if I put the anchor tag in the <body> and before the first <div>. If I put it inside an existing <div>...
0
9148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9012
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7708
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4611
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3034
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2319
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.