VK wrote:
Say
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>Content</p>
</body>
</html>
can be considered as well-formed XHTML 1.0, but it is not valid, I
guess, as it doesn't have prolog with DOCTYPE. Does it have any W3C
*specification* obstacles to declare and to contain additional
namespaces besides the default xhtml one?
The meta element suggests you want to serve that markup as text/html and
not as XML (e.g. application/xml) or XHTML (application/xhtml+xml). If
you serve as text/html then you don't have namespaces at all.
And your elements are in no namespace as the
<html xmlns="http://www.w3.org/1999/xhtml">
namespace declaration is missing. So I don't see why that markup is
XHTML 1.0, when parsed by an XML parser the namespace declaration is
essential to have the parser recognize those elements as XHTML elements
(and not as elements in no namespace that happen to have the same tag
names as XHTML elements have).
As for whether or not you are allowed to have elements and/or attributes
from other namespaces depends on what your aim is. The XHTML 1.0 spec
defines "strictly conforming XHTML 1.0 documents" with
"This version of XHTML provides a definition of strictly conforming
XHTML 1.0 documents, which are restricted to elements and attributes
from the XML and XHTML 1.0 namespaces."
It also says clearly:
"The XHTML namespace may be used with other XML namespaces as per
[XMLNS], although such documents are not strictly conforming XHTML 1.0
documents as defined above".
Thus if you want your XHTML documents to be labelled as "strictly
conforming XHTML 1.0" then you are not allowed to use elements or
attributes in other namespaces besides the XHTML 1.0 and the XML (e.g.
xml:lang) namespace.
--
Martin Honnen
http://JavaScript.FAQTs.com/