W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Re: Question on namespace and schemalocation

From: <Noah_Mendelsohn@lotus.com>
Date: Wed, 24 May 2000 12:53:22 -0400
To: "gmacri@libero.it" <gmacri@libero.it>
Cc: www-xml-schema-comments@w3.org
Message-ID: <OF6C50FE3A.0688BC3C-ON852568E9.005BFA39@lotus.com>

I'm not sure whether you got an answer to this.  Sorry it's taken so long,
but anyway...

First of all, I think your schemaLocation was intended to say:


I presume the http://www.somewhere.org/Examples was just a mistake?    The
schemaLocation then asserts that the schema at
http://www.somewhere.org/Book.xsd is used to define the namespace
http://www.somewhere.org/Book which is the namespace associated with book:.
Presuming the processor follows the schemaLocation hint, it knows (and
verifies) that the correct namespace is being defined.  That's how the
processor knows where to find the declarations.

Your original text is not strictly in error, just improbable.  It says that
http://www.somewhere.org/Book.xsd must be a schema defining namespace
http://www.somewhere.org/Examples.  Bad naming, but not illegal.  Now, it's
possible that something in one of the other schemas you reference is indeed
using a definition or declaration (e.g. a datatype) from that namespace,
but it's not obvious that you intended such usage.

Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142

                    Sent by:                            To:     www-xml-schema-comments@w3.org                                   
                    www-xml-schema-comments-requ        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)                                 
                    est@w3.org                          Subject:     Question on namespace and schemalocation                    
                    05/06/00 08:20 AM                                                                                            

In this example there are three declarations of namespace and two
declaration of schemalocation that are indipendent.

<Library xmlns:book="http://www.somewhere.org/Book"
  <book:Title>Illusions The Adventures of a Reluctant
  <book:Author>Richard Bach</book:Author>
  <book:Publisher>Dell Publishing Co.</book:Publisher>

When I analize this document with an application (automatically),  how I
can understand that, for example, for "Book" element I must search it
in the schema "Book.xsd" and no in the "Person.xsd", to verify  the
validity of this document ?
Thank you for all.
Received on Thursday, 25 May 2000 10:03:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC