How do XML NameSpace aware processors react to NS definations?

Ronald Bourret rbourret at ito.tu-darmstadt.de
Tue Nov 17 10:32:40 GMT 1998


Murray Altheim wrote:

> I don't believe that namespaces and validation are compatible, except in 
> the most trivial of cases. I've been making this statement for quite 
> 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, 
> but gave up in frustration. My understanding is that well-formedness is 
> generally all one would expect of a document that combined multiple 
> 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 
> now I wouldn't expect namespaced documents to be type-valid. 

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

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list