summaryrefslogtreecommitdiff
path: root/xsd-tests/morphing/anonymous/group
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-tests/morphing/anonymous/group')
-rw-r--r--xsd-tests/morphing/anonymous/group/buildfile22
-rw-r--r--xsd-tests/morphing/anonymous/group/driver.cxx9
-rw-r--r--xsd-tests/morphing/anonymous/group/test.xsd29
3 files changed, 60 insertions, 0 deletions
diff --git a/xsd-tests/morphing/anonymous/group/buildfile b/xsd-tests/morphing/anonymous/group/buildfile
new file mode 100644
index 0000000..9cedf39
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/group/buildfile
@@ -0,0 +1,22 @@
+# file : morphing/anonymous/group/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/morphing/anonymous/group/driver.cxx b/xsd-tests/morphing/anonymous/group/driver.cxx
new file mode 100644
index 0000000..2a76396
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/group/driver.cxx
@@ -0,0 +1,9 @@
+// file : morphing/anonymous/group/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/xsd-tests/morphing/anonymous/group/test.xsd b/xsd-tests/morphing/anonymous/group/test.xsd
new file mode 100644
index 0000000..73e07af
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/group/test.xsd
@@ -0,0 +1,29 @@
+<?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">
+
+ <!-- Simple case. -->
+
+ <xsd:group name="gfoo">
+ <xsd:sequence>
+ <xsd:element name="foo-1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:group>
+
+
+ <xsd:complexType name="Foo">
+ <xsd:group ref="gfoo"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="Bar">
+ <xsd:group ref="gfoo"/>
+ </xsd:complexType>
+
+</xsd:schema>