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 ]


Ah, at last a simple,  non philosophical, xml-development question.

> -----Original Message-----
> From: pradeep bhat [mailto:pradeepbhat@slk-soft.com] 

> Namespaces was introduced to distinguish duplicate attributes 
> and elements.
> We associate URI with elements and attributes to distinguish duplicate
> elements and attributes.
> 
> 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 to use namespace to distinguish duplicate elements and
> attributes.

If the hierarchical structure means that the <Name> under <Customer> is
the customer name, then your partner should probably change it in
<customerName> and the one below <Product> in <productName>. That will
serve  as self-describing markup. Namespaces where introduced to resolve
conflicts between same nodeNames in different vocabularies when
different XML files are merged etc. Your problem is wrong design as far
as I understand.


>  The way to distinguish between the 2 <name> tags is with 2
> different URI. 

See above.

>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)?

There is no standard procedure for the above, only best practices
(unless you have a formal agreement with your partner). Besides, you
don't need it.

Cheers, 

Manos




 

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

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