diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | xsd/xsd.cxx | 17 |
2 files changed, 21 insertions, 0 deletions
@@ -110,6 +110,10 @@ Version 3.3.0 * Empty XML Schema enumeration values are now mapped to the 'empty' C++ enumerator name instead of 'cxx'. + * 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.2.0 * New option, --disable-warning, disables printing of a warning with diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx index a0b26a7..1c66a8a 100644 --- a/xsd/xsd.cxx +++ b/xsd/xsd.cxx @@ -18,6 +18,7 @@ #include <xsd-frontend/parser.hxx> #include <xsd-frontend/transformations/anonymous.hxx> +#include <xsd-frontend/transformations/enum-synthesis.cxx> #include <xsd-frontend/transformations/restriction.hxx> #include <xsd-frontend/transformations/schema-per-type.hxx> #include <xsd-frontend/transformations/simplifier.hxx> @@ -718,6 +719,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (cmd == "cxx-tree") + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, tu); + } + // Simplify the schema graph. // if (cmd == "cxx-parser") @@ -862,6 +871,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (cmd == "cxx-tree") + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, ""); + } + // Simplify the schema graph. // if (cmd == "cxx-parser") |