Index: src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5618)
+++ src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5619)
@@ -26,8 +26,14 @@
 
 package edu.ucsb.nceas.metacat.service;
 
+import java.io.File;
+import java.io.FileWriter;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.StringReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -35,6 +41,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.DocumentImpl;
@@ -208,11 +215,74 @@
 				String fileLocation = resultSet.getString(2);
 				logMetacat.debug("XMLService.populateRegisteredSchemaList - Registering schema: " + fileNamespace + " " + fileLocation);
 				XMLSchema xmlSchema = new XMLSchema(fileNamespace);
-				xmlSchema.setFileName(fileLocation);
-
-				if (FileUtil.getFileStatus(xmlSchema.getLocalFileDir()) >= FileUtil.EXISTS_READABLE) {
+				if(fileLocation.startsWith("http://") || fileLocation.startsWith("https://"))
+				{
+				    //System.out.println("processing an http schemal location");
+				    logMetacat.debug("XMLService.populateRegisteredSchemaList - Processing http schema location: " + fileLocation);
+				    xmlSchema.setExternalFileUri(fileLocation);
+				    //cache the file
+				    try
+				    {
+				        URL u = new URL(fileLocation);
+				        //System.out.println("downloading " + fileLocation);
+				        logMetacat.debug("XMLService.populateRegisteredSchemaList - Downloading http based schema...");
+				        HttpURLConnection connection = (HttpURLConnection) u.openConnection();
+				        connection.setDoOutput(true);
+			            connection.setRequestMethod("GET");
+			            connection.connect();
+			            String schema = IOUtils.toString(connection.getInputStream());
+			            
+			            String deployDir = PropertyService.getProperty("application.deployDir");
+			            String contextName = PropertyService.getProperty("application.context");
+			            String filename = fileLocation.substring(fileLocation.lastIndexOf("/"), 
+                                fileLocation.length());
+			            File schemaFile = new File(deployDir + "/" + contextName + "/" +
+			                    "schema/" + filename);
+			            //System.out.println("writing schema to " + schemaFile.getAbsolutePath());
+			            FileWriter fw = new FileWriter(schemaFile);
+			            fw.write(schema);
+			            fw.flush();
+			            fw.close();
+			            logMetacat.debug("XMLService.populateRegisteredSchemaList - Schema downloaded to " + schemaFile.getAbsolutePath());
+			            fileLocation = "/schema/" + filename;
+			            //System.out.println("fileLocation set to " + fileLocation);
+			            logMetacat.debug("XMLService.populateRegisteredSchemaList - fileLocation set to " + fileLocation);
+			            xmlSchema.setFileName(fileLocation);
+				    }
+				    catch(MalformedURLException me)
+				    {
+				        logMetacat.warn("Could not cache a registered schema at " + fileLocation +
+				                " because a connection could not be made to the given url: " + 
+				                me.getMessage());
+				    }
+                    catch (IOException ioe)
+                    {
+                        logMetacat.warn("Could not cache a registered schema at " + fileLocation +
+                        " because an IOException occured: " + ioe.getMessage());
+                    }
+                    catch(PropertyNotFoundException pnfe)
+                    {
+                        logMetacat.warn("Could not cache a registered schema at " + fileLocation +
+                                " because the property 'application.tempDir' could not be found.");
+                    }
+				    
+				    xmlSchema.setFileName(fileLocation);
+				}
+				else
+				{
+				    xmlSchema.setFileName(fileLocation);
+				}
+								
+				if (FileUtil.getFileStatus(xmlSchema.getLocalFileDir()) >= FileUtil.EXISTS_READABLE) 
+				{
 					registeredSchemaList.add(xmlSchema);
-				} else {
+				}
+				else if(fileLocation.startsWith("http://") || fileLocation.startsWith("https://"))
+                {  //the schema resides on a different server, to validate, we need to go get it 
+                    registeredSchemaList.add(xmlSchema);
+                }
+				else 
+				{
 					logMetacat.warn("XMLService.populateRegisteredSchemaList - Schema file: " + xmlSchema.getLocalFileDir() + " is registered "
 							+ " in the database but does not exist on the file system.");
 				}
