summaryrefslogtreecommitdiff
path: root/tests/cxx/tree/types-only/test.xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
commitf0510d2f90467de8e8f260b47d79a9baaf9bef17 (patch)
tree0b9929946f06a9cbe9b9e8f2a7600dae4e048f79 /tests/cxx/tree/types-only/test.xsd
Start tracking XSD with git
Diffstat (limited to 'tests/cxx/tree/types-only/test.xsd')
-rw-r--r--tests/cxx/tree/types-only/test.xsd52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/cxx/tree/types-only/test.xsd b/tests/cxx/tree/types-only/test.xsd
new file mode 100644
index 0000000..d6ae44d
--- /dev/null
+++ b/tests/cxx/tree/types-only/test.xsd
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <simpleType name="color-enum">
+ <restriction base="token">
+ <enumeration value="red"/>
+ <enumeration value="green"/>
+ <enumeration value="blue"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="red-blue-enum">
+ <restriction base="t:color-enum">
+ <enumeration value="red"/>
+ <enumeration value="blue"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="long-string-union">
+ <union memberTypes="long string"/>
+ </simpleType>
+
+ <simpleType name="string-list">
+ <list itemType="string"/>
+ </simpleType>
+
+ <complexType name="complex-type">
+ <sequence>
+ <element name="a" type="string"/>
+ </sequence>
+ <!-- @@ fixed="foo" -->
+ <attribute name="text" type="string" use="required" />
+ <!-- @@ fixed="red" -->
+ <attribute name="color" type="t:color-enum" use="required"/>
+ </complexType>
+
+ <!-- Test that we do not perform type/element name conflict resolution
+ as well as print any warnings. -->
+ <element name="type" type="string"/>
+
+ <!-- Test that we generate anonymous type for global element. -->
+ <element name="anon">
+ <complexType>
+ <sequence>
+ <element name="a" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="root" type="t:complex-type"/>
+
+</schema>