summaryrefslogtreecommitdiff
path: root/xsd/tests/cxx/tree/built-in
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
committerJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
commita15cf65c44d5c224169c32ef5495b68c758134b7 (patch)
tree3419f58fc8e1b315ba8171910ee044c5d467c162 /xsd/tests/cxx/tree/built-in
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'xsd/tests/cxx/tree/built-in')
-rw-r--r--xsd/tests/cxx/tree/built-in/attributes.xml73
-rw-r--r--xsd/tests/cxx/tree/built-in/driver.cxx94
-rw-r--r--xsd/tests/cxx/tree/built-in/elements.xml84
-rw-r--r--xsd/tests/cxx/tree/built-in/inherited.xml84
-rw-r--r--xsd/tests/cxx/tree/built-in/makefile97
-rw-r--r--xsd/tests/cxx/tree/built-in/types.xsd460
6 files changed, 892 insertions, 0 deletions
diff --git a/xsd/tests/cxx/tree/built-in/attributes.xml b/xsd/tests/cxx/tree/built-in/attributes.xml
new file mode 100644
index 0000000..609a757
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/attributes.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test:attributes
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd"
+
+
+ byte="65"
+ unsigned_byte="66"
+ short="-222"
+ unsigned_short="57005"
+ int="-57005"
+ unsigned_int="3735928559"
+ long="-3735928559"
+ unsigned_long="16045690984833335023"
+ integer="-3735928559"
+ non_positive_integer="-3735928559"
+ non_negative_integer="3735928559"
+ positive_integer="3735928559"
+ negative_integer="-3735928559"
+
+
+
+ boolean="false"
+
+
+
+ float="1234.1234"
+ double="12345678.12345678"
+ decimal="12345678.12345678"
+
+
+
+ string="string"
+ normalized_string="normalized string"
+ token=" one two three "
+ name="name"
+ name_token="name-token"
+ name_tokens="name tokens"
+ ncname="ncname"
+ language="en-us"
+
+
+ qname="xsi:schemaLocation"
+
+
+
+ id="attributes"
+ id_ref="attributes"
+ id_refs="attributes"
+
+
+
+ any_uri="http://www.codesynthesis.com"
+
+
+
+ base64_binary="YmFzZTY0IGJpbmFyeQ=="
+ hex_binary="6865782052696E617279"
+
+
+
+ date="2001-10-26+02:00"
+ date_time="2001-10-26T21:32:52+02:00"
+ duration="P1Y2M3DT5H20M30S"
+ day="---01+02:00"
+ month="--11+02:00"
+ month_day="--11-02+02:00"
+ year="2001+02:00"
+ year_month="2001-11+02:00"
+ time="21:32:52+02:00"
+
+/>
diff --git a/xsd/tests/cxx/tree/built-in/driver.cxx b/xsd/tests/cxx/tree/built-in/driver.cxx
new file mode 100644
index 0000000..a41e4f3
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/driver.cxx
@@ -0,0 +1,94 @@
+// file : tests/cxx/tree/built-in/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test built-in type mapping.
+//
+
+#include <memory> // std::auto_ptr
+#include <sstream>
+#include <iostream>
+
+
+#include "types.hxx"
+
+using std::cerr;
+using std::endl;
+using std::auto_ptr;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 4)
+ {
+ cerr << "usage: " << argv[0] << " elements.xml attributes.xml inherited.xml" << endl;
+ return 1;
+ }
+
+ auto_ptr<xmlns::test::Elements> elements (xmlns::test::elements (argv[1]));
+
+ auto_ptr<xmlns::test::Attributes> attributes (
+ xmlns::test::attributes (argv[2]));
+
+ auto_ptr<xmlns::test::Inherited> inherited (
+ xmlns::test::inherited (argv[3]));
+
+ cerr << "elements: " << *elements << endl
+ << endl
+ << "attributes: " << *attributes << endl
+ << endl
+ << "inherited: " << *inherited << endl;
+
+ // Test parsing/serialization.
+ //
+
+ xml_schema::namespace_infomap map;
+
+ map["test"].name = "http://www.codesynthesis.com/xmlns/test";
+ map["test"].schema = "types.xsd";
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::elements (ostr, *elements, map);
+
+ std::istringstream istr (ostr.str ());
+ auto_ptr<xmlns::test::Elements> elements1 (xmlns::test::elements (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::elements (ostr1, *elements1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::attributes (ostr, *attributes, map);
+
+ std::istringstream istr (ostr.str ());
+ auto_ptr<xmlns::test::Attributes> attributes1 (
+ xmlns::test::attributes (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::attributes (ostr1, *attributes1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::inherited (ostr, *inherited, map);
+
+ std::istringstream istr (ostr.str ());
+ auto_ptr<xmlns::test::Inherited> inherited1 (
+ xmlns::test::inherited (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::inherited (ostr1, *inherited1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+}
diff --git a/xsd/tests/cxx/tree/built-in/elements.xml b/xsd/tests/cxx/tree/built-in/elements.xml
new file mode 100644
index 0000000..f76f019
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/elements.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test:elements
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
+
+ <!-- integers -->
+ <byte>65</byte>
+ <unsigned_byte>66</unsigned_byte>
+ <short>-222</short>
+ <unsigned_short>57005</unsigned_short>
+ <int>-57005</int>
+ <unsigned_int>3735928559</unsigned_int>
+ <long>-3735928559</long>
+ <unsigned_long>16045690984833335023</unsigned_long>
+ <integer>-3735928559</integer>
+ <non_positive_integer>-3735928559</non_positive_integer>
+ <non_negative_integer>3735928559</non_negative_integer>
+ <positive_integer>3735928559</positive_integer>
+ <negative_integer>-3735928559</negative_integer>
+
+
+ <!-- boolean -->
+ <boolean>true</boolean>
+
+
+ <!-- floats -->
+ <float>1234.1234</float>
+ <double>12345678.12345678</double>
+ <decimal>12345678.12345678</decimal>
+
+
+ <!-- strings -->
+ <string>string</string>
+ <normalized_string>normalized
+string</normalized_string>
+ <token>
+ one
+ two three </token>
+ <name>name</name>
+ <name_token>name-token</name_token>
+ <name_tokens>name tokens</name_tokens>
+ <ncname>ncname</ncname>
+ <language>en-us</language>
+
+ <!-- qualified name -->
+ <qname>xsi:schemaLocation</qname>
+
+
+ <!-- ID/IDREF -->
+ <id>elements1</id>
+ <id>elements2</id>
+ <id_ref>elements1</id_ref>
+ <id_refs>elements1 elements2</id_refs>
+
+
+ <!-- URI -->
+ <any_uri>http://www.codesynthesis.com</any_uri>
+
+
+ <!-- binary -->
+ <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
+ <hex_binary>6865782052696E617279</hex_binary>
+
+
+ <!-- date/time -->
+ <date>2001-10-26+02:00</date>
+ <date_time>2001-10-26T21:32:52+02:00</date_time>
+ <duration>P1Y2M3DT5H20M30S</duration>
+ <day>---01+02:00</day>
+ <month>--11+02:00</month>
+ <month_day>--11-02+02:00</month_day>
+ <year>2001+02:00</year>
+ <year_month>2001-11+02:00</year_month>
+ <time>21:32:52+02:00</time>
+
+
+ <!-- entity -->
+ <!--
+ <entity>foo</entity>
+ <entities>foo bar</entities>
+ -->
+
+</test:elements>
diff --git a/xsd/tests/cxx/tree/built-in/inherited.xml b/xsd/tests/cxx/tree/built-in/inherited.xml
new file mode 100644
index 0000000..1781a69
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/inherited.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test:inherited
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
+
+ <!-- integers -->
+ <byte>65</byte>
+ <unsigned_byte>66</unsigned_byte>
+ <short>-222</short>
+ <unsigned_short>57005</unsigned_short>
+ <int>-57005</int>
+ <unsigned_int>3735928559</unsigned_int>
+ <long>-3735928559</long>
+ <unsigned_long>16045690984833335023</unsigned_long>
+ <integer>-3735928559</integer>
+ <non_positive_integer>-3735928559</non_positive_integer>
+ <non_negative_integer>3735928559</non_negative_integer>
+ <positive_integer>3735928559</positive_integer>
+ <negative_integer>-3735928559</negative_integer>
+
+
+ <!-- boolean -->
+ <boolean>true</boolean>
+
+
+ <!-- floats -->
+ <float>1234.1234</float>
+ <double>12345678.12345678</double>
+ <decimal>12345678.12345678</decimal>
+
+
+ <!-- strings -->
+ <string>string</string>
+ <normalized_string>normalized
+string</normalized_string>
+ <token>
+ one
+ two three </token>
+ <name>name</name>
+ <name_token>name-token</name_token>
+ <name_tokens>name tokens</name_tokens>
+ <ncname>ncname</ncname>
+ <language>en-us</language>
+
+ <!-- qualified name -->
+ <qname>xsi:schemaLocation</qname>
+
+
+ <!-- ID/IDREF -->
+ <id>elements1</id>
+ <id>elements2</id>
+ <id_ref>elements1</id_ref>
+ <id_refs>elements1 elements2</id_refs>
+
+
+ <!-- URI -->
+ <any_uri>http://www.codesynthesis.com</any_uri>
+
+
+ <!-- binary -->
+ <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
+ <hex_binary>6865782052696E617279</hex_binary>
+
+
+ <!-- date/time -->
+ <date>2001-10-26+02:00</date>
+ <date_time>2001-10-26T21:32:52+02:00</date_time>
+ <duration>P1Y2M3DT5H20M30S</duration>
+ <day>---01+02:00</day>
+ <month>--11+02:00</month>
+ <month_day>--11-02+02:00</month_day>
+ <year>2001+02:00</year>
+ <year_month>2001-11+02:00</year_month>
+ <time>21:32:52+02:00</time>
+
+
+ <!-- entity -->
+ <!--
+ <entity>foo</entity>
+ <entities>foo bar</entities>
+ -->
+
+</test:inherited>
diff --git a/xsd/tests/cxx/tree/built-in/makefile b/xsd/tests/cxx/tree/built-in/makefile
new file mode 100644
index 0000000..bf6301b
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/makefile
@@ -0,0 +1,97 @@
+# file : tests/cxx/tree/built-in/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
+
+xsd := types.xsd
+cxx := driver.cxx
+
+obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
+dep := $(obj:.o=.o.d)
+
+driver := $(out_base)/driver
+test := $(out_base)/.test
+clean := $(out_base)/.clean
+
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/libxerces-c/stub.make,\
+ l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
+
+
+# Build.
+#
+$(driver): $(obj) $(xerces_c.l)
+
+$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
+$(obj) $(dep): $(xerces_c.l.cpp-options)
+
+genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): xsd := $(out_root)/xsd/xsd
+
+$(gen): xsd_options := \
+--char-type char \
+--generate-inline \
+--generate-ostream \
+--generate-serialization \
+--generate-default-ctor \
+--generate-from-base-ctor \
+--root-element-all
+
+$(gen): $(src_root)/xsd/xsd
+
+$(call include-dep,$(dep))
+
+
+# Convenience alias for default target.
+#
+$(out_base)/: $(driver)
+
+
+# Test.
+#
+# We need to cd to src_base in order to have the schema in the working
+# directory.
+#
+$(test): driver := $(driver)
+$(test): $(driver) $(src_base)/elements.xml $(src_base)/attributes.xml \
+$(src_base)/inherited.xml
+ cd $(src_base) && $(driver) $(src_base)/elements.xml \
+$(src_base)/attributes.xml $(src_base)/inherited.xml
+
+
+# Clean.
+#
+$(clean): $(driver).o.clean \
+ $(addsuffix .cxx.clean,$(obj)) \
+ $(addsuffix .cxx.clean,$(dep)) \
+ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(gen): | $(out_base)/.gitignore
+$(driver): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := driver $(genf)
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
+
+# How to.
+#
+$(call include,$(bld_root)/cxx/o-e.make)
+$(call include,$(bld_root)/cxx/cxx-o.make)
+$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
+
+# Dependencies.
+#
+$(call import,$(src_root)/xsd/makefile)
diff --git a/xsd/tests/cxx/tree/built-in/types.xsd b/xsd/tests/cxx/tree/built-in/types.xsd
new file mode 100644
index 0000000..22582cb
--- /dev/null
+++ b/xsd/tests/cxx/tree/built-in/types.xsd
@@ -0,0 +1,460 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+ <!-- elements -->
+
+ <xsd:complexType name="Elements">
+ <xsd:sequence>
+
+ <!-- integers -->
+ <xsd:element name="byte" type="xsd:byte"/>
+ <xsd:element name="unsigned_byte" type="xsd:unsignedByte"/>
+ <xsd:element name="short" type="xsd:short"/>
+ <xsd:element name="unsigned_short" type="xsd:unsignedShort"/>
+ <xsd:element name="int" type="xsd:int"/>
+ <xsd:element name="unsigned_int" type="xsd:unsignedInt"/>
+ <xsd:element name="long" type="xsd:long"/>
+ <xsd:element name="unsigned_long" type="xsd:unsignedLong"/>
+ <xsd:element name="integer" type="xsd:integer"/>
+ <xsd:element name="non_positive_integer" type="xsd:nonPositiveInteger"/>
+ <xsd:element name="non_negative_integer" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="positive_integer" type="xsd:positiveInteger"/>
+ <xsd:element name="negative_integer" type="xsd:negativeInteger"/>
+
+
+ <!-- boolean -->
+ <xsd:element name="boolean" type="xsd:boolean"/>
+
+
+ <!-- floats -->
+ <xsd:element name="float" type="xsd:float"/>
+ <xsd:element name="double" type="xsd:double"/>
+ <xsd:element name="decimal" type="xsd:decimal"/>
+
+
+ <!-- strings -->
+ <xsd:element name="string" type="xsd:string"/>
+ <xsd:element name="normalized_string" type="xsd:normalizedString"/>
+ <xsd:element name="token" type="xsd:token"/>
+ <xsd:element name="name" type="xsd:Name"/>
+ <xsd:element name="name_token" type="xsd:NMTOKEN"/>
+ <xsd:element name="name_tokens" type="xsd:NMTOKENS"/>
+ <xsd:element name="ncname" type="xsd:NCName"/>
+ <xsd:element name="language" type="xsd:language"/>
+
+ <!-- qualified name -->
+ <xsd:element name="qname" type="xsd:QName"/>
+
+
+ <!-- ID/IDREF -->
+ <xsd:element name="id" maxOccurs="2" type="xsd:ID"/>
+ <xsd:element name="id_ref" type="xsd:IDREF"/>
+ <xsd:element name="id_refs" type="xsd:IDREFS"/>
+
+
+ <!-- URI -->
+ <xsd:element name="any_uri" type="xsd:anyURI"/>
+
+
+ <!-- binary -->
+ <xsd:element name="base64_binary" type="xsd:base64Binary"/>
+ <xsd:element name="hex_binary" type="xsd:hexBinary"/>
+
+
+ <!-- date/time -->
+ <xsd:element name="date" type="xsd:date"/>
+ <xsd:element name="date_time" type="xsd:dateTime"/>
+ <xsd:element name="duration" type="xsd:duration"/>
+ <xsd:element name="day" type="xsd:gDay"/>
+ <xsd:element name="month" type="xsd:gMonth"/>
+ <xsd:element name="month_day" type="xsd:gMonthDay"/>
+ <xsd:element name="year" type="xsd:gYear"/>
+ <xsd:element name="year_month" type="xsd:gYearMonth"/>
+ <xsd:element name="time" type="xsd:time"/>
+
+
+ <!-- entity -->
+ <!--
+ <xsd:element name="entity" type="xsd:ENTITY"/>
+ <xsd:element name="entities" type="xsd:ENTITIES"/>
+ -->
+
+
+ <!-- notation -->
+ <!-- xsd:element name="notation" type="xsd:NOTATION"/ -->
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="elements" type="Elements"/>
+
+
+
+ <!-- attributes -->
+
+ <xsd:complexType name="Attributes">
+ <!-- integers -->
+ <xsd:attribute name="byte" type="xsd:byte"/>
+ <xsd:attribute name="unsigned_byte" type="xsd:unsignedByte"/>
+ <xsd:attribute name="short" type="xsd:short"/>
+ <xsd:attribute name="unsigned_short" type="xsd:unsignedShort"/>
+ <xsd:attribute name="int" type="xsd:int"/>
+ <xsd:attribute name="unsigned_int" type="xsd:unsignedInt"/>
+ <xsd:attribute name="long" type="xsd:long"/>
+ <xsd:attribute name="unsigned_long" type="xsd:unsignedLong"/>
+ <xsd:attribute name="integer" type="xsd:integer"/>
+ <xsd:attribute name="non_positive_integer" type="xsd:nonPositiveInteger"/>
+ <xsd:attribute name="non_negative_integer" type="xsd:nonNegativeInteger"/>
+ <xsd:attribute name="positive_integer" type="xsd:positiveInteger"/>
+ <xsd:attribute name="negative_integer" type="xsd:negativeInteger"/>
+
+
+ <!-- boolean -->
+ <xsd:attribute name="boolean" type="xsd:boolean"/>
+
+
+ <!-- floats -->
+ <xsd:attribute name="float" type="xsd:float"/>
+ <xsd:attribute name="double" type="xsd:double"/>
+ <xsd:attribute name="decimal" type="xsd:decimal"/>
+
+
+ <!-- strings -->
+ <xsd:attribute name="string" type="xsd:string"/>
+ <xsd:attribute name="normalized_string" type="xsd:normalizedString"/>
+ <xsd:attribute name="token" type="xsd:token"/>
+ <xsd:attribute name="name" type="xsd:Name"/>
+ <xsd:attribute name="name_token" type="xsd:NMTOKEN"/>
+ <xsd:attribute name="name_tokens" type="xsd:NMTOKENS"/>
+ <xsd:attribute name="ncname" type="xsd:NCName"/>
+ <xsd:attribute name="language" type="xsd:language"/>
+
+ <!-- qualified name -->
+ <xsd:attribute name="qname" type="xsd:QName"/>
+
+
+ <!-- ID/IDREF -->
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="id_ref" type="xsd:IDREF"/>
+ <xsd:attribute name="id_refs" type="xsd:IDREFS"/>
+
+
+ <!-- URI -->
+ <xsd:attribute name="any_uri" type="xsd:anyURI"/>
+
+
+ <!-- binary -->
+ <xsd:attribute name="base64_binary" type="xsd:base64Binary"/>
+ <xsd:attribute name="hex_binary" type="xsd:hexBinary"/>
+
+
+ <!-- date/time -->
+ <xsd:attribute name="date" type="xsd:date"/>
+ <xsd:attribute name="date_time" type="xsd:dateTime"/>
+ <xsd:attribute name="duration" type="xsd:duration"/>
+ <xsd:attribute name="day" type="xsd:gDay"/>
+ <xsd:attribute name="month" type="xsd:gMonth"/>
+ <xsd:attribute name="month_day" type="xsd:gMonthDay"/>
+ <xsd:attribute name="year" type="xsd:gYear"/>
+ <xsd:attribute name="year_month" type="xsd:gYearMonth"/>
+ <xsd:attribute name="time" type="xsd:time"/>
+
+
+ <!-- entity -->
+ <!--
+ <xsd:attribute name="entity" type="xsd:ENTITY"/>
+ <xsd:attribute name="entities" type="xsd:ENTITIES"/>
+ -->
+
+
+ <!-- notation -->
+ <!-- xsd:element name="notation" type="xsd:NOTATION"/ -->
+ </xsd:complexType>
+
+ <xsd:element name="attributes" type="Attributes"/>
+
+
+ <!-- inheritance -->
+
+ <!-- integers -->
+ <xsd:simpleType name="Byte">
+ <xsd:restriction base="xsd:byte"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="UnsignedByte">
+ <xsd:restriction base="xsd:unsignedByte"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Short">
+ <xsd:restriction base="xsd:short"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="UnsignedShort">
+ <xsd:restriction base="xsd:unsignedShort"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Int">
+ <xsd:restriction base="xsd:int"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="UnsignedInt">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Long">
+ <xsd:restriction base="xsd:long"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="UnsignedLong">
+ <xsd:restriction base="xsd:unsignedLong"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Integer">
+ <xsd:restriction base="xsd:integer"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NonPositiveInteger">
+ <xsd:restriction base="xsd:nonPositiveInteger"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NonNegativeInteger">
+ <xsd:restriction base="xsd:nonNegativeInteger"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="PositiveInteger">
+ <xsd:restriction base="xsd:positiveInteger"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NegativeInteger">
+ <xsd:restriction base="xsd:negativeInteger"/>
+ </xsd:simpleType>
+
+
+ <!-- boolean -->
+ <xsd:simpleType name="Boolean">
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+
+
+ <!-- floats -->
+ <xsd:simpleType name="Float">
+ <xsd:restriction base="xsd:float"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Double">
+ <xsd:restriction base="xsd:double"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Decimal">
+ <xsd:restriction base="xsd:decimal"/>
+ </xsd:simpleType>
+
+
+ <!-- strings -->
+ <xsd:simpleType name="String">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NormalizedString">
+ <xsd:restriction base="xsd:normalizedString"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Token">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Name">
+ <xsd:restriction base="xsd:Name"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NameToken">
+ <xsd:restriction base="xsd:NMTOKEN"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NameTokens">
+ <xsd:restriction base="xsd:NMTOKENS"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="NCName">
+ <xsd:restriction base="xsd:NCName"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Language">
+ <xsd:restriction base="xsd:language"/>
+ </xsd:simpleType>
+
+
+ <!-- qualified name -->
+ <xsd:simpleType name="QName">
+ <xsd:restriction base="xsd:QName"/>
+ </xsd:simpleType>
+
+
+ <!-- ID/IDREF -->
+ <xsd:simpleType name="Id">
+ <xsd:restriction base="xsd:ID"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="IdRef">
+ <xsd:restriction base="xsd:IDREF"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="IdRefs">
+ <xsd:restriction base="xsd:IDREFS"/>
+ </xsd:simpleType>
+
+
+ <!-- URI -->
+ <xsd:simpleType name="URI">
+ <xsd:restriction base="xsd:anyURI"/>
+ </xsd:simpleType>
+
+
+ <!-- binary -->
+ <xsd:simpleType name="Base64Binary">
+ <xsd:restriction base="xsd:base64Binary"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="HexBinary">
+ <xsd:restriction base="xsd:hexBinary"/>
+ </xsd:simpleType>
+
+
+ <!-- date/time -->
+ <xsd:simpleType name="Date">
+ <xsd:restriction base="xsd:date"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="DateTime">
+ <xsd:restriction base="xsd:dateTime"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Duration">
+ <xsd:restriction base="xsd:duration"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Day">
+ <xsd:restriction base="xsd:gDay"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Month">
+ <xsd:restriction base="xsd:gMonth"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="MonthDay">
+ <xsd:restriction base="xsd:gMonthDay"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Year">
+ <xsd:restriction base="xsd:gYear"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="YearMonth">
+ <xsd:restriction base="xsd:gYearMonth"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Time">
+ <xsd:restriction base="xsd:time"/>
+ </xsd:simpleType>
+
+
+ <!-- entity -->
+ <!--
+ <xsd:element name="entity" type="xsd:ENTITY"/>
+ <xsd:element name="entities" type="xsd:ENTITIES"/>
+ -->
+
+
+ <!-- notation -->
+ <!-- xsd:element name="notation" type="xsd:NOTATION"/ -->
+
+ <!-- elements -->
+
+ <xsd:complexType name="Inherited">
+ <xsd:sequence>
+
+ <!-- integers -->
+ <xsd:element name="byte" type="Byte"/>
+ <xsd:element name="unsigned_byte" type="UnsignedByte"/>
+ <xsd:element name="short" type="Short"/>
+ <xsd:element name="unsigned_short" type="UnsignedShort"/>
+ <xsd:element name="int" type="Int"/>
+ <xsd:element name="unsigned_int" type="UnsignedInt"/>
+ <xsd:element name="long" type="Long"/>
+ <xsd:element name="unsigned_long" type="UnsignedLong"/>
+ <xsd:element name="integer" type="Integer"/>
+ <xsd:element name="non_positive_integer" type="NonPositiveInteger"/>
+ <xsd:element name="non_negative_integer" type="NonNegativeInteger"/>
+ <xsd:element name="positive_integer" type="PositiveInteger"/>
+ <xsd:element name="negative_integer" type="NegativeInteger"/>
+
+
+ <!-- boolean -->
+ <xsd:element name="boolean" type="Boolean"/>
+
+
+ <!-- floats -->
+ <xsd:element name="float" type="Float"/>
+ <xsd:element name="double" type="Double"/>
+ <xsd:element name="decimal" type="Decimal"/>
+
+
+ <!-- strings -->
+ <xsd:element name="string" type="String"/>
+ <xsd:element name="normalized_string" type="NormalizedString"/>
+ <xsd:element name="token" type="Token"/>
+ <xsd:element name="name" type="Name"/>
+ <xsd:element name="name_token" type="NameToken"/>
+ <xsd:element name="name_tokens" type="NameTokens"/>
+ <xsd:element name="ncname" type="NCName"/>
+ <xsd:element name="language" type="Language"/>
+
+ <!-- qualified name -->
+ <xsd:element name="qname" type="QName"/>
+
+
+ <!-- ID/IDREF -->
+ <xsd:element name="id" maxOccurs="2" type="Id"/>
+ <xsd:element name="id_ref" type="IdRef"/>
+ <xsd:element name="id_refs" type="IdRefs"/>
+
+
+ <!-- URI -->
+ <xsd:element name="any_uri" type="URI"/>
+
+
+ <!-- binary -->
+ <xsd:element name="base64_binary" type="Base64Binary"/>
+ <xsd:element name="hex_binary" type="HexBinary"/>
+
+
+ <!-- date/time -->
+ <xsd:element name="date" type="Date"/>
+ <xsd:element name="date_time" type="DateTime"/>
+ <xsd:element name="duration" type="Duration"/>
+ <xsd:element name="day" type="Day"/>
+ <xsd:element name="month" type="Month"/>
+ <xsd:element name="month_day" type="MonthDay"/>
+ <xsd:element name="year" type="Year"/>
+ <xsd:element name="year_month" type="YearMonth"/>
+ <xsd:element name="time" type="Time"/>
+
+
+ <!-- entity -->
+ <!--
+ <xsd:element name="entity" type="xsd:ENTITY"/>
+ <xsd:element name="entities" type="xsd:ENTITIES"/>
+ -->
+
+
+ <!-- notation -->
+ <!-- xsd:element name="notation" type="xsd:NOTATION"/ -->
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="inherited" type="Inherited"/>
+
+</xsd:schema>