Schema Location for instance document

I've been looking at section 4.3.2 of the XML Schema structures
specification and have a question about the resolution of a schema to
validate a particular document.

 

I realize xsi:schemaLocation is a "hint" for the validator of instance
documents, but is this attribute the only valid way to indicate the location
of a schema?  Is it appropriate for a software system to select a priori
known schemas based on the namespaces used in the document?  (my assumption
being that namespace URIs are unique)  

 

From section 5.6 of the primer I read "the processor is free to use other
schemas obtained by any suitable means" and if using a namespace is
appropriate then use of the schemaLocation attribute seems superfluous
except in cases when a system is dynamic in its invocation or is uncaring of
the content for reasons other than validation.  In my work the schemas (i.e.
interfaces) are known before any documents are exchanged.

 

In practice, are there issues when using namespaces for validation, when
they are known ahead of time, which would make schemaLocation desirable?

 

Thanks for any input.

 

James

 

Received on Wednesday, 30 June 2004 11:56:03 UTC