473,732 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>Untitl ed 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 1798
VK wrote:
Say

<html>
<head>
<title>Untitl ed 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 "evangelist ic 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.v k.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
16907
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 many PHP jobs?
14
3443
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
4686
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 (PHONE_LIST, "_+")) { Console.WriteLine (phoneNumber); } } Output: 495.1000
3
3719
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 visitor's browser's capabilities. The Javascript then calls main.php, passing back its findings with a GET string; main.php saves the data as a visitor's profile in $_SESSION elements. It then serves up home.html and any further pages requested...
13
7732
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. They don't actually protect any encapsulation or anything, and for all the actual protection they offer, they might as well be public. For example: class B { protected:
13
2233
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 kind of war - just wanted some good examples of a well written Python app to read.) Thanks! -Ben P.S. - Sorry if this has been discussed at length before - I searched the group before I posted, but didn't come up with what I was looking
16
1866
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 those lines. Is this well-defined according to the standard? I've read a little
6
2720
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 this is not the usual negative-values-and-% question -- the problem here is that the corresponding signed division, INT_MIN / -1, overflows. Thus I don't see what use a%b = a-(a/b)*b can be here.
1
1707
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: http://support.microsoft.com/kb/307379/en-us?ln=en-us&sd=gn&fr=0 But how can we determine if a xml is well-format? like the xml below is not well format(the end tag of ProductName) <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE Product SYSTEM "Product.dtd">
113
5296
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 the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platform compatibility problems. So does M2Crypto. The built-in SSL support is weak. Even basic sockets don't quite work right; the socket module...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.