- From: <Noah_Mendelsohn@lotus.com>
- Date: Tue, 19 Dec 2000 15:57:34 -0500
- To: Andreas Kemkes <andreas@perceptronics.com>
- Cc: andreas@perceptronics.com, www-xml-schema-comments@w3.org
Yes, what you want to do is permitted, but probably not quite for the reason you suspect. In XML schema, you do not <import> a schema document, you <import> a namespace. Doing the import merely documents your intention to use the namespace, largely so that tools can easily track the interdependency. Circular imports and redundant imports are harmless. The schemaLocation attribute on <import> is optional, and it is a hint. From [1] we find: "The normalized value of the schemaLocation, if present, gives a hint as to where a schema document with declarations and definitions for that namespace (or none) may be found." What a processor does with redundant or conflicting hints is up to the processor, except that the schema language prohibits conflicting or duplicate definitions or declarations of the same named component. So, processors can be written to ignore such hints or to reflect warnings or errors to the caller, but no such warnings or errors are covered by the conformance rules for the schema language itself. Hints are hints...errors in a hint do not generally result in mandatory errors (though processing you do as a result of choosing to act on a hint can result in an error.) [1] http://www.w3.org/TR/xmlschema-1/#composition-schemaImport ------------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 Lotus Development Corp. Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------------ Andreas Kemkes <andreas@perceptronics.com> Sent by: www-xml-schema-comments-request@w3.org 12/19/00 02:47 PM To: www-xml-schema-comments@w3.org cc: andreas@perceptronics.com, (bcc: Noah Mendelsohn/CAM/Lotus) Subject: <import ... /> Question Categories: I have an XML schema question that someone on this list hopefully can answer: If an XML schema foo.xsd imports another XLM schema bla.xsd, which in turn imports the first XML schema foo.xsd, is it permitted? I couldn't find any conclusive statement in the documents - it may be there, I just didn't see it. Pointers would be appreciated. Regards, Andreas
Received on Tuesday, 19 December 2000 16:06:29 UTC