You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ramin Raybod <r_...@isc.iranet.net> on 2002/04/30 14:06:03 UTC

xml namespaces

Hi,
I'm a newcomer to XML.
The current syntax for a namespace is a two level structure: a prefix as a URI to indicate a namespace and a local name. This syntax implies there would be no duplicate names in a namespace. Wouldn't it be more flexible if we could have a nesting in namespaces? Something like inheritance in objects world? So we could have duplicate names in each subset unified by their parents and too many other benefits.
Sorry if I'm going too far:)
Ramin

Re: xml namespaces

Posted by Scott Vachalek <sc...@Integrisoft.COM>.
This is probably the wrong list if you want a really accurate history of the answer, or really want to push for a change.  Actually, it's probably the wrong list altogether since it doesn't have anything to do with Xerces specifically.

But here's a couple of quick thoughts from someone's who's been using XML for a couple of years:

1. You can have something of an inheritance in that namespace B can include everything in namespace A and more.  (Just define it with the same elements, plus.)  

2. In terms of validation, both DTDs and XML Schema have ways of incorporating other DTDs/schemas that make the above step easier.  

This works with a single name for the namespace, just like in Java you only need one name for the class.  I'd recommend taking a good look at XML Schema, you can probably get it to do what you need, even if the syntax isn't exactly what you were looking for.

--Scott

  ----- Original Message ----- 
  From: Ramin Raybod 
  To: xerces 
  Sent: Tuesday, April 30, 2002 5:06 AM
  Subject: xml namespaces


  Hi,
  I'm a newcomer to XML.
  The current syntax for a namespace is a two level structure: a prefix as a URI to indicate a namespace and a local name. This syntax implies there would be no duplicate names in a namespace. Wouldn't it be more flexible if we could have a nesting in namespaces? Something like inheritance in objects world? So we could have duplicate names in each subset unified by their parents and too many other benefits.
  Sorry if I'm going too far:)
  Ramin