Sign In/My Account | View Cart  
advertisement

Article:
 Cracks in the Foundation
Subject: namespaces: we shouldn't be forced to pick them
Date: 2006-12-01 11:35:26
From: rp_

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.



Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • namespaces: we shouldn't be forced to pick them
    2008-02-16 07:39:31 madscmhansen3@yahoo.com

    One mechanism for declaring and/or redeclaring namespaces outside of the XML documents we want to apply them to is through the use of general entities.


    Ken Holman explains the technique in his Global large-scale stylesheet deployment case study: http://www.idealliance.org/proceedings/xml05/ship/18/Holman-18.HTML#d0e333


    The technique was implemented for an extensive stylesheet library and provided the ability to modify the namespace for the entire library by changning one line in the entity file.


Sponsored By: