Index: src/sas/sascalc/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 0f1e1403133d44187fcd649907ee696312400651)
+++ src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 83b6408fbfaefa4819b955c697fef834d8f033f6)
@@ -34,4 +34,7 @@
 from xml.dom.minidom import parseString
 
+## TODO: Refactor to load multiple <SASData> as separate Data1D objects
+## TODO: Refactor to allow invalid XML, but give a useful warning when loaded
+
 _ZERO = 1e-16
 PREPROCESS = "xmlpreprocess"
@@ -133,5 +136,5 @@
         return False
 
-    def load_file_and_schema(self, xml_file):
+    def load_file_and_schema(self, xml_file, schema_path=""):
         """
         Loads the file and associates a schema, if a known schema exists
@@ -149,5 +152,6 @@
         # Generic values for the cansas file based on the version
         cansas_defaults = CANSAS_NS.get(self.cansas_version, "1.0")
-        schema_path = "{0}/sas/sascalc/dataloader/readers/schema/{1}".format\
+        if schema_path == "":
+            schema_path = "{0}/sas/sascalc/dataloader/readers/schema/{1}".format\
                 (base, cansas_defaults.get("schema")).replace("\\", "/")
 
@@ -156,5 +160,7 @@
         return cansas_defaults
 
-    def read(self, xml_file):
+    ## TODO: Test loading invalid CanSAS XML files and see if this works
+    ## TODO: Once works, try adding a warning that the data is invalid
+    def read(self, xml_file, schema_path=""):
         """
         Validate and read in an xml_file file in the canSAS format.
@@ -174,5 +180,5 @@
             if extension in self.ext or self.allow_all:
                 # Get the file location of
-                cansas_defaults = self.load_file_and_schema(xml_file)
+                cansas_defaults = self.load_file_and_schema(xml_file, schema_path)
 
                 # Try to load the file, but raise an error if unable to.
@@ -225,5 +231,14 @@
                 except:
                     # If the file does not match the schema, raise this error
-                    raise RuntimeError, "%s cannot be read" % xml_file
+                    schema_path = "{0}/sas/sascalc/dataloader/readers/schema/cansas1d_invalid.xsd"
+                    invalid_xml = self.find_invalid_xml()
+                    invalid_xml = "\n\nThe loaded xml file does not fully meet the CanSAS v1.x specification. SasView " + \
+                                  "loaded as much of the data as possible.\n\n" + invalid_xml
+                    self.errors.add(invalid_xml)
+                    self.set_schema(schema_path)
+                    if self.is_cansas():
+                        output = self.read(xml_file, schema_path)
+                    else:
+                        raise RuntimeError, "%s cannot be read" % xml_file
                 return output
         # Return a list of parsed entries that dataloader can manage
Index: src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid.xsd
===================================================================
--- src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid.xsd	(revision 83b6408fbfaefa4819b955c697fef834d8f033f6)
+++ src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid.xsd	(revision 83b6408fbfaefa4819b955c697fef834d8f033f6)
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="xsd-documentation.xsl" ?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
+	targetNamespace="urn:cansas1d:1.1" xmlns:tns="urn:cansas1d:1.1"
+	elementFormDefault="qualified">
+
+<!-- 
+Copyright (c) 2013, UChicago Argonne, LLC
+This file is distributed subject to a Software License Agreement found
+in the file LICENSE that is included with this distribution. 
+ -->
+ 
+<!-- JAXB: http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ -->
+
+	<complexType name="floatUnitType">
+		<simpleContent>
+			<extension base="float">
+				<attribute name="unit" type="string" use="required" />
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<group name="positionGroup">
+		<sequence>
+			<element name="x" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="y" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="z" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="positionType">
+		<group ref="tns:positionGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<group name="orientationGroup">
+		<sequence>
+			<element name="roll" type="tns:floatUnitType" minOccurs="0"  maxOccurs="1" />
+			<element name="pitch" type="tns:floatUnitType" minOccurs="0" maxOccurs="1" />
+			<element name="yaw" type="tns:floatUnitType" minOccurs="0"   maxOccurs="1" />
+		</sequence>
+	</group>
+
+	<complexType name="orientationType">
+		<group ref="tns:orientationGroup" />
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+	
+	<complexType name="IdataType">
+		<sequence>
+			<element name="Q" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="I" minOccurs="1" maxOccurs="1"    type="tns:floatUnitType" />
+			<element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<xsd:choice>
+				<!-- [ [Qdev] | [[dQw] | [dQl]] ] -->
+				<element name="Qdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				<xsd:sequence>
+					<element name="dQw" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+					<element name="dQl" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				</xsd:sequence>
+			</xsd:choice>
+			<element name="Qmean" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+			<element name="Shadowfactor" minOccurs="0" maxOccurs="1" type="float" default="1.0" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+	</complexType>
+	
+	<complexType name="SASdataType">
+		<sequence minOccurs="1" maxOccurs="1">  <!-- http://svn.cansas.org/trac/ticket/21 -->
+			<sequence>
+				<element name="Idata" minOccurs="1" maxOccurs="unbounded" type="tns:IdataType" />
+			</sequence>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+		<attribute name="timestamp" type="dateTime" use="optional" />
+	</complexType>
+	
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+	
+	<complexType name="TdataType">
+			<sequence>
+				<element name="Lambda" minOccurs="0" maxOccurs="1"    type="tns:floatUnitType" />
+				<element name="T" minOccurs="0" maxOccurs="1"    type="tns:floatUnitType" />
+				<element name="Tdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" />
+				<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+	</complexType>
+	
+	<complexType name="SAStransmission_spectrumType">
+		<sequence minOccurs="0" maxOccurs="1">
+			<sequence minOccurs="0" maxOccurs="1">
+				<element name="Tdata" minOccurs="0" maxOccurs="unbounded" type="tns:TdataType" />
+			</sequence>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+		<attribute name="timestamp" type="dateTime" use="optional" />
+	</complexType>
+	
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsampleType">
+		<sequence>
+			<element name="ID" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="thickness" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="transmission" minOccurs="0" maxOccurs="1" type="float" />
+			<element name="temperature" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="position" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="details" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="termType">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="name" type="string" use="optional" default="" />
+				<attribute name="unit" type="string" use="optional"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASprocessType">
+		<annotation>
+			<appinfo>
+				<!-- JAXB: simplify class name -->
+				<jaxb:property name="SASprocess" />
+			</appinfo>
+		</annotation>
+		<sequence>
+			<element name="name" minOccurs="0" maxOccurs="1" type="string" default="">
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Name when using JAXB -->
+						<jaxb:property name="SASprocessName" />
+					</appinfo>
+				</annotation>
+			</element>
+			<element name="date" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="description" minOccurs="0" maxOccurs="1" />
+			<element name="term" minOccurs="0" maxOccurs="unbounded" type="tns:termType" />
+			<element name="SASprocessnote" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="">
+			<annotation>
+				<appinfo>
+					<!-- Remap collision of Name when using JAXB -->
+					<jaxb:property name="SASprocessNameAttr" />
+				</appinfo>
+			</annotation>
+		</attribute>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASsourceType">
+		<sequence>
+			<element name="radiation" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="beam_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="beam_shape" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="wavelength" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_min" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_max" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="wavelength_spread" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SAScollimationType">
+		<sequence>
+			<element name="length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="aperture" minOccurs="0" maxOccurs="unbounded">
+				<complexType>
+					<sequence>
+						<element name="size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+						<element name="distance" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+					</sequence>
+					<attribute name="name" type="string" use="optional" default="" />
+					<attribute name="type" type="string" use="optional" default="" />
+				</complexType>
+			</element>
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<complexType name="SASdetectorType">
+		<sequence>
+			<element name="name" minOccurs="0" maxOccurs="1" type="string" default=""/>
+			<element name="SDD" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+			<element name="offset" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="orientation" minOccurs="0" maxOccurs="1" type="tns:orientationType" />
+			<element name="beam_center" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="pixel_size" minOccurs="0" maxOccurs="1" type="tns:positionType" />
+			<element name="slit_length" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" />
+		</sequence>
+	</complexType>
+
+	<complexType name="SASinstrumentType">
+		<sequence>
+			<element name="name" type="string" minOccurs="0" maxOccurs="1" default="" />
+			<element name="SASsource" type="tns:SASsourceType" minOccurs="0" maxOccurs="1" />
+			<element name="SAScollimation" type="tns:SAScollimationType" minOccurs="0" maxOccurs="unbounded" />
+			<element name="SASdetector" type="tns:SASdetectorType" minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASentryType">
+		<sequence>
+			<element name="Title" minOccurs="0" maxOccurs="1" type="string" />
+			<element name="Run" minOccurs="0" maxOccurs="unbounded">
+				<xsd:complexType>
+					<simpleContent>
+						<extension base="string">
+							<attribute name="name" type="string" use="optional" default="" />
+						</extension>
+					</simpleContent>
+				</xsd:complexType>
+			</element>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other" />
+			<element name="SASdata" minOccurs="1" maxOccurs="unbounded" type="tns:SASdataType" />
+			<element name="SAStransmission_spectrum" minOccurs="0" maxOccurs="unbounded" type="tns:SAStransmission_spectrumType"/>
+			<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" namespace="##other">
+				<!-- Is a second *any* element needed here? -->
+				<annotation>
+					<appinfo>
+						<!-- Remap collision of Any when using JAXB --> 
+						<jaxb:property name="SASentryAny2" />
+					</appinfo>
+				</annotation>
+			</xsd:any>
+			<element name="SASsample" type="tns:SASsampleType" />
+			<element name="SASinstrument" type="tns:SASinstrumentType" minOccurs="0" maxOccurs="1" />
+			<element name="SASprocess" type="tns:SASprocessType" minOccurs="0" maxOccurs="unbounded" />
+			<element name="SASnote" minOccurs="0" maxOccurs="unbounded" />
+				<!-- SASnote is a free-form element.
+					Do not define any content for it or it will become restrictive.
+				-->
+		</sequence>
+		<attribute name="name" type="string" use="optional" default="" />
+	</complexType>
+
+	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
+
+	<complexType name="SASrootType">
+		<sequence>
+			<element name="SASentry" minOccurs="1" maxOccurs="unbounded" type="tns:SASentryType" />
+		</sequence>
+		<attribute name="version" type="string" fixed="1.1" use="optional" />
+	</complexType>
+
+	<element name="SASroot" type="tns:SASrootType" />
+
+</schema>
