- 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
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: xsi:schemaLocation="http://www.somewhere.org/Book http://www.somewhere.org/Book.xsd http://www.somewhere-else.org/Person http://www.somewhere-else.org/Person/Person.xsd" 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 ------------------------------------------------------------------------ "gmacri@libero.it"<gmacri 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" xmlns:person="http://www.somewhere-else.org/Person" xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance" xsi:schemaLocation="http://www.somewhere.org/Examples http://www.somewhere.org/Examples/Book.xsd http://www.somewhere-else.org/Person http://www.somewhere-else.org/Person/Person.xsd"> <BookCatalogue> <book:Book> <book:Title>Illusions The Adventures of a Reluctant Messiah</book:Title> <book:Author>Richard Bach</book:Author> <book:Date>1977</book:Date> <book:ISBN>0-440-34319-4</book:ISBN> <book:Publisher>Dell Publishing Co.</book:Publisher> </book:Book> 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