473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

XHTML served as text/html considered harmless?

Ian Hickson's essay at http://www.hixie.ch/advocacy/xhtml and many
others argue that XHTML served as text/html should be considered
harmful.

I'm looking for any evidence that this is really so. As far as I can
see it is only difficult. Is it harmful if done correctly?
If XHTML 1.0 Strict is served as text/html with a DOCTYPE declaration
but without an XML declaration then it should be rendered in
"standards" mode by current browsers. http://hsivonen.iki.fi/doctype/
It is assumed the the W3C HTML compatability guidelines are followed,
e.g. use <br />. http://www.w3.org/TR/xhtml1/#guidelines

Older browsers such as Netscape 4 are unlikely to lay out the pages
properly. Personally I am happy if the content is rendered legibly in
these cases.

XHTML 1.0 does not hold any great advantages over HTML 4.01 but that
is not relevant to my question.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pe*********@westerngeco.com -./\.- opinion of Schlumberger, Baker
http://petef.port5.com -./\.- Hughes or their divisions.
Jul 24 '05 #1
4 1652


Pete Forman wrote:
Ian Hickson's essay at http://www.hixie.ch/advocacy/xhtml and many
others argue that XHTML served as text/html should be considered
harmful.

I'm looking for any evidence that this is really so. As far as I can
see it is only difficult. Is it harmful if done correctly?


The main point is that it is very hard to do it correctly and most
people end up with doing things which only work as their documents are
parsed by the tag soup parser but break if the documents are parsed by
an XML parser e.g. wrapping script code in <!-- --> comments.
If you have the skills and patience (or the tools) to write XHTML 1.0
that is backwards compatible to HTML then you can serve it as text/html
and as application/xhtml+xml without doing harm.
But often tools know how to produce well-formed or even valid XHTML but
do not implement the backwards compatibility rules, for instance I have
seen a lot of people complain about their XSLT processor creating
totally well-formed and valid XHTML alike
<img src="whatever.gif" alt="whatever"></img>
as that is not backwards compatible. They usually blaim the XSLT
processor for not creating proper XHTML in that case.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 24 '05 #2
On Wed, 6 Jul 2005, Pete Forman wrote:
If XHTML 1.0 Strict is served as text/html with a DOCTYPE declaration
but without an XML declaration then it should be rendered in
"standards" mode by current browsers.


No, it needs additionally to conform to the restrictions in XHTML/1.0
Appendix C.

Jul 24 '05 #3
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> writes:
On Wed, 6 Jul 2005, Pete Forman wrote:
If XHTML 1.0 Strict is served as text/html with a DOCTYPE declaration
but without an XML declaration then it should be rendered in
"standards" mode by current browsers.


No, it needs additionally to conform to the restrictions in XHTML/1.0
Appendix C.


Apologies for my lack of clarity. That was meant to be implicit in my
post. There are also the usual issues of restricting CSS, JavaScript
and DOM to maximize portability between UAs.

Writing such XHTML is difficult. I was asking if it was totally
impractical.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pe*********@westerngeco.com -./\.- opinion of Schlumberger, Baker
http://petef.port5.com -./\.- Hughes or their divisions.
Jul 24 '05 #4
Pete Forman wrote:
Writing such XHTML is difficult. I was asking if it was totally
impractical.


Not difficult - just pointless. What does it gain you, unless it
just happens to be an automatic consequence of your choice of tools?

The difficulty comes when you generate XHTML using XML tools that
don't know or care about Appendix C. In such cases you would need
to post-process with mod_xhtml to ensure what you serve is
compatible with text/html.

--
Nick Kew
Jul 24 '05 #5

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

Similar topics

59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
2
by: mike | last post by:
regards: I follow the following steps to converting from HTML to XHTML http://webpageworkshop.co.uk/main/xhtml_converting My parser is http://htmlparser.sourceforge.net/ Xhtml version is 1.0...
32
by: jp29 | last post by:
My take on problems composing, serving and rendering XHTML documents/web pages: 1. Typical conscientious web authors are producing XHTML documents (Web pages) that feature valid Markup and with...
16
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");...
82
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a...
12
by: Pierre Senellart | last post by:
I am going to teach a basic Web design course (fundamentals of HTML/CSS, plus some basic client-side (JavaScript) and server-side (PHP, perhaps XSLT) scripting). Most of the students do not have...
9
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.