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] Help needed in namespaces!

[ Lists Home | Date Index | Thread Index ]

Doug,

I don't know if any one could have explained me about the XML Namaspaces as
you did, WOW! Brilliant example.  I really thank you for making me
understand about the XML Namespaces.

Thank You
Sathish

-----Original Message-----
From: Doug Schepers [mailto:doug@schepers.cc] 
Sent: Thursday, September 29, 2005 1:39 PM
To: 'Satish S'; xml-dev@lists.xml.org
Subject: RE: [xml-dev] Help needed in namespaces!

Hi, Sathish-
 
| Can any one tell me what the meaning of namespaces in XML and its use. 
 
The basic idea really easier than you might think. The metaphor I use is
that namespaces are the family name of an element or an attribute. You might
know 2 people named Joe, one at the office and one in your neighborhood.
Normally, it doesn't really matter what their family name is... The people
in the office know who you mean when you say, "Joe," and the people in your
neighborhood know who you mean when you talk about the other. But when you
are speaking to someone who knows both Joes, you have to clarify if you mean
"Joe Kramer" or "Joe Yu." In a document with only one namespace, there's
less need to specify which family (XML dialect) an element or attribute
belongs to, but when you mix elements or attributes from 2 different
families (dialects), you need to specify which ones belong to which family
(or dialect, or namespace). Since it's increasingly likely these days that
you will have mixed-namespace documents (also called Compound Documents),
it's a safe bet to always include all the namespaces used in the root of the
document.

A simple example might be a document with both HTML and FurnitureML, where
both of them have a <table> element. You would need to say <html:table .../>
or <furniture:table .../> to tell the UA (the browser) which one you mean.

Note that if the attributes of an element are in the same namespace as that
element, you do not need to preface them with the 'mynamespace:' prefix;
otherwise, you do.

I hope that's simple enough for you, and isn't too egregiously erroneous
that I offend someone else. ;)

Regards-
Doug

doug . schepers  @ vectoreal.com
www.vectoreal.com ...for scalable solutions.




-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>




===========================================================
***Disclaimer***


This email, and any attachments ("this email"), is confidential. If you are not the addressee
please tell the sender immediately, and destroy this email without using, sending or storing
it. Any opinions, express or implied, in this email, are those of the sender, and are not
necessarily approved by Hurix Systems. Except as expressly stated, this e-mail should not be
regarded as an offer, solicitation, recommendation or agreement to buy or sell products or
services, or to enter into any contract. E-mail transmissions are not secure and may suffer
errors, viruses, delay, interception and amendment. Hurix Systems does not accept liability
for damage caused by any of the foregoing.

HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS
============================================================




 

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

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