Bug 4414

Summary: Namespace URI not used to find schema.
Product: Xerces-J Reporter: Magnus Kristiansen-Mod <mkm>
Component: Schema-StructuresAssignee: Xerces-J Developers Mailing List <xerces-j-dev>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 1.4.3   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Magnus Kristiansen-Mod 2001-10-25 05:15:13 UTC
When locating the schema for an xml file (or an import in a schema) the user-
supplied entity resolver is only called using the uri supplied as 
schemaLocation. The schema spec. (part 1 sect. 4.3.2, "Schema Representation 
Constraint: Schema Document Location Strategy") states optional ways to use 
namespace name and schemaLocation to locate schemas. While optional, isn't 
namespace name the natural way to go? At least to be tried, and preferebly 
tried before schemaLocation. As I understand it, the schemaLocation attribute 
is (in addition to being quite a stupid contruct) only a hint to where to find 
a schema.

  In a system where schemas are stored in a repository (DB or in-memory) 
namespace name is the (only) natural key as it is unique. Also, if incoming 
messages in a system are to be checked to conform to a set of known schemas, 
the schemaLocation is of little use (and validating a message against a schema 
fetched from a location given by it's sender of course says nothing about it's 
validity against the intended set of schemas).