- From: <Simon.Cox@csiro.au>
- Date: Sun, 5 Dec 2004 21:38:40 +0800
- To: <xmlschema-dev@w3.org>
> -----Original Message----- > From: xmlschema-dev-request@w3.org > [mailto:xmlschema-dev-request@w3.org] On Behalf Of W. Eliot Kimber > Sent: Saturday, 4 December 2004 1:02 AM > To: xmlschema-dev@w3.org > Subject: Re: target namespace and namespaces > > > As a matter of general practice I agree--for a given XML > namespace there should be exactly one XSD schema in any given > processing environment. > > However, if you had multiple XSD schemas associated with the > same name space in a given environment (for example, in an > XML-aware repository that maintains dependency relationships > between documents and schemas) it just means that you'd have > to provide some additional mechanism for knowing what schema > to apply in a given situation. ... Given an XML document to be validated, the > processor would ask the repository for the schemas associated > with each namespace used in the document. If it got back a > list of more than one for any namespace it would be up to the > application to select the one it wants, which it could do by > examining the repository-held metadata for each schema. This discussion appears to confuse "schema" with "schema document". Most complex schemas are factored/modularised into several schema documents, with <includes> managing the dependencies within a single target namespace. The precise subset of components from the target namespace that are found in each schema document is essentially arbitrary - it is just a packaging device to assist in maintenance. You could have one global component per document, or just one document for the namespace, or anything in between. The exact packaging is logically unimportant - all that matters is the absence of clashes within the namespace for global components of the same name. A corollary of this is that different (potentially overlapping) subsets from the same namespace may be packaged into different documents, as convenient, for processors interested in different pieces of the complete schema. Simon Cox
Received on Sunday, 5 December 2004 13:39:15 UTC