473,396 Members | 1,760 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,396 software developers and data experts.

Can well-formed but non-validated XHTML have extra namespaces?

VK
Can well-formed but non-validated XHTML have extra namespaces?

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?

Nov 20 '06 #1
4 1785
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/
Nov 20 '06 #2
VK

Martin Honnen wrote:
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.
"Mentally" I don't have them :-): but you know well yourselve that
"HTML has no namespaces", "XHTML has namespaces" is a pure mind
abstraction imposed by W3C, physically namespaces are here and
perfectly usable in either case. This way I wouldn't care - as I didn't
before - but I've got a specific project right now and I'd like to
prove the "evangelistic purity" of the solution (if possible) or to
polish the narrow corners in advance (if the first is not possible).
And your elements are in no namespace as the
<html xmlns="http://www.w3.org/1999/xhtml">
namespace declaration is missing.
Right, my bad (was doing the sample in some rush).

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:vk="com.vk.foobar">
<head>
<title>Title</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>Content</p>
<vk:foo>Content</vk:foo>
</body>
</html>

- served as text/html (and no worry about the parser trigger, that's my
side doing).

So is it standard-compliant by W3C papers?
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.
You mean to say that any XHTML document - even if well-formed, valid
and served with the appropriate Content-Type - is not strictly
conforming if it contains fragments from MathML or SVG namespace? It is
hard to believe, so I must be did not get right what you are saying,
sorry.

Nov 20 '06 #3
VK wrote:
You mean to say that any XHTML document - even if well-formed, valid
and served with the appropriate Content-Type - is not strictly
conforming if it contains fragments from MathML or SVG namespace? It is
hard to believe, so I must be did not get right what you are saying,
sorry.
I have quoted from the XHTML 1.0 specification, namely section 3.1
<http://www.w3.org/TR/xhtml1/#normative>.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 21 '06 #4
VK
You mean to say that any XHTML document - even if well-formed, valid
and served with the appropriate Content-Type - is not strictly
conforming if it contains fragments from MathML or SVG namespace? It is
hard to believe, so I must be did not get right what you are saying,
sorry.
I have quoted from the XHTML 1.0 specification, namely section 3.1
<http://www.w3.org/TR/xhtml1/#normative>.
<q>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.<q>

Holly... so this crap they were trying to feed the world for 7 years...
Ok.... I have no comments... I'm leaving... I'm already left..

Nov 21 '06 #5

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

Similar topics

45
by: Market Mutant | last post by:
I just wonder job selections, job openings and salary level of PHP programer or Perl programmer comparing to Java programmers. Is Java programmer's salary has a minimal of 60K in US? Are there...
14
by: delerious | last post by:
Is there a list of well designed web sites anywhere? Or could you please list some that you think are well designed? Thanks!
58
by: Jeff_Relf | last post by:
Hi Tom, You showed: << private const string PHONE_LIST = "495.1000__424.1111___(206)564-5555_1.800.325.3333"; static void Main( string args ) { foreach (string phoneNumber in Regex.Split...
3
by: Will Woodhull | last post by:
Hi, I'm new here-- I've been reading the group for a couple of days. Nice group; I like the way n00b33 questions are handled. I've been using a Javascript routine in index.html to determine a...
13
by: Adam H. Peterson | last post by:
I just made an observation and I wondered if it's generally known (or if I'm missing something). My observation is that static protected members are essentially useless, only a hint to the user. ...
13
by: Ben | last post by:
Could anyone suggest an open source project that has particularly well written Python? I am especially looking for code that people would describe as "very Python-ic". (Not trying to start any...
16
by: Tom Zych | last post by:
Hi. I've been using code like this: *p++ = 'x'; *p++ = *q++; for a long time now. It works. The code below compiles with no warnings and runs correctly. Even splint doesn't complain about...
6
by: M Welinder | last post by:
The title more or less says it all: in C99, is the value of INT_MIN % -1 well defined (when performed as signed integers) under the assumption of two-complement representation. Note, that...
1
by: ad | last post by:
I want to determinate if a xml is well-format and valid before export it to database. We can determinate if xml is valid from the article:...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.