- From: Dan Vint <dvint@dvint.com>
- Date: Thu, 02 Dec 2004 15:03:00 -0800
- To: xmlschema-dev@w3.org
Can someone help with a better understanding of the relationship of a target namespace, the namespace and a schema composed of multiple files? Let me build an example: 1) I create a schema (all in one file) and assign a namespace and targetNamespace. A data stream that references this namespace gets the entire schema and alls it definitions. To me 1 namespace = 1 schema and in this case there is no option to break it up. 2) Now take the same schema and break it up into separate files. I have one file with common stuff and two other files that include this common file, but each adds different containing elements. Both of these files have the same namespace associated with them. Now I have 1 namespace = 2 different schemas. A data stream that validates against schema 1 with namespace=foo will not validate against schema 2 with namespace=foo. A substantial amount may be legal because of the shared common information but the upper wrapper elements would immediately fail validation. Is there anything that considers method 2 a legal design? If it isn't illegal is it at least a really poor and troublesome design? In the Namespace spec I can't see any guidance on this question and with the schema spec saying schema location information is optional and at best a hint I don't see any help there either. With the schema location info being a "hint" there seems to be no way to make clear that I would want namespace foo with schema 1 rather than schema 2. So I lean towards this not being necessarily illegal, but a REALLLLLY poor design. I've also got a request for a variation on method 2. In this case I have another group that wants one or two elements and code lists out of my entire schema for reuse. They want me to place these few items in a separate file that is included into my massive schema. They want to address these reusable items by the same namespace that applies to the entire specification, but say that wen they reference this namespace that they only mean the file with the reusable portions. In this option I think there is actually a mechanical problem. The main schema file is going to have the target namespace defined. Include requires the included file to not have a namespace, but is there any problem with importing a file with the same namespace? So in this case the reusable file has the same namespace assigned as the importing schema - is a parser supposed to just "blend" these two sets of definitions together or is this an error. thanks for any light and opinions you can shed on this issue. ..dan --------------------------------------------------------------------------- Danny Vint Specializing in Panoramic Images of California and the West http://www.dvint.com voice: 510-522-4703 fax: 801-749-3229
Received on Thursday, 2 December 2004 23:01:17 UTC