1. that doesn't sound right ... i thought Schema declaration URIs were like Namespace URIs - they were just a unique name, that the XML parser would then be configured with a mapping to a local file (or remote URL) for the parser to use? ... it's suppose to be a real URL?!?!?!
Schema declaration URIs are like namespace URIs, however, you can provide a schemaLocation that is a referenced URL, then the XML parser can decide (as one of its strategies) to pull it down. I found this on the XML Schema standards site at the W3C:
Here's the relevant part pasted in:
Schema Representation Constraint: Schema Document Location Strategy
Given a namespace name (or none) and (optionally) a URI reference from xsi:schemaLocation or xsi:noNamespaceSchemaLocation, schema-aware processors may implement any combination of the following strategies, in any order:
1 Do nothing, for instance because a schema containing components for the given namespace name is already known to be available, or because it is known in advance that no efforts to locate schema documents will be successful (for example in embedded systems);
2 Based on the location URI, identify an existing schema document, either as a resource which is an XML document or a <schema> element information item, in some local schema repository;
3 Based on the namespace name, identify an existing schema document, either as a resource which is an XML document or a <schema> element information item, in some local schema repository;
4 Attempt to resolve the location URI, to locate a resource on the web which is or contains or references a <schema> element;
5 Attempt to resolve the namespace name to locate such a resource.
Whenever possible configuration and/or invocation options for selecting and/or ordering the implemented strategies should be provided.
However, reading this standards doc though suggests something that we can do to alleviate this. We can provide the XSD in the SOLR war file and then reference it locally as you suggest (by setting xsi:schemaLocation to it).
2. If schema URIs really are URLs then we should absolutely NOT reference anything in *.apache.org for the schema URL ... we (and our users) don't want/need every solr client on the planet hitting the apache webservers for this kind of validation. it would make a lot more sense to include the XSD in the war and keep it all on the same host
Good point. I'll address as part of 1.