aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-03-03 20:10:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-03-03 20:10:52 +0200
commit3717fce14ff732658d542c13890b226c8367e272 (patch)
treefea72a29626249bdf2961ae7ce0fb15891ad41cd /tests
parente4f4f0bed9befbde2117af6f128d9323be3f1638 (diff)
Resolve anonymous bases in the multi-schema compilation
Also, resolve anonymous specialization arguments (list and union).
Diffstat (limited to 'tests')
-rw-r--r--tests/schema/union/makefile2
-rw-r--r--tests/schema/union/test-001.std15
-rw-r--r--tests/schema/union/test-001.xsd21
3 files changed, 37 insertions, 1 deletions
diff --git a/tests/schema/union/makefile b/tests/schema/union/makefile
index 498c3cc..7f01070 100644
--- a/tests/schema/union/makefile
+++ b/tests/schema/union/makefile
@@ -5,7 +5,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-tests := 000
+tests := 000 001
driver := $(out_root)/tests/dump/driver
test := $(out_base)/.test
diff --git a/tests/schema/union/test-001.std b/tests/schema/union/test-001.std
new file mode 100644
index 0000000..f407b30
--- /dev/null
+++ b/tests/schema/union/test-001.std
@@ -0,0 +1,15 @@
+primary
+{
+ namespace test
+ {
+ list list
+ {
+ union <anonymous> http://www.w3.org/2001/XMLSchema#int test#enum
+ }
+ enumeration enum: http://www.w3.org/2001/XMLSchema#string
+ {
+ enumerator male
+ enumerator female
+ }
+ }
+}
diff --git a/tests/schema/union/test-001.xsd b/tests/schema/union/test-001.xsd
new file mode 100644
index 0000000..00fd8ce
--- /dev/null
+++ b/tests/schema/union/test-001.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <!-- Test resolution of anonymous argument types. -->
+
+ <simpleType name="list">
+ <list>
+ <simpleType>
+ <union memberTypes="int t:enum"/>
+ </simpleType>
+ </list>
+ </simpleType>
+
+ <simpleType name="enum">
+ <restriction base="string">
+ <enumeration value="male"/>
+ <enumeration value="female"/>
+ </restriction>
+ </simpleType>
+
+</schema>