[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Lesson Learned: Use namespaces for both markup and data

  • From: Liam Quin <liam@w3.org>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Sun, 9 Aug 2009 16:54:13 -0400

Re:  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"
  xmlns:iso="http://www.iso.org/iso/english_country_names_and_code_elements">
    <c:country>iso:Afghanistan</c:country>

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
<countries
  c="http://www.itl.nist.gov/fipspubs/fip10-4.htm">
  xmlns:iso="http://www.iso.org/iso/codes-pour-le-tourisme"

  <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

-- 
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.