|
The one problem I see with namespaces is that it must be decided within an XML document which namespaces it uses. But when we start developing our XML-based document formats and software that depends on them, we usually don't know what would be a good name to pick, and we don't care which name to pick, either. The adopted solution was to suggest a naming convention (the use of URIs) that would make it easy for most people to pick something unique. This led to the problem that URIs already have implied semantics attached to them. But perhaps the whole approach of forcing XML document designers to pick a specific namespace right from the start is wrong. We have to pick a namespace and hardcode it into all of our XML documents, then make all of our XML processing software aware of the namespaces we use before it will work correctly. For example, my XSD and your RNG for our common documents must agree on the namespaces used in them. But at the time you write your RNG you may not have decided whether or not your documents and mine will be compatible, or to what extent. So the real problem is not that picking URLs for namespaces is confusing, it's that we have to pick namespaces prematurely.
What might help is a mechanism by which we can declare or redeclare our namespaces outside of the XML documents we want to apply them to. Some kind of "namespace override" mechanism, like the namespace aliasing in XSDs, but more general. I don't know if anything like that exists, but it would certainly help me, as an application developer, to provide better operability within the XML processing tools I deal with.
|