• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Namespace

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Group,

What is namespace, please don't poo poo this questions, I have read the first few chapters of 2 recomended books and now I am confused.
Can anybody please explain this to me. I have a very simplistic definition for it, the scope in which the element is valid and can be used to qualify. But the chapters seem to put a lot of importance to it so what am I missing.
P.S, BTW, I am struggling with webservices so I am apolozising for this majorly dumb and fundamental question of mine.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.w3.org/TR/REC-xml-names/

XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references.

<?xml version="1.0"?>
<city xmlns='http://www.cities.org/cityspec-1.1'>
<services><garbagecollection>Trash Co.</garbagecollection></services>
</city>

<?xml version="1.0"?>
<java xmlns='http://www.java.org/javaspec-1.5'>
<feature><garbagecollection>JVM 1.5</garbagecollection></feature>
</java>

Namespaces help to prevent ambiguities.
 
Kay Ra
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you peter, helps to now that I was heading on the right track.

Kay
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kay Ra.

Here is pretty nice article on MSDN site http://msdn.microsoft.com/msdnmag/issues/01/07/xml/
It really helped me to summarize my knowledge about XML Namespaces.

I liked the sample of namespace from that article, when it considered as a set of names that you can give to your children - you would call each one with unique name, which differs from the name on your other children, but not necessary unique among other people in the world =).

Feel free to ask what exactly not clear for you in namespaces.

As for me, for first time, it was not so clear, what is the different between qualified namespace name and QName
 
Kay Ra
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you slavo, that article is very good made namespaces very clear for me. now I can march forward.


kaly
 
    Bookmark Topic Watch Topic
  • New Topic