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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Looking for an example of a name colliision

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: Re: [xml-dev] Looking for an example of a name colliision
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • Date: Mon, 2 Jun 2003 16:49:44 +1000
  • References: <ab7bdvs3gol4j4trlefsiq6g4bfbaou70f@4ax.com> <3ED5B096.9080102@textuality.com> <3ED6062E.4080403@bitworking.org> <014f01c326ba$5d609890$b6f5d3ce@L565> <3ED860C6.5060207@dehora.net>

From: "Bill de hÓra" <bill@dehora.net>

> Does anyone have an example of a collision that can only be solved, 
> or even best be solved with XML Namespaces? A neccessary condition 
> is ideal, but examples where namespace represents an optimal design 
> decision will do.  

A client has dozens of databases.  Some of these were derived from
the same ancestor database but moved to different geographic locations and
independently maintained and augmented. The semantics and
date-conventions used in commonly-named tables and fields in each database 
were not necessarily the same.  The client wants to merge the
data into a new unified database, and use XML as the interchange medium.

As a first line of defense, all the different databases are allotted
different namespaces, so there is no capacity in the XML system
for (e.g. by a programming mistake) merely copying over data from
one data: movement of data requires a change of namespace
as part of an explicit mapping.

So the abstract solution here is to adopt a two-level hierarchical name.
Even better if the upper-name is a first-class object in the system 
(i.e. one that can be manipulated by its own operations not
requiring string operations on the name, and which has a
special status.)    XML namspaces provide this.

To an extent, aguments about whether namespaces are necessary for
anything can miss the point as comprehensively as can arguments on whether
attributes, comments, PIs and entities are necessary.  Such arguments are like 
whether Java's inner classes or "protected" status or packages are necessary:
even classes are not necessary, in the sense that the power of C with no classes
is no less than the power of Java with classes, but classes provide first-class 
embodiments of the analysis used. That is all namespaces need to do:
if namespaces can provide a syntactic reflection of some useful analytical feature
they are useful for programmers as a matter of craft and prudence. 

Fielded names have a good history and are useful. Namespaces are just a
baroque, bureaucratic kind of fielded name. That namespaces are built into XSLT, 
for example, is a compelling reason to use them in most cases rather than
rolling your own fielded name.

I think some of the comments against namespaces start from the straw man that
namespaces must solve modularization problems. But that is like expecting
XML to solve data interchange problems:--a syntax is a vehicle for an analysis/solution
not the analysis/solution itself. 

The point is how to make large information systems seem like they are clear and
show that they are under control: so that names suggest and reinforce the desired 
system-analysis to programmers.  It is like my comments on quality assurance
last week: using namespaces won't guarantee fewer bugs; but they can be used
to make interfaces more explicit by grouping and separating names.
Rick Jelliffe


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

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