[xsd-users] Extract common type definitions to a separate header
Yury Zaytsev
yury.zaytsev at traveltainment.de
Fri Apr 17 07:21:49 EDT 2015
Hello,
I'm using XSD on a biggish schema of the order of magnitude of thousands
of types. Since the schema is rather large and the definition spans many
files with circular dependencies, I've opted for the excellent
"--file-per-type" mode.
However, I've noticed that every header file for the generated entities at
the very beginning has a section that defines common types by including
XSD runtime headers and populating the xml_schema namespace:
#include <xsd/cxx/version.hxx>
...
namespace xml_schema
{
...
}
As far as I can see (I could have easily missed something though), this
code is completely stereotypical and same for all headers.
If this is indeed the case, then putting these 5 Kbs into a separate
header will shave off some 5 Mbs for a thousand types and will make the
generated code much smaller and the compilation much faster.
In addition, I could include this header instead of <root_type-fwd.hxx> to
get just xml_schema::exception, etc.
Could this feature be possibly considered for implementation?
All the best,
--
Dr. Yury V. Zaytsev
Senior Software Developer
IT Data Production
TravelTainment GmbH
Carlo-Schmid-Straße 12
52146 Würselen/Aachen, Germany
yury.zaytsev at traveltainment.de
http://www.traveltainment.de
Amtsgericht Aachen, HRB 15873
Geschäftsführer: Bernhard Steffens (Vorsitzender),
Dr. Oliver Rengelshausen
More information about the xsd-users
mailing list