Chapter 16.  Namespaces Friendly Tutorial

Prev don't be afraid of buying books Next

Chapter 16. Namespaces
Friendly Tutorial

  • Unique names

  • URI-based namespaces

  • Attributes with namespaces

The Namespaces in XML specification is an extension to XML that answers the burning question: Are we talking about the same subject?

Since anyone can define element-type names, and elements from different documents can be mixed together, we need a way to clearly separate our names from other people's names. We need to have different so-called namespaces.

We do this in the real world all of the time.

What would you do if you needed to refer to a particular John Smith without confusing him with any other John Smith. You qualify the name: "John Smith from London". That sets up a namespace that separates Londoners from everyone else.

If that isn't sufficient then you further qualify the namespace: "John Smith from East London". That makes a namespace that separates Easterners from everyone else. You could narrow it down even more: "John Smith from Adelaide Street in East London". The trick is qualifying names in order to separate them from other names. The separate groups of names are known as "namespaces".

Amazon


XML in Office 2003. Information Sharing with Desktop XML
XML in Office 2003: Information Sharing with Desktop XML
ISBN: 013142193X
EAN: 2147483647
Year: 2003
Pages: 176

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net