aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--xsde/xsde.cxx17
2 files changed, 21 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3ad834f..96dcb95 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
//
{