diff options
Diffstat (limited to 'xsd-tests/schema/import')
-rw-r--r-- | xsd-tests/schema/import/.gitignore | 1 | ||||
-rw-r--r-- | xsd-tests/schema/import/buildfile | 24 | ||||
-rw-r--r-- | xsd-tests/schema/import/driver.cxx | 10 | ||||
-rw-r--r-- | xsd-tests/schema/import/importer.xsd | 20 | ||||
-rw-r--r-- | xsd-tests/schema/import/schemas/.gitignore | 1 | ||||
-rw-r--r-- | xsd-tests/schema/import/schemas/importee.xsd | 15 |
6 files changed, 71 insertions, 0 deletions
diff --git a/xsd-tests/schema/import/.gitignore b/xsd-tests/schema/import/.gitignore new file mode 100644 index 0000000..6cdf6db --- /dev/null +++ b/xsd-tests/schema/import/.gitignore @@ -0,0 +1 @@ +importer.?xx diff --git a/xsd-tests/schema/import/buildfile b/xsd-tests/schema/import/buildfile new file mode 100644 index 0000000..9d752ef --- /dev/null +++ b/xsd-tests/schema/import/buildfile @@ -0,0 +1,24 @@ +# file : schema/import/buildfile +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +import libs = libxsd%lib{xsd} +import libs += libxerces-c%lib{xerces-c} + +fs = importer schemas/importee + +exe{driver}: {hxx cxx}{** -{$fs}} {hxx cxx}{$fs} $libs + +cxx.poptions =+ "-I$out_base" + +for f: $fs +{ + <{hxx cxx}{$f}>: xsd{$f} $xsd + {{ + diag xsd ($<[0]) # @@ TMP + + $xsd cxx-tree $xsd_cxx_std \ + --root-element-all \ + --output-dir $directory($path($>[0])) \ + $path($<[0]) + }} +} diff --git a/xsd-tests/schema/import/driver.cxx b/xsd-tests/schema/import/driver.cxx new file mode 100644 index 0000000..d5f524e --- /dev/null +++ b/xsd-tests/schema/import/driver.cxx @@ -0,0 +1,10 @@ +// file : schema/import/driver.cxx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#include "importer.hxx" +#include "schemas/importee.hxx" + +int +main (int, char*[]) +{ +} diff --git a/xsd-tests/schema/import/importer.xsd b/xsd-tests/schema/import/importer.xsd new file mode 100644 index 0000000..82fc33c --- /dev/null +++ b/xsd-tests/schema/import/importer.xsd @@ -0,0 +1,20 @@ +<?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" + xmlns:Impl="http://www.codesynthesis.com/xmlns/test/impl" + targetNamespace="http://www.codesynthesis.com/xmlns/test/impl"> + + <!-- <xsd::element name="foo" type="xsd:string"/> --> + + <xsd:import namespace="http://www.codesynthesis.com/xmlns/test" schemaLocation="schemas/importee.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/import/schemas/.gitignore b/xsd-tests/schema/import/schemas/.gitignore new file mode 100644 index 0000000..945fcfc --- /dev/null +++ b/xsd-tests/schema/import/schemas/.gitignore @@ -0,0 +1 @@ +importee.?xx diff --git a/xsd-tests/schema/import/schemas/importee.xsd b/xsd-tests/schema/import/schemas/importee.xsd new file mode 100644 index 0000000..9b03315 --- /dev/null +++ b/xsd-tests/schema/import/schemas/importee.xsd @@ -0,0 +1,15 @@ +<?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> |