RE: How do XML NameSpace aware processors react to NS definations?

Ronald Bourret (rbourret@ito.tu-darmstadt.de)
Tue, 17 Nov 1998 10:27:52 +0100


Murray Altheim wrote:

> I don't believe that namespaces and validation are compatible, except =
in=20
> the most trivial of cases. I've been making this statement for quite=20
> awhile now, and have yet to see any response that proved otherwise. I =
tried
> to put together an XML-ized HTML 4.0 and CALS table DTD as an =
experiment,=20
> but gave up in frustration. My understanding is that well-formedness =
is=20
> generally all one would expect of a document that combined multiple=20
> document types, as that is all the syntax currently allows. Some =
discussion
> suggests that a new, non-XML 1.0 schema mechanism may solve this, but =
for=20
> now I wouldn't expect namespaced documents to be type-valid.=20

I think this confuses two points: namespaces and combining DTDs.

Namespaces introduce a two-part naming system where previously there was =
a one-part naming system. There is nothing inherently incompatible with =
this and validation. The problem is trying to get current parsers =
(which were designed to use the one-part naming system) to validate =
documents that use namespaces. This can be done, but is a hack -- as I =
stated in an earlier message, you must construct the DTD and the =
instance document using the same prefixes. (Schema languages get around =
this by eliminating the DTD and introducing a mechanism to declare which =
namespace an element or attribute is in. But, of course, current =
parsers do not know how to use schemas.)

Namespaces do not provide a mechanism for combining DTDs; they merely =
provide a way to differentiate element and attribute names if DTDs are =
combined. Combining DTDs is currently a process that must be done by =
hand and is (unless ANY is widely used) almost certain to result in =
changes to those DTDs. I've never looked at the CALS DTD, but my guess =
is that if you are trying to weave HTML into CALS tables and vice versa, =
this is, as you say, a very difficult task. However, that is the fault =
of those DTDs, not namespaces. (I also think that the trivial reuse of =
DTDs, such as me using your elements for an address or a mathematical =
equation in my DTD for a term paper is likely to be very common and very =
useful in the future.)

-- Ron Bourret