You are here: Re: very basic question about xhtml « HTML « IT news, forums, messages
Re: very basic question about xhtml

Posted by Andy Dingley on 01/23/06 02:04

On Sun, 22 Jan 2006 16:09:01 -0500, John Salerno
<johnjsal@NOSPAMgmail.com> wrote:

>Ok, I understand that XHTML and HTML are basically the same, but that
>XHTML requires a stricter structure, which it inherits from XML. But
>what is meant when someone says that XHTML *is* XML?

XML is a lower-level protocol for defining things than XHTML is.

XML defines syntactic aspects of the language, such as there being tags,
tags being delimited by "<" and ">" characters, tag names being
case-sensitive, elements being represented by paired or empty tags etc.

What XML doesn't define is the set of tags that can be used, and how
they may be combined. This is defined by XHTML. The overall language
needs an understanding of both XML and XHTML to specify it, and an
understanding of SGML and HTML _as_well_ to really use it wisely.

HTML pre-dates XML and does not use it. HTML is based on SGML in much
the same way that XHTML is built from XML, but HTML actually uses a
subtly simplified SGML that is no longer strictly SGML compliant. For
this reason the HTML specification blurs the distinction a little
between them and must describe things that are part of HTML, even though
a purer form might just have been able to leave those as covered already
by the SGML spec. In general though, ignore this - for most useful
purposes, HTML is built on SGML in just the same way that XHTML is built
on XML.

The current web is not ready for XHTML as an XML language. There is a
kludge by which XHTML may be treated as a HTML language and used by
currently existing browsers (Appendix C of the XHTML 1.0 spec). This
works and is useful, although many hereabouts will claim that it
doesn't.

XHTML is also extremely useful as a pure XML language within your onw
tools, such as content-management systems (CMS). It is _much_ simpler to
build these using XML than to use SGML. It is also easy to turn theis
output into HTML for use on the public web.

It is not possible to extend XHTML. XHTML is already defined by its
specification and DTD. It is possible to extend "XML documents on the
web that are based on XHTML", which is in all practical terms the same
thing you are asking for. However (a terminology distinction) you are
then going to make a document _composed_of_ XHTML and some other XML
schema, you are not extending XHTML itself. An easy technique for this
is XML namespacing.

However (the bad news) this is an XML technique and so only works with
XHTML documents that are XML documents, not the Appendix C XHTML non-XML
documents we've already mentioned as being the only ones that are yet
ready for use on the web. You can still use these techniques, but it's
not simple, much of your audience may have problems with them, and
compatibility issues are significant.

--
Cats have nine lives, which is why they rarely post to Usenet.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация