added a bunch of tests from Kasimier Buchcik posted on May 11 Daniel

* test/schemas/* result/schemas/*: added a bunch of tests from
  Kasimier Buchcik posted on May 11
Daniel
diff --git a/test/schemas/bug141312_0.xml b/test/schemas/bug141312_0.xml
new file mode 100644
index 0000000..7d7abb1
--- /dev/null
+++ b/test/schemas/bug141312_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo xmlns="http://FOO">lalala</foo>
diff --git a/test/schemas/bug141312_0.xsd b/test/schemas/bug141312_0.xsd
new file mode 100644
index 0000000..c9a7e2c
--- /dev/null
+++ b/test/schemas/bug141312_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<schema 
+  xmlns="http://www.w3.org/2001/XMLSchema" 
+  targetNamespace="http://FOO"
+  xmlns:foo="http://FOO">
+  
+	<element name="foo" type="foo:fooType" nillable="false" />
+	
+	<complexType name="fooType" mixed="true">
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	
+</schema>
+
diff --git a/test/schemas/scc-no-xmlns_0.xml b/test/schemas/scc-no-xmlns_0.xml
new file mode 100644
index 0000000..b85cdcb
--- /dev/null
+++ b/test/schemas/scc-no-xmlns_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://foo"/>	
+
diff --git a/test/schemas/scc-no-xmlns_0.xsd b/test/schemas/scc-no-xmlns_0.xsd
new file mode 100644
index 0000000..731c81b
--- /dev/null
+++ b/test/schemas/scc-no-xmlns_0.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- C.4 Schema Component Constraints: no-xmlns -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute name="xmlns" type="string" />
+  	  </complexType>    
+  </element>  
+
+</schema>
diff --git a/test/schemas/scc-no-xsi_0.xml b/test/schemas/scc-no-xsi_0.xml
new file mode 100644
index 0000000..b85cdcb
--- /dev/null
+++ b/test/schemas/scc-no-xsi_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://foo"/>	
+
diff --git a/test/schemas/scc-no-xsi_0.xsd b/test/schemas/scc-no-xsi_0.xsd
new file mode 100644
index 0000000..388b6a9
--- /dev/null
+++ b/test/schemas/scc-no-xsi_0.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.6 Schema Component Constraint: xsi: Not Allowed -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-instance">						
+
+	<element name="foo">	
+		<complexType>		
+			<attribute name="bar" form="qualified" type="string"/>
+		</complexType>
+	</element>
+  
+</schema>
diff --git a/test/schemas/src-attribute1_0.xml b/test/schemas/src-attribute1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute1_0.xsd b/test/schemas/src-attribute1_0.xsd
new file mode 100644
index 0000000..dba8b48
--- /dev/null
+++ b/test/schemas/src-attribute1_0.xsd
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 1 
+    default and fixed must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute name="bar" type="string" default="moo" fixed="true"/>
+  	  </complexType>    
+  </element>  
+
+</schema>
diff --git a/test/schemas/src-attribute2_0.xml b/test/schemas/src-attribute2_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute2_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute2_0.xsd b/test/schemas/src-attribute2_0.xsd
new file mode 100644
index 0000000..d10cc81
--- /dev/null
+++ b/test/schemas/src-attribute2_0.xsd
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2 
+    If default and use are both present, use must have the ·actual value· optional
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute name="bar" type="string" use="required" default="moo" />
+  	  </complexType>    
+  </element>  
+
+</schema>
diff --git a/test/schemas/src-attribute3-1_0.xml b/test/schemas/src-attribute3-1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-1_0.xsd b/test/schemas/src-attribute3-1_0.xsd
new file mode 100644
index 0000000..28e003c
--- /dev/null
+++ b/test/schemas/src-attribute3-1_0.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.1
+    One of ref or name must be present, but not both
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute name="bar" ref="foo:bar" />
+  	  </complexType>    
+  </element>  
+  
+  <attribute name="bar" type="string" />
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-form_0.xml b/test/schemas/src-attribute3-2-form_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-form_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-form_0.xsd b/test/schemas/src-attribute3-2-form_0.xsd
new file mode 100644
index 0000000..0c7cc23
--- /dev/null
+++ b/test/schemas/src-attribute3-2-form_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+    If ref is present, then all of <simpleType>, form and type must be absent
+    This one tests "form"
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute ref="foo:bar" form="qualified"/> 	  		
+  	  </complexType>    
+  </element>  
+  
+  <attribute name="bar" type="string"/>
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-st_0.xml b/test/schemas/src-attribute3-2-st_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-st_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-st_0.xsd b/test/schemas/src-attribute3-2-st_0.xsd
new file mode 100644
index 0000000..f256381
--- /dev/null
+++ b/test/schemas/src-attribute3-2-st_0.xsd
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+    If ref is present, then all of <simpleType>, form and type must be absent
+    This one tests <simpleType>
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute ref="foo:bar">
+  	  		<simpleType>
+  	  			<restriction base="string">
+  	  				<maxLength value="20"/>
+  	  			</restriction>
+  	  		</simpleType>
+  	  	</attribute>
+  	  </complexType>    
+  </element>  
+  
+  <attribute name="bar" type="string" />
+
+</schema>
diff --git a/test/schemas/src-attribute3-2-type_0.xml b/test/schemas/src-attribute3-2-type_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute3-2-type_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute3-2-type_0.xsd b/test/schemas/src-attribute3-2-type_0.xsd
new file mode 100644
index 0000000..54f1973
--- /dev/null
+++ b/test/schemas/src-attribute3-2-type_0.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+    If ref is present, then all of <simpleType>, form and type must be absent
+    This one tests "type"
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<attribute ref="foo:bar" type="string"/> 	  		
+  	  </complexType>    
+  </element>  
+  
+  <attribute name="bar" type="string"/>
+
+</schema>
diff --git a/test/schemas/src-attribute4_0.xml b/test/schemas/src-attribute4_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-attribute4_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-attribute4_0.xsd b/test/schemas/src-attribute4_0.xsd
new file mode 100644
index 0000000..cc9d8ac
--- /dev/null
+++ b/test/schemas/src-attribute4_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3.2
+    type and <simpleType> must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+	<attribute name="bar" type="string">		
+		<simpleType>
+  	  		<restriction base="string">
+  	  			<maxLength value="20"/>
+  	  		</restriction>
+  	  	</simpleType>
+	</attribute>  	
+	
+	<element name="foo"/>
+  
+</schema>
diff --git a/test/schemas/src-element1_0.xml b/test/schemas/src-element1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element1_0.xsd b/test/schemas/src-element1_0.xsd
new file mode 100644
index 0000000..ffd8d57
--- /dev/null
+++ b/test/schemas/src-element1_0.xsd
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 1 
+    default and fixed must not both be present
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+	<element name="foo" type="string" default="Joni" fixed="Mitchel"/>	      
+
+</schema>
diff --git a/test/schemas/src-element2-1_0.xml b/test/schemas/src-element2-1_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element2-1_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element2-1_0.xsd b/test/schemas/src-element2-1_0.xsd
new file mode 100644
index 0000000..61c2edf
--- /dev/null
+++ b/test/schemas/src-element2-1_0.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2.1 
+    One of ref or name must be present, but not both.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="bar" type="string"/>	
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<sequence>
+  	  		<element name="bar" ref="foo:bar"/>	   
+  	  	</sequence>
+  	  </complexType>    
+  </element>  
+
+</schema>
diff --git a/test/schemas/src-element2-2_0.xml b/test/schemas/src-element2-2_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element2-2_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element2-2_0.xsd b/test/schemas/src-element2-2_0.xsd
new file mode 100644
index 0000000..a70740a
--- /dev/null
+++ b/test/schemas/src-element2-2_0.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 2.2 
+    If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, 
+    nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs, 
+    id are allowed in addition to ref, along with <annotation>.
+
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+  <element name="bar" type="string"/>	
+	
+  <element name="foo">
+  	  <complexType>
+  	  	<choice>
+  	  	
+  	  		<!-- The good ones. -->
+  	  		<element ref="foo:bar" minOccurs="0"/>
+  	  		<element ref="foo:bar" maxOccurs="0"/>
+  	  		<element ref="foo:bar" id="myomy"/>
+  	  		
+  	  		<!-- The bad ones. -->
+  	  		<element ref="foo:bar">
+  	  			<complexType>
+  	  				<attribute name="bar" type="string"/>
+  	  			</complexType>
+  	  		</element>
+  	  		
+  	  		<element ref="foo:bar">
+  	  			<simpleType>
+  	  				<restriction base="string">
+  	  					<maxLength value="20"/>
+  	  				</restriction>
+  	  			</simpleType>
+  	  		</element>  
+  	  		
+  	  		<element ref="foo:bar" type="string"/>
+  	  		<element ref="foo:bar" nillable="true"/>
+  	  		<element ref="foo:bar" default="Joni"/>
+  	  		<element ref="foo:bar" fixed="Mitchel"/>
+  	  		<element ref="foo:bar" form="unqualified"/>
+  	  		<element ref="foo:bar" block="restriction"/>  	  		
+  	  		
+  	  	</choice>
+  	  </complexType>    
+  </element>  
+  
+
+</schema>
diff --git a/test/schemas/src-element3_0.xml b/test/schemas/src-element3_0.xml
new file mode 100644
index 0000000..760efd9
--- /dev/null
+++ b/test/schemas/src-element3_0.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<foo xmlns="http://FOO"/>
diff --git a/test/schemas/src-element3_0.xsd b/test/schemas/src-element3_0.xsd
new file mode 100644
index 0000000..28b69d8
--- /dev/null
+++ b/test/schemas/src-element3_0.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- 3.2.3 : 3 
+    type and either <simpleType> or <complexType> are mutually exclusive
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
+	
+	<element name="foo" type="foo:someType">
+		<complexType>
+			<sequence>
+				<element name="bar" type="string"/>	   
+			</sequence>
+		</complexType>    
+	</element>  
+	
+	<element name="bar" type="foo:someType">
+		<simpleType>
+  	  		<restriction base="string">
+  	  			<maxLength value="20"/>
+  	  		</restriction>
+  	  	</simpleType>
+	</element>  
+	
+	<complexType name="someType">
+		<sequence>
+			<element name="bar" type="string"/>	   
+		</sequence>
+	</complexType>    
+
+</schema>
diff --git a/test/schemas/xsd-simpleType-varieties_0.xml b/test/schemas/xsd-simpleType-varieties_0.xml
new file mode 100644
index 0000000..83a0b2a
--- /dev/null
+++ b/test/schemas/xsd-simpleType-varieties_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- This is the test data for the check of the implementation of varieties of xsd:simpleType element. -->
+<foo xmlns="http://FOO">
+	<barA>fajita</barA>
+	<barB>pub pub</barB>
+	<barC><![CDATA[tequilla]]></barC>
+</foo>
+
diff --git a/test/schemas/xsd-simpleType-varieties_0.xsd b/test/schemas/xsd-simpleType-varieties_0.xsd
new file mode 100644
index 0000000..e4ed6ac
--- /dev/null
+++ b/test/schemas/xsd-simpleType-varieties_0.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!-- This test checks the implementation of the varieties of the xsd:simpleType element. -->
+    
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://FOO" xmlns:foo="http://FOO"> 
+
+	<element name="foo">
+		<complexType>
+			<sequence maxOccurs="unbounded">
+				<element name="barA">
+					<simpleType>
+						<union memberTypes="foo:typeA foo:typeB"/>      
+					</simpleType>
+				</element>
+				<element name="barB">
+					<simpleType>
+						<list itemType="foo:typeA"/>      
+					</simpleType>
+				</element>        
+				<element name="barC">
+					<simpleType>
+						<restriction base="string">
+							<enumeration value="tequilla"/>  	  	  
+						</restriction>     
+					</simpleType>
+				</element>                
+			</sequence>
+		</complexType>
+	</element>
+   
+	<simpleType name="typeA">
+		<restriction base="string">
+			<enumeration value="pub"/>  	  	  
+		</restriction>
+	</simpleType> 
+   
+	<simpleType name="typeB">
+		<restriction base="string">
+			<enumeration value="fajita"/>  	  	  
+		</restriction>
+	</simpleType>    
+  
+</schema>