Namespaces and validation

Dear editors,

at first I have to say that I think that namespaces are a great idea as
they greatly improve the useability of XML when creating complex
documents including formulas, graphs and other embeded objects. On the
other hand I was very disappointed to see that a major benefit of XML
was given up with this specification: The capability to validate the
document based on DTDs, without knowledge of the semantics of the tags.
Instead, one can create a document like this:

<?xml version="1.0"?>
  <!-- both namespace prefixes are available throughout -->
  <bk:book xmlns:bk='urn:loc.gov:books'>
      <bk:title>Cheaper by the Dozen</bk:title>
      <td xmlns='http://www.w3.org/TR/REC-html40'>This is some text</td>

  </bk:book>


which  - I hope you will agree - does not make any sense, since the <td>
tag should never appear outside of a html table. Similar examples can be
constructed for adding senseless attributes from other namespaces.
Therefore I think it is very important to improve the specification.
Rules should be included which extend DTDs so one can specify, at which
locations foreign 'sub' -documents may be inserted and which tags of a
DTD may serve as a roots for the embeded documents.

I could imagine a similar mechanism for that like the one which was
defined for the 'white space' handling in XML documents. Perhaps one
could setup some abstract identifiers (like notations), which work like
a link between the outer and inner (embeded) document. By assigning such
an identifer to an element in different ways, one could tell the
validator either, that a document of that 'type' may be inserted in the
element's contents, or that the element itself serves as a root of such
a document.

Even if you don't include any rules concerning the validation of
documents which use namespaces, it would be a good idea to add some
comments about your future plans regarding this topic.

Just my two cents...

Sincerely

Klaus Malorny

Received on Wednesday, 5 August 1998 17:13:57 UTC