OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Namespaces and XML validation

[ Lists Home | Date Index | Thread Index ]
  • From: "David G. Durand" <dgd@cs.bu.edu>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Tue, 11 Aug 1998 13:10:38 -0400

At 10:36 AM -0400 8/11/98, John Cowan wrote:
>But note that Java uses the model of the old draft: all minimization
>declarations ("import" statements in Java jargon) must appear at the
>beginning, and are global to the document.

The equivalent to this policy for XML would be for the "minimization
declarations" to be local to the _entity_. This idea was discussed, but
found lacking. The equivalent to the old mechanism would be if a
declaration in one storage unit (Java file) could affect code in other
storage units (Java files). In XML, under the original proposal, the root
entity was privileged and the only one that could declare prefixes; no way
was provided to prevent those prefixes from colliding with prefixes in
other external entities.

A Java file isn't a complete Java program, any more than an XML entity is a
complete document. Careful consideration of the implications of adopting
entity-based scoping led to the conclusion that it's more confusing, and
harder to implement on top of things like SAX.

Local declarations _allow_ the avoidance of prefix conflicts without
_requiring_ any problems in validation. There's a tradeoff to be made. One
can even keep validation and local declarations, if say, a particular
element (say <Dublin:metadata>) is always intended to hold information in a
particular namespace. The element could have a #FIXED declaration in the
DTD (or internal subset) and still validate just fine.

Global declarations can still cause problems with validation, but _don't_
provide any way to manage prefixes to avoid collisions,  especially in the
case where validation is not an issue. The level of effort required for
validation is higher, and it's certainly not the case that namespaces will
_allow_ lots of incorrect _valid_ documents. They may make some "correct"
documents invalid, but that was always a potential problem with namespaces,
especially when used as an instance-fragment combining mechanism.

  -- David

David Durand              dgd@cs.bu.edu  \  david@dynamicDiagrams.com
Boston University Computer Science        \  Sr. Analyst
http://www.cs.bu.edu/students/grads/dgd/   \  Dynamic Diagrams
--------------------------------------------\  http://www.dynamicDiagrams.com/
MAPA: mapping for the WWW                    \__________________________

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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS