OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: NAmespaces






Hi Sweta:

If I have read your question correctly, it seems that you are under a common 
misunderstanding about namespaces.  Namespaces do not exist "out there".

A Namespace is really nothing more than a unique string, which in an XML 
document is associated with a local "prefix".  The idea behind namespaces is 
that we would, in an XML document, make this unique string part of an element 
name to make the element name universally unique.

The problem is how to get people to chose unique string for namespaces.  The 
recommendation decided to use the URI mechanism as a standard way of 
generating unique stirngs, with the idea that if you only used URIs (or URLs) 
which you owned as name spaces, you probably would not duplicate anyone 
else's namespace.

Namespaces are a second use of URIs, not to be confused with their first use 
which is to uniquely identify "places" out there in cyberspace.  the Spec 
says:

 "a URI reference, is the namespace name identifying the namespace. The 
namespace name, to serve its intended purpose, should have the 
characteristics of uniqueness and persistence. It is not a goal that it be 
directly usable for retrieval of a schema (if any exists)."

Perhaps what  you want to do is create a schema that others can use and 
associate a namespace with that schema.  Fi you put your schema on the web, 
then the URL of your schema would work as a namespace.

Regards
Rod


On Thursday 28 June 2001 08:11 am, SwetaG@riskinc.com wrote:
> Hi,
> I know how name spaces are used and how they are declared.The question that
> comes to my mind is that how do i create the namespaces.
>
> Like for the microsoft xdr schemas there is a namesapce called
> urn:schemas-microsoft-com:xml-data where the things are defined.Basically
> what is defined there..the schema tags and vocabulary or its sth else.
>
> Suppose i want to create my own namespaces and want others to use the how
> do i do it??for example i want that there are few elements say
> <book>,<isbnno>,<author> and they are defied in name spaces.So how do i
> define them first of all and then how do i create the namesapce so that
> others can use them.
>
> can anybody answer this question?
>
> Regards,
> Sweta
>
>
>
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org