Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help on XML Namespaces concept

 
Sandy Chang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly are XML Namespaces? How do you declare them and how do you use them? I'm totally confused. Please can someone help me here (maybe point out some web sites to go to for references)? I tried reading the documentation on Namespaces by W3C but got confused even more. Thanks!
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Three best resources:
XML Namespaces FAQ: http://www.rpbourret.com/xml/NamespacesFAQ.htm
Ronald Bourret. Namespace Myths Exploded: http://www.xml.com/pub/a/2000/03/08/namespaces/
ZVON's Namespace Tutorial: http://zvon.org/xxl/NamespaceTutorial/Output/index.html
 
Sandy Chang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot
 
Kennet Svanberg
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None technical view:
Namespaces are just like packages in Java, a way to qualify a tagname and its meaning.
If two partners need to agree on how to use a tag they can create their own namespace.
A namespace usually have a URI that is suppose to be unique. This URI can point to a spec on how to use and interpret that tag but it doesn't have to.
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also confused about namespace.
Here is my understanding:
the advantage of XML over html is the flexibilty of tag, but it can't get too flexible. XML still have certain number of tag just like html, but the number of different tag is very big (perhaps the size of dictionary). All these effort will pay off when do internet searching. The reason it can't get too flexible is that otherwise there is no way to search it.
My confusion is:
URN can be file name, web address, ... etc. I think this still lacks of standardation. A file name could mean the same domain as a web address, but it is in my c: drive. Who else will know it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic