String resourcePath,
String commonLocation,
boolean processIncludes) throws RegistryException {
resourceName = resourcePath.substring(resourcePath.lastIndexOf(RegistryConstants.PATH_SEPARATOR) + 1);
String url = requestContext.getSourceURL();
XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection();
xmlSchemaCollection.setBaseUri(url);
baseURI = url;
InputSource inputSource = new InputSource(url);
try {
// Here we assue schema is correct. Schema validation is beyond our scope, so we don't
// bother with a ValidationEventHandler.
XmlSchema xmlSchema = xmlSchemaCollection.read(inputSource, null);
evaluateSchemasRecursively(xmlSchema, null, false, true);
} catch (RuntimeException re) {
String msg = "Could not read the XML Schema Definition file. ";
if (re.getCause() instanceof org.apache.ws.commons.schema.XmlSchemaException) {
msg += re.getCause().getMessage();