diff options
Diffstat (limited to 'xsd-tests/schema/include')
-rw-r--r-- | xsd-tests/schema/include/.gitignore | 1 | ||||
-rw-r--r-- | xsd-tests/schema/include/buildfile | 27 | ||||
-rw-r--r-- | xsd-tests/schema/include/driver.cxx | 9 | ||||
-rw-r--r-- | xsd-tests/schema/include/includer.xsd | 17 | ||||
-rw-r--r-- | xsd-tests/schema/include/schemas/.gitignore | 1 | ||||
-rw-r--r-- | xsd-tests/schema/include/schemas/includee.xsd | 14 |
6 files changed, 69 insertions, 0 deletions
diff --git a/xsd-tests/schema/include/.gitignore b/xsd-tests/schema/include/.gitignore new file mode 100644 index 0000000..4ec7484 --- /dev/null +++ b/xsd-tests/schema/include/.gitignore @@ -0,0 +1 @@ +includer.?xx diff --git a/xsd-tests/schema/include/buildfile b/xsd-tests/schema/include/buildfile new file mode 100644 index 0000000..904e819 --- /dev/null +++ b/xsd-tests/schema/include/buildfile @@ -0,0 +1,27 @@ +# file : schema/include/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} + +fs = includer schemas/includee + +exe{driver}: {hxx cxx}{** -{$fs}} {hxx cxx}{$fs} $libs + +for f: $fs +{ + <{hxx cxx}{$f}>: xsd{$f} $xsd + {{ + diag xsd ($<[0]) # @@ TMP + + $xsd cxx-tree --std c++11 \ + --root-element-all \ + --output-dir $directory($path($>[0])) \ + $path($<[0]) + }} +} + +cxx.poptions =+ "-I$out_base" diff --git a/xsd-tests/schema/include/driver.cxx b/xsd-tests/schema/include/driver.cxx new file mode 100644 index 0000000..779d9d6 --- /dev/null +++ b/xsd-tests/schema/include/driver.cxx @@ -0,0 +1,9 @@ +// file : schema/include/driver.cxx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#include "includer.hxx" + +int +main (int, char*[]) +{ +} diff --git a/xsd-tests/schema/include/includer.xsd b/xsd-tests/schema/include/includer.xsd new file mode 100644 index 0000000..c93ea18 --- /dev/null +++ b/xsd-tests/schema/include/includer.xsd @@ -0,0 +1,17 @@ +<?xml version="1.0" ?> +<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:Test="http://www.codesynthesis.com/xmlns/test" + targetNamespace="http://www.codesynthesis.com/xmlns/test"> + + <xsd:include schemaLocation="schemas/includee.xsd"/> + + <xsd:simpleType name="derived"> + <xsd:restriction base="Test:base"/> + </xsd:simpleType> + + <xsd:element name="element" type="Test:base"/> + <xsd:attribute name="attribute" type="Test:base"/> + +</xsd:schema> diff --git a/xsd-tests/schema/include/schemas/.gitignore b/xsd-tests/schema/include/schemas/.gitignore new file mode 100644 index 0000000..dcf4bb9 --- /dev/null +++ b/xsd-tests/schema/include/schemas/.gitignore @@ -0,0 +1 @@ +includee.?xx diff --git a/xsd-tests/schema/include/schemas/includee.xsd b/xsd-tests/schema/include/schemas/includee.xsd new file mode 100644 index 0000000..0a928f5 --- /dev/null +++ b/xsd-tests/schema/include/schemas/includee.xsd @@ -0,0 +1,14 @@ +<?xml version="1.0" ?> +<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:test="http://www.codesynthesis.com/xmlns/test" + targetNamespace="http://www.codesynthesis.com/xmlns/test"> + + <xsd:simpleType name="base"> + <xsd:restriction base="xsd:string"/> + </xsd:simpleType> + + <xsd:element name="base_e" type="test:base"/> + +</xsd:schema> |