The Artima Developer Community
Sponsored Link

Thinking Upside Down
XML Processors can't Ignore Namespaces
by Andy Dent
June 15, 2006
Summary
Namespace processing seems to be the 'will do later' entry on every XML toolkit author's list. Following from discussion in the recent thread "Simplifying XML Manipulation" I wanted to emphasise that namespaces are the key to reuse in schemas and hence any chance of rich data interchange. Don't ignore them!

Advertisement

Here's the first element showing how many (standardised) namespaces are being used in a typical example of the kind of XML we process.

This is used to represent complex data like assay results of samples taken from boreholes, complete with spatial coordinates and attribution to various parties in the processing chain.

<Report 
 xmlns="http://xml.arrc.csiro.au/adx" 
 xmlns:al="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" 
 xmlns:cil="urn:oasis:names:tc:ciq:xsdschema:xCIL:2.0" 
 xmlns:gml="http://www.opengis.net/gml" 
 xmlns:nal="urn:oasis:names:tc:ciq:xsdschema:xNAL:2.0" 
 xmlns:nl="urn:oasis:names:tc:ciq:xsdschema:xNL:2.0" 
 xmlns:xmml="http://www.opengis.net/xmml" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://xml.arrc.csiro.au/adx
 ..\..\XMML\adx.xsd" id="XX-R923364-12" version="2.0.1">

There is a huge amount of work being done to establish relatively small, reusable XML schemas. The common pattern is:

  1. Identify community needs for shared data
  2. Create instance documents and schemas.
  3. Refactoring - identify portions which are reusable in other domains and pull them out into their own namespaces.

A good example is the Observations and Measurements schema, directly downloadable from http://www.seegrid.csiro.au/xsd/om/ and described in detail at https://www.seegrid.csiro.au/twiki/bin/view/Xmml/ObservationsAndMeasurements

Talk Back!

Have an opinion? Readers have already posted 2 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Andy Dent adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Andy is a free-lance developer in C++, REALbasic, Python, AJAX and other XML technologies. He works out of Perth, Western Australia for a local and international clients on cross-platform projects with a focus on usability for naive and infrequent users. Included in his range of interests are generative solutions, software usability and small-team software processes. He still bleeds six colors, even though Apple stopped, and uses migration projects from legacy Mac OS to justify the hardware collection.

This weblog entry is Copyright © 2006 Andy Dent. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use