diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | xsde/xsde.cxx | 17 |
2 files changed, 21 insertions, 0 deletions
@@ -50,6 +50,10 @@ Version 3.2.0 and serialization code that works with both polymorphic and non- polymorphic object models. + * XML Schema union types with members that are enumeration types are + automatically converted to equivalent enumeration types with a union + of all the member's enumerators. + Version 3.1.0 C++/Hybrid diff --git a/xsde/xsde.cxx b/xsde/xsde.cxx index 4311f9a..2281ae9 100644 --- a/xsde/xsde.cxx +++ b/xsde/xsde.cxx @@ -21,6 +21,7 @@ #include <xsd-frontend/parser.hxx> #include <xsd-frontend/transformations/anonymous.hxx> +#include <xsd-frontend/transformations/enum-synthesis.hxx> #include <xsd-frontend/transformations/restriction.hxx> #include <xsd-frontend/transformations/schema-per-type.hxx> #include <xsd-frontend/transformations/simplifier.hxx> @@ -795,6 +796,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (gen_hybrid) + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, tu); + } + // Simplify the schema graph. // { @@ -1077,6 +1086,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (gen_hybrid) + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, ""); + } + // Simplify the schema graph. // { |