fixing (just) namespaces and validation

David Megginson david at megginson.com
Wed Sep 8 13:04:31 BST 1999


David Carlisle writes:

 > Surely _all_ DTDs do have this problem with the namespace REC.
 > 
 > The documents
 > 
 > <foo:x xmlns:foo="http://here">
 > </foo:x>
 > 
 > 
 > and
 > 
 > <bar:x xmlns:bar="http://here">
 > </bar:x>
 > 
 > are fully equivalent according to XML Namespace REC.

That's because they're different layers.  

Think of RDF; assuming appropriate Namespace declarations, these are
both equivalent in the RDF layer, but not in the XML 1.0 layer:

  <rdf:Description about="http://www.foo.com/123">
   <rdf:type resource="http://www.foo.com/classes/Thing"/>
   <dc:title>The Foo thing</dc:title>
  </rdf:Description>

and

  <foo:Thing about="http://www.foo.com/123" dc:title="The Foo thing"/>

DTD validation is applied to a very low-level layer of XML processing
(essentially, the DOM/SAX layer); Namespaces is concerned with a
higher layer, and RDF, with a higher layer still.

There is usually a many-to-one relationship as you go up to more
abstract layers: many different sequences of characters can be
interpreted as the same XML document, many different XML documents can
provide the same Namespaces (or Architectural Forms) view, many
different Namespaces views can provide the same RDF view, etc.

The point is that a single sequence of characters cannot represent two
different XML documents, nor can a single XML document represent two
different Namespace views, nor can a single Namepsace view represent
two different RDF views.


All the best,


David

-- 
David Megginson                 david at megginson.com
           http://www.megginson.com/

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/ and on CD-ROM/ISBN 981-02-3594-1
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