applied patch from Robert Stepanek to start import os schemas support,
* xmlschemas.c: applied patch from Robert Stepanek to start
import os schemas support, cleaned up stuff and the patch.
* test/schemas/import0_0.* result/schemas/import0_0_0*: added test
to regression, fixed a few regressions too.
Daniel
diff --git a/test/schemas/import0_0.imp b/test/schemas/import0_0.imp
new file mode 100644
index 0000000..ce446d8
--- /dev/null
+++ b/test/schemas/import0_0.imp
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://example.net/xmlschema2"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://example.net/xmlschema2"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+<xs:simpleType name="tfoo">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:maxLength value="2"/>
+ </xs:restriction>
+</xs:simpleType>
+
+</xs:schema>
diff --git a/test/schemas/import0_0.xml b/test/schemas/import0_0.xml
new file mode 100644
index 0000000..5ba7e3f
--- /dev/null
+++ b/test/schemas/import0_0.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<bar xmlns="http://example.net/xmlschema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://example.net/xmlschema testImportTypes.xsd">
+ <foo1>
+ xy
+ </foo1>
+</bar>
diff --git a/test/schemas/import0_0.xsd b/test/schemas/import0_0.xsd
index 7976eab..e973d64 100644
--- a/test/schemas/import0_0.xsd
+++ b/test/schemas/import0_0.xsd
@@ -1,17 +1,21 @@
-<?xml version="1.0"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:my="uri:mywork" targetNamespace="uri:mywork">
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://example.net/xmlschema"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://example.net/xmlschema"
+ xmlns:ns2="http://example.net/xmlschema2"
+ xmlns="http://example.net/xmlschema"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
- <import namespace="http://www.w3.org/1999/xhtml"/>
+<xs:import namespace="http://example.net/xmlschema2"
+ schemaLocation="import0_0.imp"/>
- <annotation>
- <documentation>
- <html:p>[Some documentation for my schema]</html:p>
- </documentation>
- </annotation>
- <complexType name="myType">
- <sequence>
- <element ref="html:p" minOccurs="0"/>
- </sequence>
- </complexType>
- <element name="myElt" type="my:myType"/>
-</schema>
+<xs:element name="bar">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="foo1" type="ns2:tfoo"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+
+</xs:schema>