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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Lesson Learned: Use namespaces for both markup and data

On Sun, Aug 09, 2009 at 11:25:46AM -0400, Costello, Roger L. wrote:
>     Namespaces are not just important for markup, 
>     they are also important for data. 

I don't agree with this.

Scope and context are important for names and data.
You can use namespaces (if you are careful) to indicate
scope, in XML, and, to some extent context.

In your example,
<c:countries xmlns:c="http://www.itl.nist.gov/fipspubs/fip10-4.htm";

you have lost something important: the name of the country is not
iso:Afghanistan.  Now, every time you want to display the
country name, you need to do string processing.  Note also that
the country names are not NCNames - e.g. they can contain spaces.

If you're going to do this, next you'll be doing xdt:6 for "six".

Better might be just

  <country iso:code="gb">The United Kingdom of Great Britain and
  Northern Ireland</country>

If in fact NIST and ISO do not define an XML vocabulary, you
should use a namespace URi that you own and control; you could
also consider Dublin Core in this particular case, or some other
widely-used metadata representation for places.

Just because a cup of coffee gets you going in the morning,
that's no reason to bathe exclusively in coffee :-)


Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS