|
Posted by Benjamin Niemann on 07/18/06 20:58
Michael Laplante wrote:
> "Toby Inkster" <usenet200607@tobyinkster.co.uk> wrote in message
> news:b5nvo3-o4p.ln1@ophelia.g5n.co.uk...
>> Michael Laplante wrote:
>
>> The only real difference is that XHTML has to obey XML rules, whereas
>> HTML doesn't. The places it manifests itself are: [etc]
>
> Okay, that seemed easy enough. Why does the issue seem to generate this
> huge amount of controversy?
Many people like debating which one is better. This is just another
incarnation of flamewars like "Windows vs. Linux", "Perl vs. XY", "Amiga
vs. Atari" and so on.
A specificly controversial topic is Appendix C of the XHTML1.0 specification
(serving XHTML1.0 as text/html), which exploits a bug in (almost) all
existing user-agent implementations (the '/>' in empty elements, which
according to SGML rules, which should be applied to text/html documents,
has a different meaning, but is treated as '>' by tag-soup parsers).
> I'm using an xhtml template for a project and
> am now wondering if there are some major issues I should be aware of.
XHTML has the advantage that you can use lots of generic XML tools to do
your processing on the server-side, e.g. XSLT.
If you are sending the rendered document to the user-agent, you have either
to transform it to HTML or to Appendix C compliant XHTML (or send a 'Please
upgrade your browser' to all IE users).
A generic XML renderer that does not know the special rules of XHTML will
either render all empty elements as "<foobar/>" or "<foobar></foobar>"
(which are equivalent according to XML rules). But empty elements like IMG,
META, BR, .. need the first form (with an additional space before
the '/>'), whereas SCRIPTs pointing to external script files needs the
seconds form.
I'm using lots of XML (XHTML being just a part of it) on the server-side. As
the final step in the processor-pipe there is a 'XHTML to HTML' module. As
explained above you need such a module anyway and a 'XHTML to HTML'
transformation is not really more difficult than a 'XHTML/xml to
XHTML/app.c.' transformation. And for the record: I'm on the 'stick with
HTML4' side :)
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
[Back to original message]
|