Andy said:
IE isn't compatible with conformant XHTML,
As I see it, this is the biggest disadvantage of XHTML. If, for the sake
of discussion, we ignore that fact, I really don't see any other
disadvantage of XHTML.
Two pages for the same content is a waste of effort. It hurts server
load and cache performance.
Yeah, I agree on you on this. For this transformation I'm loosing about
5 ms per page. Even though it's not much, when multiplied by number of
page hits, it could be significant. On the other hand, I'm using
significally more time on database connection and data retrival, so at
the end this doesn't sound so bad.
As there's no advantage to serving this XHTML, why do it?
I disagree with you on this. I see the strict syntax of XHTML (XML) as a
good thing. If we look at the page solely as the static final product,
then yeah, it's pretty much the same weather I use HTML or XHTML. But in
a long run, it might be easier to use DOM in JavaScript and to reuse code.
It's pretty much the matter of a choice. For instance, some might like
the fact of the loose type definition in JavaScript because they don't
have to worry about defining the type, but I like strict type
definition. Other example is try - catch block. You can write your
program without any of them but they bring some extra benefit to your
code. The same is with HTML. Sure, you can write any XHTML document as
HTML, but XHTML have some benefits because of the strict syntax and
making XHTML code clearer.
Until you can arm-wrestle Jukka and win with your convincing
justification of XHTML, then you shouldn't use it. I don't deny the
existence of appropriate uses for it, but they're rare and require
skill. If you can't demonstrate this, you're better off avoiding it.
Strict syntax. The major disadvantage of XHTML is lack of support in
some browsers.
* No more XHTML (1.0) Transitional, XHTML 1.1 is all "Strict"
I was writing Strict code before, so I don't take this as a bad thing.
The thing I missed on a few occasions is a Frameset DTD (for some
internal use).
* No more Appendix C, so you _cannot_ serve conformant XHTML 1.1 to IE
and have it work. You just can't do this. If you try, you're no longer
conformant.
As I understood from Jukka's last post and as I read from the XHTML 1.1
(draft) page, the problem is solved (IE and similar browsers get tag
soup, but they display the page).
* XHTML 1.1 is sniffy about style attributes (can't remember if it's
formally deprecated or just disapproved of).
Sorry, I didn't follow you on this one.
Look up the <xsl
utput> element, or simply add this to your
stylesheet:
Didn't know about <xsl
utput>. Don't think I'm gonna use it, but thanks
for the info.
I don't see a point in HTML tags like <address> and some others. OK, we
have a tag to use to write addresses, but what's with the <phone> tags?
I find <address> and some other tags totally useless.
One last thing. What do you see as a biggest disadvantage of creating
your own XML Schema for the "HTML"? I created a small test page months
ago and tested it in IE and FireFox. Basically, this is the story: I
create XML Schema, create XML document and XLST file that transforms my
XML to XHTML. It's working fine, but I'm concerned about downsides of
making those pages public. I think I can count off all mobile devices
then, can't I?