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

Hierarchical namespaces?

  • From: Joe Lapp <jlapp@w...>
  • To: xml-dev@i...
  • Date: Wed, 29 Dec 1999 20:44:58 -0500

hierarchical namespaces
I've been thinking about the utility of naming all elements and most
attributes using a namespace-URI/local-name pair.  Let's denote such a
name as (namespace, local-name).  (I say "most" attributes because it
won't name anything in the per-element-type partition.)  Seems to me
that filtering operations would commonly extract names belonging to a
particular namespace, so requests for (namespace, *) might be pretty
common.  Let's look at this more closely...

Suppose I'm defining elements that describe electronics parts.  I'm
going to want to organize them hierarchically.  For example:

  www.parts.com/computer/memory/sram
  www.parts.com/computer/memory/dram
  www.parts.com/computer/cpus/intel
  www.parts.com/computer/cpus/amd
  www.parts.com/stereo/speaker/surround
  www.parts.com/stereo/speaker/subwoofer

etc.

It may make sense for one application to examine all computer parts,
another to examine all computer memory parts, and so on.  If I want all
memory parts I have to know all the pertinent namespace URIs.  If I
know that the URIs are structured hierarchically, I could do a wildcard
search on the URI itself -- assuming I had a tool that let me do so (do
any yet?).

But because URIs allow this, the next guy organizes his namespaces
differently:

  www.nextguy.com/computer-memory-sram
  www.nextguy.com/computer-memory-dram
  www.nextguy.com/computer-cpus-intel
  www.nextguy.com/computer-cpus-amd
  www.nextguy.com/stereo-speaker-surround
  www.nextguy.com/stereo-speaker-subwoofer

And the next next guy does so as follows:

  www.nextnextguy.com/computer?memory=true+type=sram
  www.nextnextguy.com/computer?memory=true+type=dram
  www.nextnextguy.com/computer?cputype=intel
  www.nextnextguy.com/computer?cputype=amd
  www.nextnextguy.com/stereo/speaker?surround
  www.nextnextguy.com/stereo/speaker?subwoofer

To make namespace filtering work for the general case requires
regex-like matching capabilities.  And regex matching isn't very easy
to optimize for performance (such as via indexing).  It also isn't the
kind of thing we want the average XML user to have to learn -- seems to
me that it would have to bubble up to the user interface, at least on
generic XML tools.

So I'm thinking that we need a *standard* way to organize namespaces
hierarchically, and that we need one before namespace usage is so
widespread that we absolutely have to provide regex support.

But maybe I'm jumping the gun.  I haven't yet heard anyone scream out
in pain, though I'm not sure we should be waiting for pain to come.

--
Joe Lapp              (Looking for some good people to help design
Principal Architect    and build the Internet's business-to-business
webMethods, Inc.       XML infrastructure.  We are 100% Java.)
jlapp@w...           http://www.webMethods.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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.