Sign In/My Account | View Cart  
advertisement

Article:
 XML Namespaces Don't Need URIs
Subject: Misdirected complaints
Date: 2005-04-23 17:21:07
From: afettes

Hi Mike,


Three points:


1. In the past I have found it very useful to copy/paste that annoying URI into my web browser. A thoughtful developer/organisation will put up information regarding their specification at that location. This is very useful symantic information. Removing the URI removes this potential. This was presented by Tim Bray at a talk a couple of years ago in Vancouver (http://www.vanx.org) as "good practice"; I whole heartedly agree with this statement.


2. I do believe that you are misdirecting your criticism. If you feel that certain URIs are long and hard to remember, maybe you should direct this complaint at the organization that created that URI? As an XML language author you have full control on exactly what your URI will look like. Not every XML document conforms to a W3C specification...


3. Your point about the W3C not releasing a second specification of a particular language is moot. SVG 1.2 is currently in the works. In this case, both languages will have a root element of <svg/>. However, there will be large additions to the language from SVG 1.1 to SVG 1.2. Technologies such as sXBL will have significant ramifications as to how SVG viewers will interpret the graphic.


Cheers,
Alastair


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Oldest First
  • Misdirected complaints
    2005-04-23 19:54:03 mikeday [Reply]

    Hi Alastair,


    Your first point about the documentation aspects of namespace URIs is reasonable, but I am not sure that it outweighs the inconvenience of namespace URIs. I think that Google is a more convenient method of finding documentation, myself.


    It is true that the examples I criticised were all from the W3C, as those namespace URIs are more widely known and used. However, the problems are not specific to the W3C's choice of URIs. The choice of URIs as a syntax and the emphasis on globally unique names is the problem.


    The point about SVG actually reinforces what I was saying: the new version of SVG still uses the same namespace as the old version, as the semantics of most elements has not changed. It would be odd indeed for the W3C to create a new XML language called "SVG" with entirely different semantics to the existing one. That would justify, or in fact require, a new namespace, but no one would ever do something so confusing. (Um, the example of RSS proliferation might prove me wrong here :)

    • Misdirected complaints
      2005-05-09 09:06:08 afettes [Reply]

      Hi Mike,


      Here are my rebuttals:


      1. Truth does not always lie in Google. What happens if that google bot has not cached the required document? What about if the document is in a intranet that is not open to the famed google bot? The company I work for is massive and may define a large number of XML documents, each with a local *intranet* defined URI describing the schema.


      2. I'm not sure why having globally unique names is a bad thing? I feel it is a great thing. It could be deemed similar to DNS or a tangible housing addresses (postal code, etc). Once again to that intranet defined language. Say my languages are defined as follows:


      "http://language1.mydomain.com/v1"
      "http://language2.mydomain.com/v5"


      These do not seem so complicated. They are descriptive, locally accessible though not google-able, and easy to use and remember.


      3. True that the syntax for many elements have not changed. However, some have. A perfect example is the text element. In SVG 1.2 the text element has an attribute editable. If this is set to true, then the user can edit the text as in a text input box. This is not available in SVG 1.1. Therefore if the SVG is labelled as SVG 1.1 then there is no text editing capabilities and thus must be treated differently from SVG 1.2. This distinct difference requires some method of specifying exactly which version the source document is written in. Hence the use of a namespace (with the same prefix of course as it is still SVG).


      I feel that a good contribution that your article could have made would be of forming a standard way of addressing URIs in namespaces. Similar to coding standards in C++ or Java. Show a best practices. I would find that very useful.


      Cheers,
      Alastair


Sponsored By: