Sign In/My Account | View Cart  
advertisement

Article:
 XML Namespaces Don't Need URIs
Subject: Not so fast...
Date: 2005-04-14 10:23:45
From: ejain

You need to be real careful here that you don't complicate things while trying to simplify.


Let's say I create a simple XML-based format for a small project I am working on. I decide to create a namespace for my elements, perhaps because I want to reuse elements from other schemas, or I want to encourage others to reuse or embed elements from my schema.


Now I'll either have to choose three meter long prefixes to ensure that there won't be any conflicts with future prefixes (or currently used prefixes I am not aware of).


A more reliable approach would be to have some kind of registry system. But such a thing could take years and tons of money to set up and gain legitimacy. And people may start asking why go through all this trouble, when there already is a solution that reuses existing infrastructure (i.e. the domain name system; I bet that wasn't cheap to set up :-)


Besides, after a year or two you wouldn't be able to get any easy to remember prefixes with less than five letters...


An unrelated comment: If you really don't like using URLs as namespace identifiers, you can use URNs.


Previous Message Previous Message   Next Message Next Message


Sponsored By: