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


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Namespace problem

[ Lists Home | Date Index | Thread Index ]

> I have an element <Name> under <Customer>  and <product> in 
> the same xml file.The problem here is that I receive the file 
> from my business partner.We have decided 

Do you mean "my company has decided", or "we have agreed with our
business partner"?

to use namespace to 
> distinguish duplicate elements and attributes. The way to 
> distinguish between the 2 <name> tags is with 2 different 
> URI. Does this mean we have to agree upon the URI for 
> Customer and product tags?? I want to know whether this means 
> that the 2 URI are fixed(they do not change unless we both 
> agree for  a change)?
Yes, you have to agree the URI. The namespace URI is as much a part of
the name as the local names "customer", "product", and "name".

Don't try to use different namespaces for the same vocabulary in
different applications, e.g. one namespace internally and another for
interchange with your partner. I've seen people try to do this and you
get in a horrible mess.

I'm not sure that using different namespace URIs for customer name and
product name is a good idea. The namespace URI should reflect the naming
authority: who is responsible for defining what this name means? It's
not intended to qualify the context of the name. It's entirely
reasonable in XML to use <name> as a child of both <product> and
<customer>; if you want to keep them distinct, qualify them as
<customer.name> and <product.name>. Don't use different namespaces
unless customer.name and product.name are defined by different naming

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 


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

Copyright 2001 XML.org. This site is hosted by OASIS