summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE26
-rw-r--r--NEWS1271
-rw-r--r--PACKAGE-README.md66
-rw-r--r--README.md45
-rw-r--r--libxsd-tests/.gitignore6
-rw-r--r--libxsd-tests/README8
-rw-r--r--libxsd-tests/README.md4
-rw-r--r--libxsd-tests/buildfile2
-rw-r--r--libxsd-tests/cxx/parser/expat/basic/driver.cxx4
-rw-r--r--libxsd-tests/cxx/parser/xerces/basic/driver.cxx4
-rw-r--r--libxsd-tests/cxx/tree/basic/driver.cxx4
-rw-r--r--libxsd-tests/manifest16
-rw-r--r--libxsd/.gitignore6
-rw-r--r--libxsd/INSTALL6
l---------[-rw-r--r--]libxsd/NEWS2
l---------libxsd/PACKAGE-README.md1
-rw-r--r--libxsd/README13
-rw-r--r--libxsd/README-GIT4
-rw-r--r--libxsd/README.md12
-rw-r--r--libxsd/build/root.build2
-rw-r--r--libxsd/buildfile9
-rw-r--r--libxsd/doc/buildfile137
-rw-r--r--libxsd/manifest113
-rw-r--r--libxsd/xsd/cxx/tree/type-factory-map.hxx7
-rw-r--r--libxsd/xsd/cxx/tree/type-factory-map.txx16
-rw-r--r--libxsd/xsd/cxx/tree/type-serializer-map.hxx5
-rw-r--r--libxsd/xsd/cxx/tree/type-serializer-map.txx11
-rw-r--r--libxsd/xsd/cxx/xml/char-utf8.txx12
-rw-r--r--libxsd/xsd/cxx/xml/dom/parsing-source.hxx1
-rw-r--r--libxsd/xsd/cxx/xml/dom/parsing-source.txx36
-rw-r--r--libxsd/xsd/cxx/xml/dom/serialization-source.txx33
-rw-r--r--xsd-examples/.gitignore6
-rw-r--r--xsd-examples/README21
-rw-r--r--xsd-examples/README.md11
-rw-r--r--xsd-examples/build/root.build47
-rw-r--r--xsd-examples/buildfile2
-rw-r--r--xsd-examples/cxx/parser/README2
-rw-r--r--xsd-examples/cxx/parser/generated/README34
-rw-r--r--xsd-examples/cxx/parser/generated/buildfile4
-rw-r--r--xsd-examples/cxx/parser/hello/README25
-rw-r--r--xsd-examples/cxx/parser/hello/buildfile4
-rw-r--r--xsd-examples/cxx/parser/library/README27
-rw-r--r--xsd-examples/cxx/parser/library/buildfile4
-rw-r--r--xsd-examples/cxx/parser/mixed/README26
-rw-r--r--xsd-examples/cxx/parser/mixed/buildfile4
-rw-r--r--xsd-examples/cxx/parser/mixin/README27
-rw-r--r--xsd-examples/cxx/parser/mixin/buildfile4
-rw-r--r--xsd-examples/cxx/parser/multiroot/README31
-rw-r--r--xsd-examples/cxx/parser/multiroot/buildfile4
-rw-r--r--xsd-examples/cxx/parser/performance/README44
-rw-r--r--xsd-examples/cxx/parser/performance/buildfile4
-rw-r--r--xsd-examples/cxx/parser/polymorphism/README26
-rw-r--r--xsd-examples/cxx/parser/polymorphism/buildfile4
-rw-r--r--xsd-examples/cxx/parser/polyroot/README30
-rw-r--r--xsd-examples/cxx/parser/polyroot/buildfile4
-rw-r--r--xsd-examples/cxx/parser/wildcard/README24
-rw-r--r--xsd-examples/cxx/parser/wildcard/buildfile4
-rw-r--r--xsd-examples/cxx/tree/binary/boost/README37
-rw-r--r--xsd-examples/cxx/tree/binary/boost/buildfile4
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/README29
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/buildfile4
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/README25
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/buildfile4
-rw-r--r--xsd-examples/cxx/tree/caching/README21
-rw-r--r--xsd-examples/cxx/tree/caching/buildfile4
-rw-r--r--xsd-examples/cxx/tree/compression/README38
-rw-r--r--xsd-examples/cxx/tree/compression/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/README37
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/buildfile8
-rw-r--r--xsd-examples/cxx/tree/custom/comments/README42
-rw-r--r--xsd-examples/cxx/tree/custom/comments/buildfile8
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/README23
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/buildfile12
-rw-r--r--xsd-examples/cxx/tree/custom/double/README44
-rw-r--r--xsd-examples/cxx/tree/custom/double/buildfile8
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/README30
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/README34
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/README24
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/buildfile4
-rw-r--r--xsd-examples/cxx/tree/embedded/README44
-rw-r--r--xsd-examples/cxx/tree/embedded/buildfile6
-rw-r--r--xsd-examples/cxx/tree/hello/README18
-rw-r--r--xsd-examples/cxx/tree/hello/buildfile4
-rw-r--r--xsd-examples/cxx/tree/library/README18
-rw-r--r--xsd-examples/cxx/tree/library/buildfile4
-rw-r--r--xsd-examples/cxx/tree/messaging/README41
-rw-r--r--xsd-examples/cxx/tree/messaging/buildfile4
-rw-r--r--xsd-examples/cxx/tree/mixed/README21
-rw-r--r--xsd-examples/cxx/tree/mixed/buildfile4
-rw-r--r--xsd-examples/cxx/tree/multiroot/README28
-rw-r--r--xsd-examples/cxx/tree/multiroot/buildfile4
-rw-r--r--xsd-examples/cxx/tree/order/element/README34
-rw-r--r--xsd-examples/cxx/tree/order/element/buildfile4
-rw-r--r--xsd-examples/cxx/tree/order/mixed/README25
-rw-r--r--xsd-examples/cxx/tree/order/mixed/buildfile4
-rw-r--r--xsd-examples/cxx/tree/performance/README41
-rw-r--r--xsd-examples/cxx/tree/performance/buildfile4
-rw-r--r--xsd-examples/cxx/tree/polymorphism/README22
-rw-r--r--xsd-examples/cxx/tree/polymorphism/buildfile4
-rw-r--r--xsd-examples/cxx/tree/secure/README22
-rw-r--r--xsd-examples/cxx/tree/secure/buildfile4
-rw-r--r--xsd-examples/cxx/tree/streaming/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/streaming/README26
-rw-r--r--xsd-examples/cxx/tree/streaming/buildfile4
-rw-r--r--xsd-examples/cxx/tree/wildcard/README23
-rw-r--r--xsd-examples/cxx/tree/wildcard/buildfile4
-rw-r--r--xsd-examples/cxx/tree/xpath/README22
-rw-r--r--xsd-examples/cxx/tree/xpath/buildfile4
-rw-r--r--xsd-examples/manifest16
-rw-r--r--xsd-tests/.gitignore6
-rw-r--r--xsd-tests/README8
-rw-r--r--xsd-tests/README.md4
-rw-r--r--xsd-tests/build/root.build47
-rw-r--r--xsd-tests/buildfile2
-rw-r--r--xsd-tests/clash/buildfile4
-rw-r--r--xsd-tests/clash/driver.cxx3
-rw-r--r--xsd-tests/code/name-conflict/buildfile4
-rw-r--r--xsd-tests/code/name-conflict/driver.cxx3
-rw-r--r--xsd-tests/code/name-escaping/buildfile4
-rw-r--r--xsd-tests/code/name-escaping/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/built-in/buildfile4
-rw-r--r--xsd-tests/cxx/parser/built-in/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/enumeration/buildfile4
-rw-r--r--xsd-tests/cxx/parser/enumeration/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/generated-impl/buildfile4
-rw-r--r--xsd-tests/cxx/parser/list/buildfile4
-rw-r--r--xsd-tests/cxx/parser/list/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/buildfile4
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/buildfile4
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx3
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/buildfile4
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/recursive/buildfile4
-rw-r--r--xsd-tests/cxx/parser/recursive/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/test-template/buildfile4
-rw-r--r--xsd-tests/cxx/parser/test-template/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/union/buildfile4
-rw-r--r--xsd-tests/cxx/parser/union/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/all/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/all/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/any/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/any/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/float/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/int/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/long/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/short/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/string/driver.cxx4
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx5
-rw-r--r--xsd-tests/cxx/parser/validation/choice/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/choice/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/driver.cxx3
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/buildfile4
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/driver.cxx5
-rw-r--r--xsd-tests/cxx/tree/any-type/buildfile4
-rw-r--r--xsd-tests/cxx/tree/any-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/buildfile4
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/buildfile4
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/buildfile4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/buildfile4
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/built-in/buildfile4
-rw-r--r--xsd-tests/cxx/tree/built-in/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/chameleon/buildfile4
-rw-r--r--xsd-tests/cxx/tree/chameleon/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/comparison/buildfile4
-rw-r--r--xsd-tests/cxx/tree/comparison/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/compilation/buildfile4
-rw-r--r--xsd-tests/cxx/tree/compilation/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/buildfile4
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/containment/buildfile4
-rw-r--r--xsd-tests/cxx/tree/containment/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/default/general/buildfile4
-rw-r--r--xsd-tests/cxx/tree/default/general/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/default/omit/buildfile4
-rw-r--r--xsd-tests/cxx/tree/default/omit/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/detach/buildfile4
-rw-r--r--xsd-tests/cxx/tree/detach/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/dom-association/buildfile4
-rw-r--r--xsd-tests/cxx/tree/dom-association/dom-parse.cxx3
-rw-r--r--xsd-tests/cxx/tree/dom-association/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile4
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/buildfile4
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/buildfile4
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/buildfile4
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/buildfile4
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/buildfile4
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/float/buildfile4
-rw-r--r--xsd-tests/cxx/tree/float/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/list/ctor/buildfile4
-rw-r--r--xsd-tests/cxx/tree/list/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/buildfile4
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/camel/buildfile4
-rw-r--r--xsd-tests/cxx/tree/naming/camel/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/java/buildfile4
-rw-r--r--xsd-tests/cxx/tree/naming/java/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/naming/knr/buildfile4
-rw-r--r--xsd-tests/cxx/tree/naming/knr/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/order/buildfile4
-rw-r--r--xsd-tests/cxx/tree/order/driver.cxx4
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/buildfile4
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/buildfile4
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/buildfile4
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/prefix/buildfile4
-rw-r--r--xsd-tests/cxx/tree/prefix/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/test-template/buildfile4
-rw-r--r--xsd-tests/cxx/tree/test-template/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/types-only/buildfile4
-rw-r--r--xsd-tests/cxx/tree/types-only/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/union/ctor/buildfile4
-rw-r--r--xsd-tests/cxx/tree/union/ctor/driver.cxx3
-rw-r--r--xsd-tests/cxx/tree/wildcard/buildfile4
-rw-r--r--xsd-tests/cxx/tree/wildcard/driver.cxx3
-rw-r--r--xsd-tests/failed/buildfile4
-rw-r--r--xsd-tests/failed/driver.cxx3
-rw-r--r--xsd-tests/manifest16
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/buildfile4
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/basic/buildfile4
-rw-r--r--xsd-tests/morphing/anonymous/basic/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile4
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/group/buildfile4
-rw-r--r--xsd-tests/morphing/anonymous/group/driver.cxx3
-rw-r--r--xsd-tests/morphing/anonymous/unstable/buildfile6
-rw-r--r--xsd-tests/processing/inheritance/buildfile4
-rw-r--r--xsd-tests/processing/inheritance/driver.cxx.in3
-rw-r--r--xsd-tests/schema/anonymous/buildfile4
-rw-r--r--xsd-tests/schema/anonymous/driver.cxx3
-rw-r--r--xsd-tests/schema/any-attribute/buildfile2
-rw-r--r--xsd-tests/schema/any-type/buildfile4
-rw-r--r--xsd-tests/schema/any-type/driver.cxx3
-rw-r--r--xsd-tests/schema/any/buildfile8
-rw-r--r--xsd-tests/schema/any/driver.cxx.in3
-rw-r--r--xsd-tests/schema/attribute-group/buildfile4
-rw-r--r--xsd-tests/schema/attribute-group/driver.cxx3
-rw-r--r--xsd-tests/schema/attribute/buildfile4
-rw-r--r--xsd-tests/schema/attribute/driver.cxx3
-rw-r--r--xsd-tests/schema/cardinality/buildfile4
-rw-r--r--xsd-tests/schema/cardinality/driver.cxx3
-rw-r--r--xsd-tests/schema/chameleon/buildfile4
-rw-r--r--xsd-tests/schema/chameleon/driver.cxx3
-rw-r--r--xsd-tests/schema/enumeration/buildfile4
-rw-r--r--xsd-tests/schema/enumeration/driver.cxx3
-rw-r--r--xsd-tests/schema/forward/buildfile4
-rw-r--r--xsd-tests/schema/forward/driver.cxx3
-rw-r--r--xsd-tests/schema/group/buildfile4
-rw-r--r--xsd-tests/schema/group/driver.cxx3
-rw-r--r--xsd-tests/schema/import/buildfile4
-rw-r--r--xsd-tests/schema/import/driver.cxx3
-rw-r--r--xsd-tests/schema/include/buildfile4
-rw-r--r--xsd-tests/schema/include/driver.cxx3
-rw-r--r--xsd-tests/schema/inheritance/buildfile6
-rw-r--r--xsd-tests/schema/list/buildfile6
-rw-r--r--xsd-tests/schema/no-namespace/buildfile4
-rw-r--r--xsd-tests/schema/no-namespace/driver.cxx3
-rw-r--r--xsd-tests/schema/recursive/buildfile4
-rw-r--r--xsd-tests/schema/recursive/driver.cxx3
-rw-r--r--xsd-tests/schema/ref-type/invalid/buildfile2
-rw-r--r--xsd-tests/schema/ref-type/valid/buildfile4
-rw-r--r--xsd-tests/schema/ref-type/valid/driver.cxx.in3
-rw-r--r--xsd-tests/schema/restriction/buildfile4
-rw-r--r--xsd-tests/schema/restriction/driver.cxx3
-rw-r--r--xsd-tests/schema/union/buildfile4
-rw-r--r--xsd-tests/schema/union/driver.cxx3
-rw-r--r--xsd/.gitignore6
-rw-r--r--xsd/INSTALL6
l---------[-rw-r--r--]xsd/NEWS1221
l---------xsd/PACKAGE-README.md1
-rw-r--r--xsd/README29
-rw-r--r--xsd/README.md12
-rw-r--r--xsd/build/root.build11
-rw-r--r--xsd/buildfile9
-rw-r--r--xsd/doc/.gitignore7
-rw-r--r--xsd/doc/buildfile363
-rw-r--r--xsd/doc/cxx/.gitignore4
-rw-r--r--xsd/doc/cxx/parser/guide/.gitignore2
-rw-r--r--xsd/doc/cxx/parser/guide/index.xhtml.in19
-rw-r--r--xsd/doc/cxx/tree/guide/.gitignore2
-rw-r--r--xsd/doc/cxx/tree/guide/index.xhtml.in14
-rw-r--r--xsd/doc/cxx/tree/manual/.gitignore2
-rw-r--r--xsd/doc/cxx/tree/manual/index.xhtml.in6
-rw-r--r--xsd/doc/pregenerated/xsd.11500
-rw-r--r--xsd/doc/pregenerated/xsd.xhtml1620
-rw-r--r--xsd/doc/xsd-epilogue.120
-rw-r--r--xsd/doc/xsd-epilogue.xhtml33
-rw-r--r--xsd/doc/xsd-prologue.xhtml5
-rw-r--r--xsd/manifest159
-rw-r--r--xsd/tests/.gitignore2
-rw-r--r--xsd/tests/build/.gitignore3
-rw-r--r--xsd/tests/build/bootstrap.build8
-rw-r--r--xsd/tests/build/root.build16
-rw-r--r--xsd/tests/buildfile4
-rw-r--r--xsd/tests/testscript26
-rw-r--r--xsd/xsd/.gitignore6
-rw-r--r--xsd/xsd/buildfile113
-rw-r--r--xsd/xsd/cxx/.gitignore1
-rw-r--r--xsd/xsd/cxx/elements.cxx45
-rw-r--r--xsd/xsd/cxx/option-types.cxx14
-rw-r--r--xsd/xsd/cxx/option-types.hxx8
-rw-r--r--xsd/xsd/cxx/options.cli22
-rw-r--r--xsd/xsd/cxx/parser/generator.cxx200
-rw-r--r--xsd/xsd/cxx/tree/generator.cxx183
-rw-r--r--xsd/xsd/cxx/tree/name-processor.cxx26
-rw-r--r--xsd/xsd/cxx/tree/options.cli6
-rw-r--r--xsd/xsd/cxx/tree/serialization-source.cxx30
-rw-r--r--xsd/xsd/cxx/tree/tree-inline.cxx6
-rw-r--r--xsd/xsd/cxx/tree/tree-source.cxx30
-rw-r--r--xsd/xsd/cxx/tree/validator.cxx2
-rw-r--r--xsd/xsd/options.cli15
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.cxx739
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.hxx451
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.ixx615
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx776
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/parser/options.hxx186
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/parser/options.ixx162
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx1343
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/tree/options.hxx414
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/tree/options.ixx504
-rw-r--r--xsd/xsd/pregenerated/xsd/options.cxx1297
-rw-r--r--xsd/xsd/pregenerated/xsd/options.hxx702
-rw-r--r--xsd/xsd/pregenerated/xsd/options.ixx555
-rw-r--r--xsd/xsd/xsd.cxx35
351 files changed, 14972 insertions, 2579 deletions
diff --git a/LICENSE b/LICENSE
index 1a691ad..ec7f72f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2021 Code Synthesis Tools CC.
+Copyright (c) 2005-2023 Code Synthesis.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
@@ -13,16 +13,16 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-In addition, as a special exception, Code Synthesis Tools CC gives
-permission to link this program with the Xerces-C++ library (or with
-modified versions of Xerces-C++ that use the same license as Xerces-C++),
-and distribute linked combinations including the two. You must obey
-the GNU General Public License version 2 in all respects for all of
-the code used other than Xerces-C++. If you modify this copy of the
-program, you may extend this exception to your version of the program,
-but you are not obligated to do so. If you do not wish to do so, delete
-this exception statement from your version.
+In addition, as a special exception, Code Synthesis gives permission to
+link this program with the Xerces-C++ library (or with modified versions
+of Xerces-C++ that use the same license as Xerces-C++), and distribute
+linked combinations including the two. You must obey the GNU General
+Public License version 2 in all respects for all of the code used other
+than Xerces-C++. If you modify this copy of the program, you may extend
+this exception to your version of the program, but you are not obligated
+to do so. If you do not wish to do so, delete this exception statement
+from your version.
-In addition, Code Synthesis Tools CC makes a special exception for
-the Free/Libre and Open Source Software (FLOSS) which is described
-in the accompanying FLOSSE file.
+In addition, Code Synthesis makes a special exception for the Free/Libre
+and Open Source Software (FLOSS) which is described in the accompanying
+FLOSSE file.
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..cd4e0ce
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,1271 @@
+Version 4.2.0
+
+ * In this version we have switched to the build2 build system. For the
+ step-by-step instructions on how to build XSD from source on all the
+ major platforms, see:
+
+ https://codesynthesis.com/products/xsd/doc/install-build2.xhtml
+
+ * In this version we have changed the default C++ standard that is used
+ by the generated code from C++98 to C++11. While you can still request
+ C++98 with the --std=c++98 option, note that this is the last release
+ that supports the C++98 standard and the next release will require C++11
+ or later (in fact, building the XSD compiler itself already requires
+ C++11 or later). Note also that the --std option now recognizes the
+ c++14, c++17, c++20, and c++23 additional values.
+
+ * This version will be the last release that supports Xerces-C++ earlier
+ than 3.1.0 and the next release will require Xerces-C++ 3.1.0 or later.
+
+ * New --file-list-only option that allows only writing the list of C++
+ files that would be generated without actually generating them.
+
+ * The --file-list option now recognize the `-` value as a request to write
+ to stdout.
+
+ * New --dep-file option that allows specifying the dependency file name.
+ It also allows writing the dependency information to stdout by specifying
+ `-` as this option's value.
+
+ * This version contains a large number of bug fixes and minor improvements
+ that have accumulated over the years.
+
+C++/Tree
+
+ * Support for abstract XML Schema types. The corresponding C++ classes now
+ have the _clone() member function declared pure virtual which prevents
+ the construction of instances of such types.
+
+ Note that if after upgrading to this version you start getting C++
+ compile errors in the generated code with diagnostics saying that a
+ type cannot be instantiated because _clone() is pure virtual, then
+ it's a strong indication that this type (or its base) is polymorphic
+ and needs to be marked as such (see --polymorphic-type* options).
+
+ * New base_string() accessors in the xml_schema::{string,uri} types that
+ return the underlying string.
+
+ * Support for `ucc` (upper-camel-case) value in the --function-naming
+ option.
+
+ * New C++/Tree `secure` example (xsd-examples/cxx/tree/secure/) shows how
+ to perform more secure XML parsing by disabling the XML External Entity
+ (XXE) Processing. See the accompanying README file for details.
+
+Version 4.1.0
+
+ * This version was never released. It was skipped due to a minor versioning
+ scheme adjustment in the pre-release component when migrating to build2.
+
+Version 4.0.0
+
+ * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported.
+
+ * Visual Studio 2003 (7.1) is no longer supported.
+
+ * HP aCC3 (HP-UX/PA-RISC) is no longer supported.
+
+ * Oracle/Berkeley DB XML support has been removed since it no longer
+ supports the Xerces-C++-based document access.
+
+ * New option, --std, specifies the C++ standard that the generated code
+ should conform to. Valid values are c++98 (default) and c++11.
+
+ The C++ standard affects various aspects of the generated code that are
+ discussed in more detail in mapping-specific documentation (guides and
+ manuals). Overall, when C++11 is selected, the generated code relies on
+ the move semantics and uses std::unique_ptr instead of deprecated
+ std::auto_ptr. See also the documentation for the --std option in the
+ XSD compiler command line manual (man pages).
+
+ * New option, --fat-type-file, triggers the placement of code corresponding
+ to global elements into type files instead of schema files in the file-
+ per-type mode. This option is primarily useful when trying to minimize
+ the amount of object code that is linked to an executable by packaging
+ compiled generated code into a static (archive) library.
+
+C++/Tree
+
+ * Support for ordered types. C++/Tree flattens nested compositors which
+ sometimes can result in the loss of element ordering information that
+ could be significant to the application. Ordered types address this
+ problem. For more information, refer to Section 2.8.4, "Element Order"
+ in the C++/Tree Mapping User Manual.
+
+ * Support for mixed content in ordered types. For more information, refer
+ to Section 2.13, "Mapping for Mixed Content Models" in the C++/Tree
+ Mapping User Manual.
+
+ * xml_schema::type represents anyType content as a DOM fragment, similar
+ to wildcards. For more information, refer to Section 2.5.2, "Mapping
+ for anyType" in the C++/Tree Mapping User Manual.
+
+ * xml_schema::simple_type represents anySimpleType content as a text
+ string. For more information, refer to Section 2.5.3, "Mapping for
+ anySimpleType" in the C++/Tree Mapping User Manual.
+
+ * Improved streaming example that now provides better XML namespace
+ handling and supports streaming parsing and serialization at multiple
+ document levels.
+
+ * New option, --generate-dep, triggers the generation of the make
+ dependency files (.d) for the generated C++ files. Other options
+ controlling dependency generation are: --generate-dep-only,
+ --dep-phony, --dep-target, --dep-suffix, and --dep-regex. For
+ details on this functionality, refer to the XSD compiler command
+ line manual (man pages).
+
+ * New option, --suppress-assignment, suppresses the generation of copy
+ assignment operators for complex types. If this option is specified,
+ the copy assignment operators for such types are declared private and
+ left unimplemented.
+
+ * Binary representation now stores string-based enumerations as integer
+ values corresponding to C++ enumerators instead of string literals.
+
+ * Binary representation now pools polymorphic type-id strings in an
+ implicit string pool. The string pool support can also be used to
+ pool strings in other situations. For example, you can implement
+ string insertion/extraction operators for your stream to pool all
+ strings. This can be useful if your documents contain a large number
+ of repetitive strings.
+
+ * New option, --polymorphic-plate, allows the creation of multiple
+ polymorphic map plates in the same application. For details, refer
+ to the XSD compiler command line manual (man pages).
+
+ * To get the DOM association in the copy of an object model tree one
+ now needs to explicitly pass the xml_schema::flags::keep_dom flag as
+ the second argument to the copy constructor or clone() function.
+
+Version 3.3.0
+
+ * New option, --char-encoding, allows you to specify the character encoding
+ that should be used in the generated code. Valid values for the 'char'
+ character type are 'utf8' (default), 'iso8859-1' (new), 'lcp' (Xerces-C++
+ local code page), and 'custom' (provides support for custom encodings).
+ Note that if you use a non-default character encoding and include some
+ libxsd headers (e.g., xsd/cxx/xml/string.hxx) directly, then you will
+ need to first include the correct xsd/cxx/xml/char-<enc>.hxx header,
+ where <enc> is iso8859-1, lcp, etc. This mechanism replaces the
+ XSD_USE_LCP macro.
+
+ For the wchar_t character type the only valid value for this option is
+ 'auto' and the encoding is automatically selected between UTF-16 and
+ UTF-32, depending on the wchar_t type size.
+
+ * When the XSD compiler is built with Xerces-C++ 3.1.0 or later, the
+ handling of multiple imports for the same namespace is enabled. Before,
+ all subsequent imports for a namespace were ignored which caused errors
+ in some schemas. Note that if your application has XML Schema validation
+ enabled, then you will also need to build it with Xerces-C++ 3.1.0 or
+ later to take advantage of this feature.
+
+ * Automatic mapping for the urn-style XML namespaces. The last component
+ in the urn name is used to derive the C++ namespace name.
+
+ * New option, --schema-file-regex, in combination with the existing
+ --type-file-regex, can be used to place the generated files into
+ subdirectories or to resolve file name conflicts in the file-per-
+ type mode (--file-per-type).
+
+ * Warning id's have changed to start with a letter identifying the
+ component issuing the warning. F - compiler frontend, D - compiler
+ driver, P - C++/Parser mapping, T - C++/Tree mapping.
+
+ * Strings used to match regular expressions supplied with the
+ --namespace-regex and --anonymous-regex options now include the file
+ component for the schema being compiled.
+
+ * The XSD_NO_EXPORT macro can be used to omit code generated with the
+ --export/import-maps and, for C++/Tree, --generate-xml-schema options
+ during C++ compilation. This may be useful if you would like to use
+ the same generated code across multiple platforms.
+
+ C++/Tree
+
+ * New option, --generate-element-type, triggers the generation of types
+ instead of parsing/serialization functions for root elements. This
+ is primarily useful to distinguish object models with the same root
+ type but with different root elements. For more information, refer
+ to the messaging example and Section 2.9.1, "Element Types" in the
+ C++/Tree Mapping User Manual. To support the customization of the
+ element type naming the --element-type-regex option has been added.
+ See the NAMING CONVENTION section in the compiler command line manual
+ (man pages) for details.
+
+ * New option, --generate-element-map, triggers the generation of a root
+ element map. The element map allows uniform parsing and serialization
+ of multiple root elements. This option can only be used together with
+ --generate-element-type. For more information, refer to the messaging
+ example and Section 2.9.2, "Element Map" in the C++/Tree Mapping
+ User Manual.
+
+ * Prior to this version, if the --generate-polymorphic option is
+ specified, the compiler treats all types as potentially polymorphic.
+ Now by default only type hierarchies used in substitution groups and
+ those explicitly declared polymorphic with the new --polymorphic-type
+ option are treated as polymorphic. This results in smaller and faster
+ generated code. If you would like to continue using the old behavior,
+ you will need to specify --polymorphic-type-all. For more information,
+ on this change see Section 2.11, "Mapping for xsi:type and Substitution
+ Groups" in the C++/Tree Mapping User Manual.
+
+ * New option, --generate-detach, triggers the generation of detach
+ functions for required elements and attributes. For optional and
+ sequence cardinalities the detach functions are now provided by the
+ respective containers even without this option. These functions, for
+ example, allow one to move sub-trees in the object model either within
+ the same tree or between different trees without copying. For more
+ information, refer to Section 2.8 "Mapping for Local Elements and
+ Attributes" in the C++/Tree Mapping User Manual.
+
+ * New option, --export-xml-schema, causes the compiler to export/import
+ types in the XML Schema namespace using the export symbol provided
+ with the --export-symbol option.
+
+ * New example, embedded, shows how to embed the binary representation of
+ the schema grammar into an application and then use it to parse and
+ validate XML documents.
+
+ * New example, compression, shows how to compress an XML document during
+ serialization and decompress it during parsing using the zlib library.
+
+ * New example, custom/mixed, shows how to use type customization to parse
+ and serialize mixed content.
+
+ * The streaming example has been extended to show how to perform stream-
+ oriented, partially in-memory XML processing using the C++/Tree mapping.
+ With the partially in-memory parsing and serialization only a part of
+ the object model is in memory at any given time. With this approach one
+ can process parts of the document as they become available as well as
+ handle documents that are too large to fit into memory.
+
+ * New default/fixed value initialization code. Now the default/fixed values
+ are parsed by the XSD compiler at compile time instead of the standard
+ parsing code at runtime. This will allow the compilation of schemas that
+ use the default/fixed values without support for XML parsing
+ (--suppress-parsing option).
+
+ * 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 members' enumerators.
+
+Version 3.2.0
+
+ * New option, --disable-warning, disables printing of a warning with
+ the specified id. Specifying 'all' for the warning id disables all
+ warnings.
+
+ * New options, --export-maps and --import-maps, provide support for
+ splitting a polymorphic type hierarchy across several Win32 DLLs.
+ See the compiler command line manual (man pages) for details.
+
+ C++/Tree
+
+ * During serialization the generated code automatically assigns
+ generic prefixes (p1, p2, etc) to XML namespaces used in the
+ vocabulary and for which no custom prefix-namespace mapping
+ was provided via the xml_schema::namespace_infomap argument.
+ The xml_schema::namespace_infomap argument in the serialization
+ functions is now default-initialized to an empty map. The
+ xml_schema::no_namespace_mapping and xml_schema::xsi_already_in_use
+ exceptions have been removed.
+
+ * New example, performance, measures the performance of parsing and
+ serialization. This example also shows how to structure your code
+ to achieve the maximum performance for these two operations.
+
+ * New example, xpath, shows how to use the C++/Tree mapping together
+ with XPath.
+
+ * New options, --one-accessor-regex, --opt-accessor-regex,
+ --seq-accessor-regex, --one-modifier-regex, --opt-modifier-regex,
+ and --seq-modifier-regex, allow specification of transformations
+ for accessor and modifier function names for elements and attributes
+ with specific cardinalities. For more information see the NAMING
+ CONVENTION section in the compiler command line manual (man pages).
+
+ * Support for comparison (--generate-comparison) and printing
+ (--generate-ostream) of polymorphic object models.
+
+ * New serialization flag, xml_schema::flags::dont_pretty_print,
+ disables extra spaces and new lines that make the resulting XML
+ slightly bigger but easier to read.
+
+ * New example, custom/double, shows how to customize parsing and
+ serialization code for the xsd:double XML Schema built-in type.
+ It can be used as a guide on how to customize built-in XML Schema
+ types that are mapped to fundamental C++ types.
+
+ * Support for fractionDigits and totalDigits facets in serialization
+ of types derived from xsd:decimal.
+
+ * New set of compile-time macros that control how the xsd:float,
+ xsd:double, and xsd:decimal types are serialized. The following
+ macros control the format:
+
+ XSD_CXX_TREE_FLOAT_FIXED
+ XSD_CXX_TREE_FLOAT_SCIENTIFIC
+ XSD_CXX_TREE_DOUBLE_FIXED
+ XSD_CXX_TREE_DOUBLE_SCIENTIFIC
+
+ The following macros control the precision:
+
+ XSD_CXX_TREE_FLOAT_PRECISION_MAX
+ XSD_CXX_TREE_FLOAT_PRECISION
+ XSD_CXX_TREE_DOUBLE_PRECISION_MAX
+ XSD_CXX_TREE_DOUBLE_PRECISION
+ XSD_CXX_TREE_DECIMAL_PRECISION_MAX
+ XSD_CXX_TREE_DECIMAL_PRECISION
+
+ If the *_PRECISION_MAX macro is defined then the maximum number of
+ potentially significant decimal digits that the type can represent
+ is used. Otherwise, if the *_PRECISION macro is defined then its
+ value is used. By default the precision is set to the number of
+ decimal digits that the type can represent without change. For
+ more information on these options, refer to the following paper:
+
+ http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf
+
+ The old macro, XSD_FP_ALL_DIGITS, that was equivalent to defining
+ all three *_PRECISION_MAX macros has been removed.
+
+ An alternative to using these macros is to customize the floating
+ point type as shown in the custom/double example.
+
+ * An additional constructor is generated in situations where a type
+ contains one or more required element of complex type (that is,
+ it itself contains elements or attributes). In this constructor,
+ initializers for such elements are passed as std::auto_ptr and the
+ newly created instance is directly initialized with and assumes
+ ownership of the pointed to objects. This constructor is a logical
+ addition to the non-copying modifiers that were introduced in the
+ previous version.
+
+ * Extra conversion operators in the fundamental_base class template
+ which is used to emulate inheritance from fundamental types are now
+ disabled by default since they cause problems on several compilers.
+ To enable them compile your code with the XSD_TREE_EXTRA_FUND_CONV
+ macro defined.
+
+ C++/Parser
+
+ * New options, --generate-xml-schema and --extern-xml-schema, trigger
+ generation of the mapping for the XML Schema namespace to a separate
+ header file and inclusion of that header into other generated header
+ files instead of generating the necessary declarations inline,
+ respectively. See the compiler command line manual (man pages) for
+ details.
+
+ * New example, performance, measures the performance of XML parsing.
+ This example also shows how to structure your code to achieve the
+ maximum performance for this operation.
+
+ * Type map files can now include comments. A comment starts with #
+ and ends with a new line or end of file. To specify a name that
+ contains # enclose it in "".
+
+ * In type map files the optional argument type now defaults to the
+ return type if the return type ends with * or & (that is, it is
+ a pointer or a reference) and 'const return type&' otherwise.
+
+ * The interface for polymorphic parsing has been simplified. Calling the
+ *_parser() functions multiple times to specify several parsers is no
+ longer supported. Instead you need to pass the xml_schema::parser_map
+ object which contains the parsers. For more information refer to
+ Section 5.4, "Support for Polymorphism" in the C++/Parser Mapping
+ Getting Started Guide.
+
+ * The use of virtual inheritance has been reduced which results in a
+ much smaller object code size (more than factor of 2 on some tests)
+ and faster C++ compilation with less RAM used.
+
+ * The low-level Expat-specific parsing API (parse_begin() and parse_end())
+ has been extended to provide XML and XML Schema error translation to
+ exceptions or error handler calls. See Section 7.2, "Expat Document
+ Parser" in the C++/Parser Mapping Getting Started Guide for more
+ information.
+
+Version 3.1.0
+
+ * New option, --file-per-type, triggers generation of a separate set
+ of C++ files for each type defined in XML Schema. This compilation
+ mode is primarily useful when some of your schemas cannot be compiled
+ separately or have cyclic dependencies which involve inheritance.
+ Other new options that are useful in this compilation mode are
+ --type-file-regex, --type-file-regex-trace, and --file-list. See the
+ compiler command line manual (man pages) for more information.
+
+ * New option, --options-file, allows additional command line options
+ to be provided in files, with one option per line.
+
+ * New option, --reserved-name, allows insertion of additional names
+ with optional replacements to the list of names that should not be
+ used as identifiers. See the compiler command line manual (man pages)
+ for details.
+
+ * New options, --location-map, --location-regex, and
+ --location-regex-trace, allow re-mapping of schema locations
+ specified in the include and import elements without modifying the
+ schema files. See the compiler command line manual (man pages) for
+ more information.
+
+ * New option, --guard-prefix, allows specification of a prefix that
+ should be added to generated header inclusion guards.
+
+ * New option, --file-list, triggers creation of a file with a list of
+ generated C++ files. This option is primarily useful in the file-per-
+ type compilation mode (--file-per-type) to create a list of generated
+ C++ files, for example, as a makefile fragment. Other new options
+ that are useful with --file-list are --file-list-prologue,
+ --file-list-epilogue, and --file-list-delim. See the compiler command
+ line manual (man pages) for more information.
+
+ * Support for the upcoming Xerces-C++ 3.0.0 release.
+
+ C++/Tree
+
+ * New option, --generate-intellisense, triggers generation of workarounds
+ for IntelliSense bugs in Visual Studio 2005 (8.0). When this option is
+ used, the resulting code is slightly more verbose. IntelliSense in
+ Visual Studio 2008 (9.0) does not require these workarounds. Support
+ for IntelliSense in Visual Studio 2003 (7.1) is improved with this
+ option but is still incomplete.
+
+ * New options, --type-naming and --function-naming, allow specification
+ of the type and function naming conventions that should be used in the
+ generated code. Supported values for --type-naming are: knr (K&R), ucc
+ (upper-camel-case), and java. Supported values for --function-naming
+ are: knr (K&R), lcc (lower-camel-case), and java. For more information
+ see the NAMING CONVENTION section in the compiler command line manual
+ (man pages).
+
+ * New options, --type-regex, --accessor-regex, --modifier-regex,
+ --parser-regex, --serializer-regex, and --enumerator-regex, allow
+ specification of transformations for type, accessor function,
+ modifier function, parsing function, serialization function, and
+ enumerator names in order to produce the generated code using a
+ custom naming convention. For more information see the NAMING
+ CONVENTION section in the compiler command line manual (man pages).
+
+ * Generated list classes now provide a complete set of constructors and
+ conform to the standard C++ sequence interface.
+
+ * String-based types now provide two extra constructors that expect a
+ C string and std::string as their arguments. This allows direct
+ initialization of string-based types from string literals.
+
+ * New implementations of the XML Schema date/time types (date, dateTime,
+ duration, gDay, gMonth, gMonthDay, gYear, gYearMonth, and time) that
+ represent the information in the numerical form.
+
+ * New binary serialization examples: binary/boost, which shows how to
+ save/load the object model to/from a custom format using the Boost
+ serialization library as an example, and binary/xdr, which shows how to
+ save/load the object model to/from XDR (eXternal Data Representation)
+ binary format using the XDR API provided as part of Sun RPC.
+
+ * The non-copying modifier functions can now be used to assemble object
+ models from scratch. For more information see Section 4.4, "Creating
+ the Object Model from Scratch" in the C++/Tree Mapping Getting Started
+ Guide as well as Section 2.8, "Mapping for Local Elements and Attributes"
+ in the C++/Tree Mapping User Manual.
+
+ * Doxygen documentation was added to the XSD runtime for the built-in XML
+ Schema types, exceptions, etc. This allows linking of the generated
+ documentation to the XSD runtime documentation using the Doxygen tags
+ mechanism. The Doxygen configuration file for the XSD runtime is
+ provided in the documentation/cxx/tree/reference/ directory.
+
+ * Support for customization of anyType. Because anyType is a base type
+ for every generated type, customizing it allows one to implement custom
+ functionality that spans the entire type system. See the comments
+ example in the examples/cxx/tree/custom/ directory.
+
+ * New option, --omit-default-attributes, triggers generation of extra
+ checks that exclude attributes with default and fixed values from the
+ serialized XML documents.
+
+ * The parsing functions that used to read from DOMInputSource were changed
+ to use InputSource to ease support of Xerces-C++ 3 and 2 series in the
+ same code base.
+
+ * The parsing function that used to parse DOMDocument* was changed to
+ parse xml_schema::dom::auto_ptr<DOMDocument>& instead. If the keep_dom
+ and own_dom flags are specified then this parsing function resets the
+ passed automatic pointer and the returned object model assumes
+ ownership of the DOM document. xml_schema::dom::auto_ptr is a simple
+ automatic pointer for Xerces-C++ DOM with the same interface as
+ std::auto_ptr.
+
+ * The xml_schema::tree_node_key DOM user data key was moved to
+ xml_schema::dom::tree_node_key.
+
+ C++/Parser
+
+ * New option, --generate-polymorphic, triggers generation of polymorphism-
+ aware code. This option should be used on XML vocabularies which use
+ xsi:type and/or substitution groups. For more information see Section
+ 5.4, "Support for Polymorphism" in the C++/Parser Mapping Getting
+ Started Guide we well as the polymorphism and polyroot examples in the
+ examples/cxx/parser/ directory.
+
+ * The date/time types (date, dateTime, gDay, gMonth, gMonthDay, gYear,
+ gYearMonth, and time) now represent time zone in the numerical form.
+
+ * In order to support parsing of polymorphic XML documents, the signatures
+ of the start_* functions (_start_element, _start_any_element, and
+ start_root_element) have changed to include a third argument of type
+ const ro_string<C>*. This argument contains the resolved type name and
+ namespace in case the xsi:type attribute was specified.
+
+Version 3.0.0
+
+ * Anonymous type morphing (automatic type naming) is now performed by
+ default in both mappings. The --morph-anonymous option does not have
+ any effect but is preserved for backwards compatibility. A new option,
+ --preserve-anonymous, disables anonymous type morphing. This option is
+ useful together with --show-anonymous if you want to make sure your
+ schemas do not have any anonymous types.
+
+ * A number of bugs fixed in both C++/Tree and C++/Parser mappings.
+
+ C++/Tree
+
+ * The new C++/Tree Mapping Getting Started Guide is available in the
+ documentation/cxx/tree/guide/ directory.
+
+ * The type definitions for local elements and attributes in the form
+ name::type have been changed to name_type. For example, an element
+ bar in type foo with maxOccurs="unbounded" used to have its iterator
+ type defined as foo::bar::iterator. With this change it becomes
+ foo::bar_iterator. Furthermore, the container type name for sequence
+ elements has changed from foo::bar::container to foo::bar_sequence
+ and for optional elements and attributes from foo::bar::container
+ to foo::bar_optional. This is a backwards incompatible change and
+ may require application code adjustments (the C++ compiler will
+ pinpoint the affected places).
+
+ * New option, --generate-doxygen, triggers generation of documentation
+ comments suitable for extraction by the Doxygen documentation system.
+ Documentation from annotations is added to the comments if present in
+ the schema.
+
+ * New option, --generate-wildcard, triggers generation of the new
+ wildcard (any and anyAttribute) mapping. This mapping represents the
+ content matched by wildcards as DOM fragments. For more information on
+ the new mapping see Section 2.12, "Mapping for any and anyAttribute"
+ in the C++/Tree Mapping User Manual as well as the wildcard example in
+ the examples/cxx/tree/ directory.
+
+ * New option, --generate-comparison, triggers generation of comparison
+ operators (== and !=) for complex types. Comparison is performed
+ memberwise.
+
+ * Support for the RPC XDR binary stream in addition to ACE CDR.
+
+ * New constructor is generated for complex types with ultimate bases
+ that are simple types and can be default-initialized. This constructor
+ includes initializers for all required members but omits the initializer
+ for the base type. See Section 2.7, "Mapping for Complex Types" in the
+ C++/Tree Mapping User Manual for more information.
+
+ * Support for polymorphic binary serialization and extraction. Note that
+ the semantics of the --generate-insertion and --generate-extraction
+ options has changed. See the the compiler command line manual (man
+ pages) for details.
+
+ * New parsing function with the DOMDocument* argument and the own_dom
+ flag allow the tree to assume the ownership of the DOM document
+ being parsed when DOM association is requested (keep_dom flag).
+ See the C++/Tree Mapping User Manual for more information.
+
+ * New example, multiroot, shows how to handle XML vocabularies with
+ multiple root elements.
+
+ * New example, caching, shows how to parse several XML documents while
+ reusing the underlying XML parser and caching the schemas used for
+ validation.
+
+ * The mapping of built-in XML Schema type decimal has changed from
+ long double to double. The old mapping can be obtained by providing
+ a custom mapping for this type.
+
+ * The xml_schema::errors type which is used in the xml_schema::parsing
+ and xml_schema::serialization exceptions has been renamed to
+ xml_schema::diagnostics and extended to include warnings in addition
+ to errors.
+
+ * Serialization operators now clear the element being serialized to from
+ existing child nodes and attributes (except for special attributes such
+ as prefix-namespace mappings, etc.).
+
+ * Improved built-in type parsing, including support for normalization and
+ whitespace collapsing.
+
+ * Optimizations for the generated code size and compilation time,
+ including space optimizations for polymorphic parsing and
+ serialization. Optimizations for XML parsing speed.
+
+ C++/Parser
+
+ * The C++/Parser mapping have been significantly redesigned. See the new
+ Getting Started Guide in documentation/cxx/parser/guide/ for details.
+
+ * The new C++/Parser Mapping Getting Started Guide is available in the
+ documentation/cxx/parser/guide/ directory.
+
+ * The mapping now provides parser implementations for all built-in XML
+ Schema types. See Chapter 6, "Built-In XML Schema Type Parsers" in
+ the C++/Parser Mapping Getting Started Guide for more information.
+
+ * The mapping now supports automatic generation of sample parser
+ implementations and a test driver. The --generate-noop-impl option
+ triggers generation of a sample implementation with empty function
+ bodies. The --generate-print-impl option triggers generation of a
+ sample implementation that prints the data stored in XML to STDOUT.
+ The --generate-test-driver option trigger generation of a test driver.
+ For more information on this feature see the compiler command line
+ manual (man pages) and the generated example in the examples/cxx/parser/
+ directory. Other relevant options include: --force-overwrite,
+ --root-element-first, --root-element-last, and --root-element.
+
+ * New example, wildcard, shows how to parse the XML data matched by
+ XML Schema wildcards (any and anyAttribute).
+
+ * The xml_schema::document parser has been extended with overridable
+ virtual functions start_root_element and end_root_element to support
+ parsing of XML vocabularies with multiple document roots. See the
+ multiroot example in the examples/cxx/parser/ directory for more
+ information.
+
+ * The xml_schema::errors type which is used in the xml_schema::parsing
+ exception has been renamed to xml_schema::diagnostics and extended to
+ include warnings in addition to errors.
+
+Version 2.3.1
+
+ * The compiler is now capable of translating multiple schemas with
+ one invocation.
+
+ * New option, --sloc-limit, allows one to limit the amount of the
+ generated code.
+
+ * New option, --proprietary-license, instructs the compiler not to
+ include the GPL banner in each generated file. Instead a short
+ notice about a required proprietary license is generated. You
+ should not use this option unless you have obtained a proprietary
+ license from Code Synthesis.
+
+ * The default encoding for the 'char' character type is now UTF-8.
+ To get the previous behavior (local code page via the Xerces-C++
+ transcode functions) define the XSD_USE_LCP preprocessor macro
+ when compiling your source code.
+
+ C++/Tree
+
+ * The --parts option has been improved to split generated code more
+ evenly by analyzing the complexity of the generated schema constructs.
+
+ * Ability to customize serialization, std::ostream, and binary
+ insertion/extraction operators. See examples/cxx/tree/custom/wildcard
+ for an example on how to handle XML Schema wildcards (xsd:any and
+ xsd:anyAttribute) by customizing the parsing constructor and
+ serialization operators.
+
+ * Optimizations for the run-time memory consumption.
+
+ * Optimizations for space in the generated code.
+
+ * Number of bug fixes.
+
+ C++/Parser
+
+ * Proper handling of an xsd:any nested content. Nested elements,
+ attributes, and text are reported via _any_* hooks of the current
+ parser.
+
+ * Number of bug fixes, mostly in the generated validation code.
+
+
+Version 2.3.0
+
+ * Name conflicts across type inheritance hierarchies are now detected
+ and resolved via name escaping.
+
+ C++/Tree
+
+ * New option, --suppress-parsing, suppresses generation of the parsing
+ constructors and functions. This can be used to minimize the generated
+ code footprint when parsing from XML is not used.
+
+ * New option, --generate-forward, triggers generation of a forward
+ declaration header file for types defined in the schema. A set of
+ --fwd-* options that control the resulting file name as well as
+ prologue and epilogue code are available.
+
+ * New option, --generate-xml-schema, triggers generation of the mapping
+ for the XML Schema namespace to a separate header file. See the man
+ pages for details and examples/cxx/tree/custom/calendar for an example.
+
+ * New option, --extern-xml-schema, triggers inclusion of a header
+ file for the XML Schema namespace instead of generating the
+ necessary declarations inline. See the man pages for details and
+ examples/cxx/tree/custom/calendar for an example.
+
+ * New options, --custom-type and --custom-type-regex, instruct the
+ compiler to use custom C++ type for a type defined in the schema.
+ The standard mapping can still be generated (with a different name)
+ usually to be used as a base. Built-in XML Schema types can be
+ customized using this mechanism. See the man pages for details and
+ examples/cxx/tree/custom/* for examples.
+
+ * The generated parsing constructors and serialization operators have
+ been changed to use the Xerces-C++ DOM elements and attributes
+ instead of the internal wrapper types. This should provide easier
+ integration with other code and libraries that use the Xerces-C++
+ DOM types such as Berkeley DB XML.
+
+ * New example, examples/cxx/tree/dbxml, shows how to use the C++/Tree
+ mapping on top of the Berkeley DB XML database.
+
+ C++/Parser
+
+ * Validation of the attribute structure in the generated code.
+
+ * Validation of the character content models including mixed content in
+ the generated code.
+
+ * Validation of the built-in XML Schema types.
+
+ * Optimizations for space and time in the generated code. In particular
+ data coping during parsing and validation was significantly reduced.
+
+
+Version 2.2.0
+
+ * Detection of a version mismatch between the generated code and
+ the runtime.
+
+ C++/Tree
+
+ * Escaping of a global element name that conflicts with a global type
+ name. This is a backwards-incompatible change. Previous versions
+ map them to the same name.
+
+ * New options, --generate--insertion and --generate-extraction,
+ trigger generation of (binary) data representation stream
+ insertion and extraction operators, respectively. This allows
+ one to serialize/deserialize in-memory representation to/from
+ data representation streams such as XSD, CDR, etc. ACE CDR
+ streams are supported out of the box (see the binary example).
+ User-supplied streams can be used via an adaptation layer.
+
+ * New serialization flag, no_xml_declaration, instructs the XML
+ serialization functions to omit an XML declaration. This is useful
+ for streaming serialization (see the streaming example).
+
+ * Optimizations to reduce generated code size.
+
+
+ C++/Parser
+
+ * New options, --generate-validation and --suppress-validation,
+ trigger and suppress generation of the validation code,
+ respectively. The validation code is the implementation of the
+ XML Schema validation in the generated code (also known as
+ "perfect" parser). In this version validation of the element
+ structure has been implemented.
+
+ * New architecture for underlying XML parsers. This is a backwards-
+ incompatible change. Existing applications will have to be
+ modified. See examples for details.
+
+
+Version 2.1.1
+
+ C++/Tree
+
+ * New option, --namespace-map, allows direct mapping of XML Schema
+ namespaces to C++ namespaces without the use of regular expressions.
+
+ * Further optimizations in the container code and enum mapping to
+ reduce generated code size.
+
+ * Number of bug fixes in the generated code.
+
+
+ C++/Parser
+
+ * New option, --namespace-map, allows direct mapping of XML Schema
+ namespaces to C++ namespaces without the use of regular expressions.
+
+
+Version 2.1.0
+
+ * Automatic handling of forward inheritance. XML Schema allows
+ inheritance from yet undefined types while it is illegal to do
+ so in C++. Now the translator automatically handles forward
+ inheritance by re-arranging the schema during compilation.
+
+
+ C++/Tree
+
+ * New enum mapping with support for inheritance. Enumerators are
+ now parsed using binary search instead of linear search.
+
+ * Associated DOM nodes now retain "back" pointers to tree nodes.
+
+ * Optimizations to reduce generated code size.
+
+
+ C++/Parser
+
+ * Specialization for void. You can now use void as a hook argument
+ type if you don't want to pass any data between parsers.
+
+ * Support for re-use of implementations of base parsers in derived
+ parsers using the mixin C++ idiom. See the examples/cxx/parser/mixin
+ for more information.
+
+ * Support for uninitialized parser. If you don't provide a parser
+ for element/attribute, that element/attribute will be ignored
+ during parsing.
+
+
+Version 2.0.0
+
+ * New cardinality calculator. This improves support for schemas that
+ use complex structures with repeated elements, e.g.,
+
+ <complexType name="Type">
+ <choice>
+ <sequence>
+ <element name="a" type="string"/>
+ <element name="c" type="string"/>
+ </sequence>
+ <sequence>
+ <element name="b" type="string"/>
+ <element name="c" type="string"/>
+ </sequence>
+ </choice>
+ </complexType>
+
+
+ * New identifier escaping code. With this feature xsd generates proper
+ code for schemas that use the same name for an element and an attribute
+ in the same type or use several elements/attributes with different
+ qualified names but with the same local name, e.g.,
+
+ <!-- base.xsd -->
+ <schema xmlns="http://codesynthesis.com/xmlns/test/foo"
+ targetNamespace="http://codesynthesis.com/xmlns/test/foo">
+
+ <element name="foo" type="int"/>
+ </schema>
+
+ <schema xmlns="http://codesynthesis.com/xmlns/test/bar"
+ xmlns:f="http://codesynthesis.com/xmlns/test/foo"
+ targetNamespace="http://codesynthesis.com/xmlns/test/bar">
+
+ <import namespace="http://codesynthesis.com/xmlns/test/foo"
+ schemaLocation="base.xsd"/>
+
+ <element name="foo" type="string"/>
+
+ <complexType name="Foo">
+ <sequence>
+ <element ref="foo"/>
+ <element name="foo" type="long"/>
+ <element ref="f:foo"/>
+ <element ref="f:foo"/>
+ </sequence>
+ <attribute name="foo" type="string"/>
+ </complexType>
+ </schema>
+
+
+ C++/Tree
+
+ * New option, --generate-polymorphic, triggers generation of
+ polymorphism-aware code. Before this release xsd used to always
+ generate polymorphism-aware code. However, it appears to be quite
+ wasteful in terms of the generated code size (up to 40%). You will
+ now need to explicitly specify this option if you use substitution
+ groups or xsi:type. A warning is issued if this option is not
+ specified but the schema makes use of substitution groups.
+
+ * New options, --root-element-first, --root-element-last,
+ --root-element-all, --root-element-none, and --root-element, control
+ generation of parsing and serialization functions. With these options
+ you can avoid generating extra code for global elements that are not
+ document roots. See the man pages for details.
+
+ * New options, --parts and -parts-suffix, allows you to split generated
+ source code into a number of parts. This is useful when translating
+ large, monolithic schemas and a C++ compiler is not able to compile
+ the resulting source code at once (usually due to insufficient memory).
+
+ * New option, --generate-default-ctor, triggers generation of default
+ constructors even for types that have required members. Required
+ members of an instance constructed using such a constructor are not
+ initialized and accessing them results in undefined behavior. Thanks
+ to Jean-Francois Dube <jf at magnu.polymtl.ca> for suggesting this
+ feature.
+
+ * New option, --generate-from-base-ctor, triggers generation of
+ constructors that expect an instance of a base type followed by all
+ required members. Thanks to Jean-Francois Dube <jf at magnu.polymtl.ca>
+ for suggesting this feature.
+
+ * Information scopes for attributes and elements with default/fixed values
+ now define the public static default_value function which allows one to
+ obtain the default/fixed value for the element/attribute. Thanks to
+ Dave Moss <david.r.moss at selex-comm.com> for suggesting this feature.
+
+ * MSVC 7.1 has a limit on the length of the "if else if" chain. This
+ results in ICE when compiling generated code for enumerations with
+ a large number of values. This version addresses this issue. Thanks
+ to Cyrille Chépélov <cyrille at chepelov.org> for reporting this and
+ suggesting a fix.
+
+
+ C++/Parser
+
+ * The parser construction API has changed. Now, for element 'foo',
+ the name of the parser modifier function is 'foo_parser'. Likewise,
+ operator() for setting all parsers at once has been changed to the
+ 'parsers' function.
+
+
+Version 1.9.0
+
+ C++/Tree
+
+ * The size modifier function in the base64_binary and hex_binary
+ built-in types automatically adjusts capacity if needed.
+
+ * More internal names (names that start with _xsd_) were made
+ private or protected.
+
+ C++/Parser
+
+ * Typedef for the parser base in the xml_schema namespace.
+
+ C++/Parser-E
+
+ * C++/Parser mapping optimized for embedded systems. For now it
+ is equivalent to 'cxx-parser --xml-parser expat'.
+
+
+Version 1.8.0
+
+ * Moved to the build 0.2 series.
+
+ C++/Tree
+
+ * Support for default and fixed values in attributes. An optional
+ attribute with a default or fixed value is mapped to the One
+ cardinality class instead of the Optional cardinality class.
+
+ * Mapping for base64Binary and hexBinary has improved. Now these
+ types support a basic buffer abstraction and perform automatic
+ encoding and decoding.
+
+ * Internal names are protected. We've noticed (via bug reports) a
+ wide use of internal names (names that start with _xsd_) in user
+ code. This is not portable and instead you should use public
+ names. To prevent this from happening in the future we've made
+ all internal names protected.
+
+ C++/Parser
+
+ * Support for Expat as the underlying XML parser in addition to
+ Xerces-C++. This allows one to use the C++/Parser mapping in
+ memory-constrained environments such as embedded systems. To
+ select Expat instead of Xerces-C++ (default) add
+ '--xml-parser expat' to the command line. At the moment only
+ 'char' (UTF-8) is supported as the base character type when
+ Expat is selected.
+
+ * The invalid_instance exception has been renamed to parsing.
+
+ * Generic error_handler interface has been added in addition
+ to Xerces-C++-specific DOMErrorHandler. It allows you to
+ handle parsing errors and warnings without having to deal
+ with Xerces-C++ specifics.
+
+ * The default error handling behavior has changed in parsing
+ functions. Instead of printing errors and warnings to STDERR,
+ the errors are now collected and thrown as part of the parsing
+ exception.
+
+ * In parsing functions, the name, namespace arguments order has
+ been reversed to be consistent with the one used in parsing
+ hooks.
+
+Version 1.7.0
+
+ * Number of bug fixes in libxsd and the generated code.
+
+ C++/Tree
+
+ * Comprehensive XML Schema C++/Tree Mapping User Manual.
+
+ * Basic support for union. A simple type that is defined using
+ derivation by union is mapped to a C++ class that derives from
+ string.
+
+ * The _clone function has its arguments default-initialized.
+
+ * The invalid_instance exception has been renamed to parsing.
+
+ * Generic error_handler interface has been added in addition
+ to Xerces-C++-specific DOMErrorHandler. It allows you to
+ handle parsing/serialization errors and warnings without
+ having to deal with Xerces-C++ specifics. See the user
+ manual for more information.
+
+ * The default error handling behavior has changed in parsing
+ and serialization functions. Instead of printing errors and
+ warnings to STDERR, the errors are now collected and thrown
+ as part of the parsing/serialization exception. See the user
+ manual for more information.
+
+ * The optional and sequence containers now support operators ==,
+ !=, <, >, <=, and >=.
+
+ * Flags argument has been added to serialization functions. The
+ only flag that is currently supported is dont_initialize.
+
+ * Generated code cleanups.
+
+ C++/Parser
+
+ * Basic support for union. A simple type that is defined using
+ derivation by union is mapped to a C++ class template that
+ is just an alias for the generic parser. You are expected to
+ override the _characters function in your implementation.
+
+ * Properties argument to parsing functions which allows to
+ programmatically specify schemas for instance document
+ validation.
+
+ * Flags argument to parsing functions. The following flags
+ are supported:
+
+ dont_validate - do not validate instance documents
+ dont_initialize - do not initialize the Xerces-C++ runtime
+
+Version 1.6.0
+
+ * Number of bug fixes in libxsd and the generated code.
+
+ C++/Tree
+
+ * Support for xsi:type and substitution groups in parsing and
+ serialization. See examples/cxx/tree/polymorphism for a code
+ sample.
+
+ * Properties argument to parsing functions which allows to
+ programmatically specify schemas for instance document
+ validation.
+
+ * Extra checks in parsing code which prevents construction
+ of inconsistent in-memory representation from invalid
+ instance documents. Should be useful when validation is
+ disabled.
+
+ * Accessors and modifier were made normal member functions.
+ Before they were implemented via functors.
+
+ * Workaround for g++-3.3 bug# 16650:
+
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16650
+
+ C++/Parser
+
+ * All "service" functions were renamed to start with '_'.
+ This should prevent hiding of service functions by
+ elements/attributes with the same names.
+
+Version 1.5.0
+
+ * Number of bug fixes in libxsd and the generated code.
+
+ C++/Tree
+
+ * Basic support for inheritance-by-restriction in complex types.
+
+ * The following parsing flags have been introduced:
+
+ keep_dom - keep association with underlying DOM nodes
+ dont_validate - do not validate instance documents
+ dont_initialize - do not initialize the Xerces-C++ runtime
+
+ * "Type-less content" such as mixed content models, xsd:anyType/
+ xsd:anySimpleType, and xsd:any/xsd:anyAttribute is supported by
+ exposing corresponding DOM nodes (see the keep_dom parsing flag).
+ Note that only a subset of XML Schema xsd:any functionality is
+ supported. The compiler will issue diagnostics for unsupported
+ cases. See examples/cxx/tree/mixed for a code sample.
+
+ C++/Parser
+
+ * Support for inheritance-by-restriction in complex types.
+
+ * "Type-less content" such as mixed content models, xsd:anyType/
+ xsd:anySimpleType, and xsd:any/xsd:anyAttribute is supported
+ by forwarding parsing events to a set of "unexpected" hooks.
+ Note that only a subset of XML Schema xsd:any functionality is
+ supported. The compiler will issue diagnostics for unsupported
+ cases. See examples/cxx/parser/mixed for a code sample.
+
+Version 1.4.0
+
+ * Number of improvements and bug fixes in the diagnostics code.
+
+ * libxsd has been reorganized to provide a clean split of code with
+ regards to char/wchar_t use. It should be possible to use libxsd
+ and the xsd-generated code on platforms that lack wchar_t support,
+ such as mingw.
+
+ C++/Tree
+
+ * Work around for g++ bug# 23206.
+
+ * Support for xsd:list.
+
+ * Type/member name conflicts are auto-resolved. Such conflicts
+ occur when a type and an element or attribute withing this type
+ share the same name.
+
+ * XML Schema extension, the 'refType' attribute, allows one to
+ specify referenced type for xsd:IDREF and xsd:IDREFS data types.
+ See examples/cxx/tree/library for details.
+
+ * New option, --morph-anonymous, allows automatic morphing
+ of anonymous types to named ones. See the man pages for
+ details.
+
+ * New option, --namespace-regex-trace, allows one to trace the
+ namespace mapping process. See the man pages for details.
+
+ * Mapping for optional elements/attributes (cardinality 0..1)
+ has changed in a backwards-incompatible way. In the previous
+ version you would write:
+
+ Bar& bar = ...
+
+ if (bar.foo.present ()) // test
+ {
+ Foo& foo (bar.foo ()); // get
+
+ bar.foo (Foo (...)); // set
+
+ bar.foo.reset (); // reset
+ }
+
+ Now you would write it like this:
+
+ if (bar.foo ().present ()) // test
+ {
+ Foo& foo (bar.foo ().get ()); // get
+
+ bar.foo (Foo (...)); // set
+
+ bar.foo ().reset (); // reset
+ }
+
+ Or using the pointer notation:
+
+ if (bar.foo ()) // test
+ {
+ Foo& foo (*bar.foo ()); // get
+
+ bar.foo (Foo (...)); // set
+
+ bar.foo ().reset (); // reset
+ }
+
+ C++/Parser
+
+ * Support for xsd:list.
+
+ * Type/member name conflicts are auto-resolved. Such conflicts
+ occur when a type and an element or attribute withing this type
+ share the same name.
+
+ * New option, --namespace-regex-trace, allows one to trace the
+ namespace mapping process. See the man pages for details.
+
+Version 1.3.0
+
+ * Numerous bug fixes.
+
+ * The XML subsystem of libxsd has been reorganized to provide
+ a clean split of DOM and SAX functionalities.
+
+ C++/Parser
+
+ * New option, --morph-anonymous, allows automatic morphing
+ of anonymous types to named ones. See the man pages for
+ details.
+
+ C++/Tree
+
+ * Additional parser functions provide support for reading
+ from std::istream.
+
+Version 1.2.0
+
+ C++/Parser
+
+ * New backend that generates the C++/Parser mapping.
+
+Version 1.1.1
+
+ all backends
+
+ * Bug fixes in the filesystem path handling logic.
+
+Version 1.1.0
+
+ C++/Tree
+
+ * New option, --generate-serialization, triggers generation of
+ serialization functions. Serialization functions convert an in-memory
+ representation back to XML.
+
+ * xsd::cxx::tree::vector has been extended to closely follow std::vector
+ API. This allows you to access and modify element sequences as if they
+ were of type std::vector.
+
+ * Generated constructors from xml::attribute and xml::element are made
+ explicit.
+
+ * The library example was extended to showcase modification and
+ serialization of the in-memory representation.
+
+ * New "XML Schema C++/Tree Mapping Serialization Guide" has an in-depth
+ treatment of the serialization mechanisms provided by xsd.
+
+Version 1.0.1
+
+ all backends
+
+ * Improved diagnostics.
+
+ * Bug fixes in the schema inclusion/importing logic.
+
+ C++/Tree
+
+ * Two new options: --include-with-brackets and --include-prefix
+
+Version 1.0.0
+
+ * First public release.
diff --git a/PACKAGE-README.md b/PACKAGE-README.md
new file mode 100644
index 0000000..4a1ce70
--- /dev/null
+++ b/PACKAGE-README.md
@@ -0,0 +1,66 @@
+# XSD
+
+XSD is an open-source, cross-platform XML Schema to C++ data binding
+compiler. Provided with an XML document specification (XML Schema), it
+generates C++ classes that represent the given vocabulary as well as XML
+parsing and serialization code. You can then access the data stored in XML
+using types and functions that semantically correspond to your application
+domain rather than dealing with generic elements/attributes and raw strings.
+
+For further information, refer to the [XSD project
+page](https://codesynthesis.com/products/xsd/).
+
+## Usage
+
+XSD consists of several packages with the main ones being `xsd` (the XML
+Schema to C++ compiler) and `libxsd` (the runtime library). There are also
+several `*-tests` packages as well as `xsd-examples`.
+
+When specifying dependencies on XSD packages in your project, the `xsd`
+package should be a build-time dependency. The `libxsd` library is
+header-only and because it can be used either with Xerces-C++ or
+Expat as the underlying XML parser, it does not have a dependency on
+either, expecting your project to make the choice by depending on
+one or the other explicitly and then importing and linking the
+corresponding library.
+
+So, putting it all together, your project's `manifest` would normally
+have the following fragment if using Xerces-C++:
+
+```
+depends: * xsd ^4.2.0
+depends: libxsd ^4.2.0
+depends libxerces-c ^3.2.4
+```
+
+Or the following fragment if using Expat:
+
+```
+depends: * xsd ^4.2.0
+depends: libxsd ^4.2.0
+depends libexpat ^2.5.0
+```
+
+Then your `buildfile` would have something along these lines if using
+Xerces-C++:
+
+```
+import! [metadata] xsd = xsd%exe{xsd}
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+```
+
+Or along these lines if using Expat:
+
+```
+import! [metadata] xsd = xsd%exe{xsd}
+
+import libs = libxsd%lib{xsd}
+import libs += libexpat%lib{expat}
+```
+
+Note that the `xsd` executable provides `build2` metadata.
+
+The compilation of XML Schema to C++ can be implemented using ad hoc recipes
+or rules. See the `xsd-examples` package for the complete examples.
diff --git a/README.md b/README.md
index a58d2fc..2f0ba01 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,31 @@
# XSD
-XSD is an XML Schema to C++ compiler.
+XSD is an open-source, cross-platform XML Schema to C++ data binding
+compiler. Provided with an XML document specification (XML Schema), it
+generates C++ classes that represent the given vocabulary as well as XML
+parsing and serialization code. You can then access the data stored in XML
+using types and functions that semantically correspond to your application
+domain rather than dealing with generic elements/attributes and raw strings.
-The development setup for XSD uses two configurations, for example:
+For further information, including licensing conditions, documentation, and
+binary packages, refer to the [XSD project
+page](https://codesynthesis.com/products/xsd/).
+
+NOTE: the steps described below are more appropriate for the development of
+XSD as opposed to consumption. In case you just want to use XSD:
+
+* If you want to use a binary package, see the [XSD download
+ page](https://codesynthesis.com/products/xsd/download.xhtml).
+
+* If you want to build XSD from source and use the result from a project that
+ uses a build system other than `build2`, then see [Installing XSD with
+ `build2`](https://codesynthesis.com/products/xsd/doc/install-build2.xhtml)
+ for the step-by-step instructions.
+
+* If you want to use XSD from a project that uses `build2` as the build
+ system, then see the accompanying `PACKAGE-README.md` file.
+
+The development setup for XSD uses two build configurations, for example:
```
git clone .../xsd.git
@@ -18,9 +41,13 @@ bdep init @target -d libxsd -d libxsd-tests -d xsd-tests -d xsd-examples
```
-To generate the documentation in the `.ps` and `.pdf` formats, `html2ps` and
-`ps2pdf14` programs are required (the latter is from `ghostscript`). A warning
-is issued in the development mode if these programs are not available.
+To generate the documentation in the `.ps` and `.pdf` formats, the `html2ps`
+and `ps2pdf14` programs are required (the latter is from `ghostscript`). A
+warning is issued in the development mode if these programs are not available.
+
+To generate the Doxygen documentation (in `libxsd`) the `doxygen` program is
+required. Currently this functionality is only enabled if `libxsd` is
+initialized with explicit `config.libxsd.doxygen=true`.
To test installation of the XSD compiler, create a separate target
configuration (it will automatically resolve any build-time dependencies from
@@ -34,3 +61,11 @@ bdep init @install -d xsd
b install: ../xsd-install/xsd/
```
+
+The checked out `libxsd/xsd/cxx/version.hxx` will be overwritten during the
+in-source build but these changes must be ignored. To do this automatically,
+run:
+
+```
+git update-index --assume-unchanged libxsd/xsd/cxx/version.hxx
+```
diff --git a/libxsd-tests/.gitignore b/libxsd-tests/.gitignore
index 1b1f9fb..616686d 100644
--- a/libxsd-tests/.gitignore
+++ b/libxsd-tests/.gitignore
@@ -3,10 +3,16 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
+*.dylib
*.dll
*.a
*.lib
diff --git a/libxsd-tests/README b/libxsd-tests/README
deleted file mode 100644
index 1ab33da..0000000
--- a/libxsd-tests/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This package contains tests for the XSD to C++ data binding runtime library.
-
-See the LICENSE file for distribution conditions.
-
-The project page is at https://www.codesynthesis.com/projects/xsd/.
-
-Send bug reports or any other feedback to the xsd-users@codesynthesis.com
-mailing list.
diff --git a/libxsd-tests/README.md b/libxsd-tests/README.md
new file mode 100644
index 0000000..9e275a3
--- /dev/null
+++ b/libxsd-tests/README.md
@@ -0,0 +1,4 @@
+# libxsd-tests - tests for XSD runtime library
+
+This package contains tests for `libxsd`, the XML Schema to C++ data binding
+compiler's runtime library.
diff --git a/libxsd-tests/buildfile b/libxsd-tests/buildfile
index e783791..7259a1f 100644
--- a/libxsd-tests/buildfile
+++ b/libxsd-tests/buildfile
@@ -1,4 +1,4 @@
# file : buildfile
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-./: {*/ -build/} doc{README} legal{GPLv2 LICENSE FLOSSE} manifest
+./: {*/ -build/} doc{README.md} legal{GPLv2 LICENSE FLOSSE} manifest
diff --git a/libxsd-tests/cxx/parser/expat/basic/driver.cxx b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
index f601e7a..5c0325a 100644
--- a/libxsd-tests/cxx/parser/expat/basic/driver.cxx
+++ b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/parser/expat/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
// Define XSD_CXX11 since we include libxsd headers directly.
@@ -25,6 +24,9 @@
#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/cxx/parser/xerces/basic/driver.cxx b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
index b7dfd1d..f578a6a 100644
--- a/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
+++ b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/parser/xerces/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
// Define XSD_CXX11 since we include libxsd headers directly.
@@ -25,6 +24,9 @@
#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/cxx/tree/basic/driver.cxx b/libxsd-tests/cxx/tree/basic/driver.cxx
index d36d31e..115bb6a 100644
--- a/libxsd-tests/cxx/tree/basic/driver.cxx
+++ b/libxsd-tests/cxx/tree/basic/driver.cxx
@@ -1,7 +1,6 @@
// file : cxx/tree/basic/driver.cxx
// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <cassert>
#include <iostream>
#include <xercesc/dom/DOMText.hpp>
@@ -32,6 +31,9 @@
#include <xsd/cxx/tree/exceptions.hxx> // parsing
#include <xsd/cxx/tree/error-handler.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx;
diff --git a/libxsd-tests/manifest b/libxsd-tests/manifest
index ca2fd01..d16306d 100644
--- a/libxsd-tests/manifest
+++ b/libxsd-tests/manifest
@@ -1,15 +1,17 @@
: 1
name: libxsd-tests
-version: 4.2.0-b.2.z
+version: 4.2.1-a.0.z
project: xsd
+type: tests
+language: c++
summary: XML Schema to C++ data binding compiler runtime library tests
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
-description-file: README
-url: https://www.codesynthesis.com/projects/xsd/
-doc-url: https://www.codesynthesis.com/projects/xsd/
-src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd-tests/
+description-file: README.md
+url: https://www.codesynthesis.com/products/xsd/
+doc-url: https://www.codesynthesis.com/products/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0
-depends: * bpkg >= 0.14.0
+depends: * build2 >= 0.16.0
+depends: * bpkg >= 0.16.0
depends: libxerces-c ^3.0.0
depends: libexpat ^2.1.0
diff --git a/libxsd/.gitignore b/libxsd/.gitignore
index cece09c..1c363a0 100644
--- a/libxsd/.gitignore
+++ b/libxsd/.gitignore
@@ -3,10 +3,16 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
+*.dylib
*.dll
*.a
*.lib
diff --git a/libxsd/INSTALL b/libxsd/INSTALL
deleted file mode 100644
index 181de1b..0000000
--- a/libxsd/INSTALL
+++ /dev/null
@@ -1,6 +0,0 @@
-The easiest way to build this package is with the bpkg package manager:
-
-$ bpkg build libxsd
-
-But if you don't want to use the package manager, then you can also build it
-manually using the standard build2 build system.
diff --git a/libxsd/NEWS b/libxsd/NEWS
index c51e267..0fae0f8 100644..120000
--- a/libxsd/NEWS
+++ b/libxsd/NEWS
@@ -1 +1 @@
-See the common NEWS file in the XSD compiler package.
+../NEWS \ No newline at end of file
diff --git a/libxsd/PACKAGE-README.md b/libxsd/PACKAGE-README.md
new file mode 120000
index 0000000..422e63f
--- /dev/null
+++ b/libxsd/PACKAGE-README.md
@@ -0,0 +1 @@
+../PACKAGE-README.md \ No newline at end of file
diff --git a/libxsd/README b/libxsd/README
deleted file mode 100644
index 00f8e1d..0000000
--- a/libxsd/README
+++ /dev/null
@@ -1,13 +0,0 @@
-libxsd is a runtime library for language mappings generated by CodeSynthesis
-XSD, a W3C XML Schema to C++ data binding compiler.
-
-See the LICENSE file for distribution conditions.
-
-See the INSTALL file for prerequisites and installation instructions.
-
-See the doc/ directory for documentation.
-
-The project page is at https://www.codesynthesis.com/projects/xsd/
-
-Send bug reports or any other feedback to the xsd-users@codesynthesis.com
-mailing list.
diff --git a/libxsd/README-GIT b/libxsd/README-GIT
deleted file mode 100644
index bbc5b4c..0000000
--- a/libxsd/README-GIT
+++ /dev/null
@@ -1,4 +0,0 @@
-The checked out xsd/cxx/version.hxx will be overwritten during the build
-process but these changes should be ignored. To do this automatically, run:
-
-git update-index --assume-unchanged xsd/cxx/version.hxx
diff --git a/libxsd/README.md b/libxsd/README.md
new file mode 100644
index 0000000..c0afe68
--- /dev/null
+++ b/libxsd/README.md
@@ -0,0 +1,12 @@
+# libxsd - runtime library for XML Schema to C++ data binding compiler
+
+XSD is an open-source, cross-platform XML Schema to C++ data binding
+compiler. Provided with an XML document specification (XML Schema), it
+generates C++ classes that represent the given vocabulary as well as XML
+parsing and serialization code. You can then access the data stored in XML
+using types and functions that semantically correspond to your application
+domain rather than dealing with generic elements/attributes and raw strings.
+
+For further information, including licensing conditions, documentation, and
+binary packages, refer to the [XSD project
+page](https://codesynthesis.com/products/xsd/).
diff --git a/libxsd/build/root.build b/libxsd/build/root.build
index 82da455..1a5d8cc 100644
--- a/libxsd/build/root.build
+++ b/libxsd/build/root.build
@@ -1,6 +1,8 @@
# file : build/root.build
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+config [bool] config.libxsd.doxygen ?= false
+
using in
cxx.std = latest
diff --git a/libxsd/buildfile b/libxsd/buildfile
index abb2c7c..90a32e1 100644
--- a/libxsd/buildfile
+++ b/libxsd/buildfile
@@ -1,8 +1,7 @@
# file : buildfile
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-./: {*/ -build/} doc{INSTALL NEWS README} legal{GPLv2 LICENSE FLOSSE} manifest
-
-# Don't the INSTALL file.
-#
-doc{INSTALL}@./: install = false
+./: {*/ -build/} \
+ doc{README.md PACKAGE-README.md NEWS} \
+ legal{GPLv2 LICENSE FLOSSE} \
+ manifest
diff --git a/libxsd/doc/buildfile b/libxsd/doc/buildfile
index c640a6c..1298db1 100644
--- a/libxsd/doc/buildfile
+++ b/libxsd/doc/buildfile
@@ -10,74 +10,83 @@ doxygen{*}: extension = doxygen
define doxytag: file
doxytag{*}: extension = doxytag
-# Import the doxygen program only if present on the system. This way a
-# distribution that includes pre-generated files can be built without
-# installing this programs.
-#
-import? doxygen = doxygen%exe{doxygen}
+doxygen_doc = $config.libxsd.doxygen
-# Note that we include the doxygen-generated files into the distribution and
-# don't remove them when cleaning in src (so that clean results in a state
-# identical to distributed).
+if $doxygen_doc
+ import! doxygen = doxygen%exe{doxygen}
+
+./: cxx/tree/reference/doxytag{libxsd}: include = $doxygen_doc
cxx/tree/reference/
{
- # @@ Currently, there are the following issues that can only be addressed
- # on the build2 level:
- #
- # - The update recipe is not re-executed after html/ directory content
- # has changed or it is removed.
- #
- # - The clean operation doesn't remove the html/ directory.
- #
- # - The html/ directory is not installed nor distributed regardless of
- # the doxygen presence.
- #
- if ($doxygen != [null])
+ headers = buffer types date-time elements element-map exceptions
+
+ <doxytag{libxsd}>: doxygen{libxsd} \
+ html{footer} \
+ $src_root/xsd/cxx/tree/hxx{$headers} \
+ $doxygen
+ %
+ if $doxygen_doc
+ {{
+ o = $directory($>[0]) # Target output directory.
+ c = $path($<[0]) # Doxygen config file.
+ t = $path($>[0]).t # Temp dir.
+ tc = $t/"$leaf($c)" # Temp doxygen config file.
+ d = $t/$name($>[0]).d # Dep file (target list).
+
+ # Describe the dynamic targets for better diagnostics.
+ #
+ dyndep_options = --target-what 'generated doxygen'
+
+ # Doxygen doesn't provide any way to list the would-be-generated HTML
+ # files so the best we can do is to generate them, get their list, and
+ # throw them away. Note that this code is inspired by the hello-thrift
+ # example (see its buildfile for details).
+ #
+ # Note: fsdir{} could have been static prerequisite but let's keep it
+ # dynamic in case we want to turn this into a rule one day.
+ #
+ depdb dyndep --dyn-target $dyndep_options --format lines --file $d -- \
+ mkdir -p $t && \
+ sed -e "s%^\\s*\(HTML_OUTPUT\\s*=\).*\$%\\1 $t/html%" \
+ -e "s%^\\s*\(GENERATE_TAGFILE\\s*=\).*\$%\\1%" $c >$tc && \
+ $doxygen $tc &$t/html/*** && \
+ find $t/html -type f >$d && \
+ sed -e "s%[/\\\\]$path.leaf($t)%%g" -i $d && \
+ echo '' >>$d && \
+ echo $path.representation([dir_path] $o/html) >>$d
+
+ diag doxygen ($<[0]) -> ($>[0]) $o/fsdir{html/}
+
+ rm -rf $o/html # Note: doxygen doesn't clean it up itself.
+
+ # @@ It's unclear if it would be beneficial (or even possible) to list
+ # relative inputs in doxygen{libxsd} and then adjust the CWD here. Note
+ # that while relative header paths are used in libxsd.doxygen for
+ # make-based build system, absolute paths still end up in
+ # libxsd.doxytag.
+ #
+ $doxygen $c
+ }}
+
+ doxygen{libxsd}: in{libxsd}
{
- ../../../: doxytag{libxsd}
-
- headers = buffer types date-time elements element-map exceptions
-
- <doxytag{libxsd} fsdir{html}>: doxygen{libxsd} \
- html{footer} \
- $src_root/xsd/cxx/tree/hxx{$headers} \
- $doxygen
- {
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag doxygen $> : ($<[0]) # @@ TMP: revise
-
- rm -r -f $directory($>[1])
-
- $doxygen $path($<[0])
- }}
-
- doxygen{libxsd}: in{libxsd}
- {
- in.symbol = '%'
-
- input = $regex.merge($headers, \
- '^(.*)$', \
- "$src_root/xsd/cxx/tree/\\1.hxx", \
- ' ')
- }
-
- html{footer}: in{footer}
- {
- # Extract the copyright notice from the LICENSE file.
- #
- # Note that cat is a builtin which means this is both portable and fast.
- #
- copyright = $process.run_regex(cat $src_root/LICENSE, \
- 'Copyright \(c\) (.+)\.', \
- '\1')
- }
+ in.symbol = '%'
+
+ input = $regex.merge($headers, \
+ '^(.*)$', \
+ "$src_root/xsd/cxx/tree/\\1.hxx", \
+ ' ')
}
- else
- ../../../: doxytag{+libxsd}
-}
-doc{*}: install.subdirs = true
+ html{footer}: in{footer}
+ {
+ # Extract the copyright notice from the LICENSE file.
+ #
+ # Note that cat is a builtin which means this is both portable and fast.
+ #
+ copyright = $process.run_regex(cat $src_root/LICENSE, \
+ 'Copyright \(c\) (.+)\.', \
+ '\1')
+ }
+}
diff --git a/libxsd/manifest b/libxsd/manifest
index e5d4ad4..23a9848 100644
--- a/libxsd/manifest
+++ b/libxsd/manifest
@@ -1,17 +1,116 @@
: 1
name: libxsd
-version: 4.2.0-b.2.z
+version: 4.2.1-a.0.z
project: xsd
+type: lib,binless
+language: c++
summary: XML Schema to C++ data binding compiler runtime library
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
topics: C++, XML, XML Schema, XML parser
-description-file: README
+description-file: README.md
+package-description-file: PACKAGE-README.md
changes-file: NEWS
-url: https://www.codesynthesis.com/projects/xsd/
-doc-url: https://www.codesynthesis.com/projects/xsd/
-src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd/
+url: https://www.codesynthesis.com/products/xsd/
+doc-url: https://www.codesynthesis.com/products/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
build-warning-email: builds@codesynthesis.com
-depends: * build2 >= 0.14.0
-depends: * bpkg >= 0.14.0
+depends: * build2 >= 0.16.0
+depends: * bpkg >= 0.16.0
tests: libxsd-tests == $
+
+# Binary distribution packages. Overall notes:
+#
+# - While the library itself doesn't depend on either libxerces-c of libexpat
+# directly, the tests do and it makes sense to use the system versions where
+# available. Similarly, we pass optimization options where appropriate.
+#
+# - Build as C++11 for maximum compatibility (this is a C++11 codebase).
+#
+# - For archives adjust metadata since this is a binless library.
+#
+# - We disable warning emails for configurations that build Xerces-C++.
+
+bindist-debian-builds: bindist
+bindist-debian-build-include: linux_debian*-**
+bindist-debian-build-include: linux_ubuntu*-**
+bindist-debian-build-exclude: **
+bindist-debian-build-config:
+\
++bpkg.bindist.debian:
++bbot.bindist.upload:
+b.create:config.cxx.std=c++11
+?sys:libxerces-c
+?sys:libexpat
+\
+
+# Note that there is no Xerces-C++ package in RHEL (only in EPEL) so we
+# have a separate configuration for RHEL.
+#
+bindist-fedora-builds: bindist
+bindist-fedora-build-include: linux_fedora*-**
+bindist-fedora-build-exclude: **
+bindist-fedora-build-config:
+\
++bpkg.bindist.fedora:
++bbot.bindist.upload:
+b.create:config.cxx.std=c++11
+?sys:libxerces-c
+?sys:libexpat
+\
+
+bindist-rhel-builds: bindist
+bindist-rhel-build-include: linux_rhel*-**
+bindist-rhel-build-exclude: **
+bindist-rhel-build-config:
+\
++bpkg.bindist.fedora:
++bbot.bindist.upload:
+b.create:config.cxx.std=c++11
+?sys:libexpat
+\
+#bindist-rhel-build-error-email: builds@codesynthesis.com
+
+bindist-windows-builds: bindist
+bindist-windows-build-include: windows*-**
+bindist-windows-build-exclude: **
+bindist-windows-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--archive-build-meta=windows
+bpkg.bindist.archive:config.install.relocatable=true
+b.create:config.cc.coptions="/W2 /O2"
+b.create:config.cxx.std=c++11
+\
+#bindist-windows-build-error-email: builds@codesynthesis.com
+
+bindist-macos-builds: bindist
+bindist-macos-build-include: macos*-**
+bindist-macos-build-exclude: **
+bindist-macos-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--archive-build-meta=macos
+bpkg.bindist.archive:config.install.relocatable=true
+b.create:config.cc.coptions="-Wall -O3"
+b.create:config.cxx.std=c++11
+\
+#bindist-macos-build-error-email: builds@codesynthesis.com
+
+# Generic linux package (built using oldest Debian we support).
+#
+bindist-linux-builds: bindist
+bindist-linux-build-include: linux_debian_11-gcc_10.2-bindist
+bindist-linux-build-exclude: **
+bindist-linux-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--archive-build-meta=linux
+bpkg.bindist.archive:config.install.relocatable=true
+b.create:config.cxx.std=c++11
+?sys:libxerces-c
+?sys:libexpat
+\
diff --git a/libxsd/xsd/cxx/tree/type-factory-map.hxx b/libxsd/xsd/cxx/tree/type-factory-map.hxx
index e20acfe..d52982f 100644
--- a/libxsd/xsd/cxx/tree/type-factory-map.hxx
+++ b/libxsd/xsd/cxx/tree/type-factory-map.hxx
@@ -150,11 +150,14 @@ namespace xsd
//
//
- template<unsigned long id, typename C, typename T>
+ template<unsigned long id, typename C>
struct element_factory_initializer
{
+ typedef typename type_factory_map<C>::factory factory;
+
element_factory_initializer (const C* root_name, const C* root_ns,
- const C* subst_name, const C* subst_ns);
+ const C* subst_name, const C* subst_ns,
+ factory);
~element_factory_initializer ();
diff --git a/libxsd/xsd/cxx/tree/type-factory-map.txx b/libxsd/xsd/cxx/tree/type-factory-map.txx
index 1eddb25..5a9dc38 100644
--- a/libxsd/xsd/cxx/tree/type-factory-map.txx
+++ b/libxsd/xsd/cxx/tree/type-factory-map.txx
@@ -302,6 +302,9 @@ namespace xsd
if (i != element_map_.end ())
{
+ // Note that we may find an abstract element in which case the
+ // returned factory will be NULL.
+ //
f = find_substitution (i->second, qn);
}
}
@@ -455,21 +458,22 @@ namespace xsd
//
//
- template<unsigned long id, typename C, typename T>
- element_factory_initializer<id, C, T>::
+ template<unsigned long id, typename C>
+ element_factory_initializer<id, C>::
element_factory_initializer (const C* root_name, const C* root_ns,
- const C* subst_name, const C* subst_ns)
+ const C* subst_name, const C* subst_ns,
+ factory f)
: root_name_ (root_name), root_ns_ (root_ns),
subst_name_ (subst_name), subst_ns_ (subst_ns)
{
type_factory_map_instance<id, C> ().register_element (
xml::qualified_name<C> (root_name, root_ns),
xml::qualified_name<C> (subst_name, subst_ns),
- &factory_impl<T>);
+ f);
}
- template<unsigned long id, typename C, typename T>
- element_factory_initializer<id, C, T>::
+ template<unsigned long id, typename C>
+ element_factory_initializer<id, C>::
~element_factory_initializer ()
{
type_factory_map_instance<id, C> ().unregister_element (
diff --git a/libxsd/xsd/cxx/tree/type-serializer-map.hxx b/libxsd/xsd/cxx/tree/type-serializer-map.hxx
index 38b2fb9..50869b5 100644
--- a/libxsd/xsd/cxx/tree/type-serializer-map.hxx
+++ b/libxsd/xsd/cxx/tree/type-serializer-map.hxx
@@ -216,8 +216,11 @@ namespace xsd
template<unsigned long id, typename C, typename T>
struct element_serializer_initializer
{
+ typedef typename type_serializer_map<C>::serializer serializer;
+
element_serializer_initializer (const C* root_name, const C* root_ns,
- const C* subst_name, const C* subst_ns);
+ const C* subst_name, const C* subst_ns,
+ serializer);
~element_serializer_initializer ();
diff --git a/libxsd/xsd/cxx/tree/type-serializer-map.txx b/libxsd/xsd/cxx/tree/type-serializer-map.txx
index 1acdad2..a6c690a 100644
--- a/libxsd/xsd/cxx/tree/type-serializer-map.txx
+++ b/libxsd/xsd/cxx/tree/type-serializer-map.txx
@@ -550,14 +550,21 @@ namespace xsd
template<unsigned long id, typename C, typename T>
element_serializer_initializer<id, C, T>::
element_serializer_initializer (const C* root_name, const C* root_ns,
- const C* subst_name, const C* subst_ns)
+ const C* subst_name, const C* subst_ns,
+ serializer s)
: root_name_ (root_name), root_ns_ (root_ns)
{
+ // Note that we still have to use real typeid (instead of, say, NULL)
+ // for abstract elements to make sure we have separate entries for
+ // each of them. We can assume that such a typeid can never be looked
+ // up (since it's impossible to instantiate the corresponding abstract
+ // type).
+ //
type_serializer_map_instance<id, C> ().register_element (
xml::qualified_name<C> (root_name, root_ns),
xml::qualified_name<C> (subst_name, subst_ns),
typeid (T),
- &serializer_impl<T>);
+ s);
}
template<unsigned long id, typename C, typename T>
diff --git a/libxsd/xsd/cxx/xml/char-utf8.txx b/libxsd/xsd/cxx/xml/char-utf8.txx
index a571ce9..76bba86 100644
--- a/libxsd/xsd/cxx/xml/char-utf8.txx
+++ b/libxsd/xsd/cxx/xml/char-utf8.txx
@@ -220,7 +220,7 @@ namespace xsd
//
u = (c & 0x1F) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
@@ -235,7 +235,7 @@ namespace xsd
//
u = (c & 0x0F) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
@@ -243,7 +243,7 @@ namespace xsd
}
u = (u | (c & 0x3F)) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
@@ -258,7 +258,7 @@ namespace xsd
//
u = (c & 0x07) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
@@ -266,7 +266,7 @@ namespace xsd
}
u = (u | (c & 0x3F)) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
@@ -274,7 +274,7 @@ namespace xsd
}
u = (u | (c & 0x3F)) << 6;
- c = *++p;
+ c = static_cast<unsigned char> (*++p);
if ((c >> 6) != 2)
{
valid = false;
diff --git a/libxsd/xsd/cxx/xml/dom/parsing-source.hxx b/libxsd/xsd/cxx/xml/dom/parsing-source.hxx
index fc0bd71..e4cb37e 100644
--- a/libxsd/xsd/cxx/xml/dom/parsing-source.hxx
+++ b/libxsd/xsd/cxx/xml/dom/parsing-source.hxx
@@ -8,6 +8,7 @@
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMAttr.hpp>
+#include <xercesc/dom/DOMText.hpp>
#include <xercesc/dom/DOMElement.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMNamedNodeMap.hpp>
diff --git a/libxsd/xsd/cxx/xml/dom/parsing-source.txx b/libxsd/xsd/cxx/xml/dom/parsing-source.txx
index 6543671..2a2d6e2 100644
--- a/libxsd/xsd/cxx/xml/dom/parsing-source.txx
+++ b/libxsd/xsd/cxx/xml/dom/parsing-source.txx
@@ -105,7 +105,10 @@ namespace xsd
const properties<C>& prop,
unsigned long flags)
{
- using namespace xercesc;
+ // Note: explicitly qualifying everything with xerces:: to avoid
+ // conflicts with MSXML.
+ //
+ using xercesc::XMLUni;
// Instantiate the DOM parser.
//
@@ -115,13 +118,14 @@ namespace xsd
// Get an implementation of the Load-Store (LS) interface.
//
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
+ xercesc::DOMImplementation* impl (
+ xercesc::DOMImplementationRegistry::getDOMImplementation (ls_id));
- XSD_DOM_AUTO_PTR<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+ XSD_DOM_AUTO_PTR<xercesc::DOMLSParser> parser (
+ impl->createLSParser (
+ xercesc::DOMImplementationLS::MODE_SYNCHRONOUS, 0));
- DOMConfiguration* conf (parser->getDomConfig ());
+ xercesc::DOMConfiguration* conf (parser->getDomConfig ());
// Discard comment nodes in the document.
//
@@ -216,7 +220,7 @@ namespace xsd
xercesc::Wrapper4InputSource wrap (&is, false);
- XSD_DOM_AUTO_PTR<DOMDocument> doc;
+ XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc;
try
{
doc.reset (parser->parse (&wrap));
@@ -249,7 +253,10 @@ namespace xsd
const properties<C>& prop,
unsigned long flags)
{
- using namespace xercesc;
+ // Note: explicitly qualifying everything with xerces:: to avoid
+ // conflicts with MSXML.
+ //
+ using xercesc::XMLUni;
// Instantiate the DOM parser.
//
@@ -259,13 +266,14 @@ namespace xsd
// Get an implementation of the Load-Store (LS) interface.
//
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
+ xercesc::DOMImplementation* impl (
+ xercesc::DOMImplementationRegistry::getDOMImplementation (ls_id));
- XSD_DOM_AUTO_PTR<DOMLSParser> parser (
- impl->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+ XSD_DOM_AUTO_PTR<xercesc::DOMLSParser> parser (
+ impl->createLSParser(
+ xercesc::DOMImplementationLS::MODE_SYNCHRONOUS, 0));
- DOMConfiguration* conf (parser->getDomConfig ());
+ xercesc::DOMConfiguration* conf (parser->getDomConfig ());
// Discard comment nodes in the document.
//
@@ -359,7 +367,7 @@ namespace xsd
bits::error_handler_proxy<C> ehp (eh);
conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
- XSD_DOM_AUTO_PTR<DOMDocument> doc;
+ XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc;
try
{
doc.reset (parser->parseURI (string (uri).c_str ()));
diff --git a/libxsd/xsd/cxx/xml/dom/serialization-source.txx b/libxsd/xsd/cxx/xml/dom/serialization-source.txx
index b59e109..e663d7b 100644
--- a/libxsd/xsd/cxx/xml/dom/serialization-source.txx
+++ b/libxsd/xsd/cxx/xml/dom/serialization-source.txx
@@ -109,7 +109,10 @@ namespace xsd
add_namespaces (xercesc::DOMElement& el,
const namespace_infomap<C>& map)
{
- using namespace xercesc;
+ // Note: explicitly qualifying everything with xerces:: to avoid
+ // conflicts with MSXML.
+ //
+ using xercesc::XMLUni;
typedef std::basic_string<C> string;
typedef namespace_infomap<C> infomap;
@@ -159,14 +162,14 @@ namespace xsd
//
if (!i->second.name.empty ())
el.setAttributeNS (
- xercesc::XMLUni::fgXMLNSURIName,
+ XMLUni::fgXMLNSURIName,
xml::string (xmlns_prefix).c_str (),
xml::string (i->second.name).c_str ());
}
else
{
el.setAttributeNS (
- xercesc::XMLUni::fgXMLNSURIName,
+ XMLUni::fgXMLNSURIName,
xml::string (xmlns_prefix + colon + i->first).c_str (),
xml::string (i->second.name).c_str ());
}
@@ -236,7 +239,8 @@ namespace xsd
const namespace_infomap<C>& map,
unsigned long)
{
- using namespace xercesc;
+ // Note: explicitly qualifying everything with xerces:: to avoid
+ // conflicts with MSXML.
typedef std::basic_string<C> string;
typedef namespace_infomap<C> infomap;
@@ -268,10 +272,10 @@ namespace xsd
xercesc::chLatin_S,
xercesc::chNull};
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls));
+ xercesc::DOMImplementation* impl (
+ xercesc::DOMImplementationRegistry::getDOMImplementation (ls));
- XSD_DOM_AUTO_PTR<DOMDocument> doc (
+ XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc (
impl->createDocument (
(ns.empty () ? 0 : xml::string (ns).c_str ()),
xml::string ((prefix.empty ()
@@ -293,21 +297,24 @@ namespace xsd
xercesc::DOMErrorHandler& eh,
unsigned long flags)
{
- using namespace xercesc;
+ // Note: explicitly qualifying everything with xerces:: to avoid
+ // conflicts with MSXML.
+ //
+ using xercesc::XMLUni;
const XMLCh ls[] = {xercesc::chLatin_L,
xercesc::chLatin_S,
xercesc::chNull};
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls));
+ xercesc::DOMImplementation* impl (
+ xercesc::DOMImplementationRegistry::getDOMImplementation (ls));
bits::error_handler_proxy<C> ehp (eh);
- XSD_DOM_AUTO_PTR<DOMLSSerializer> writer (
+ XSD_DOM_AUTO_PTR<xercesc::DOMLSSerializer> writer (
impl->createLSSerializer ());
- DOMConfiguration* conf (writer->getDomConfig ());
+ xercesc::DOMConfiguration* conf (writer->getDomConfig ());
conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
@@ -334,7 +341,7 @@ namespace xsd
conf->canSetParameter (XMLUni::fgDOMXMLDeclaration, false))
conf->setParameter (XMLUni::fgDOMXMLDeclaration, false);
- XSD_DOM_AUTO_PTR<DOMLSOutput> out (impl->createLSOutput ());
+ XSD_DOM_AUTO_PTR<xercesc::DOMLSOutput> out (impl->createLSOutput ());
out->setEncoding (xml::string (encoding).c_str ());
out->setByteStream (&target);
diff --git a/xsd-examples/.gitignore b/xsd-examples/.gitignore
index d87c74c..2d3e43c 100644
--- a/xsd-examples/.gitignore
+++ b/xsd-examples/.gitignore
@@ -3,10 +3,16 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
+*.dylib
*.dll
*.a
*.lib
diff --git a/xsd-examples/README b/xsd-examples/README
deleted file mode 100644
index 023334d..0000000
--- a/xsd-examples/README
+++ /dev/null
@@ -1,21 +0,0 @@
-This package contains a number of examples that show how to use XSD, the
-XML Schema to C++ data binding compiler and the generated C++ Tree and
-Parser classes. See the README files in example directories for more
-information on each example.
-
-The package source code is in the public domain.
-
-The project page is at https://www.codesynthesis.com/projects/xsd/.
-
-The easiest way to build this package is with the bpkg package manager:
-
-$ mkdir xsd-examples/
-$ cd xsd-examples/
-$ bpkg create cc
-$ bpkg build xsd-examples@https://pkg.cppget.org/1/stable
-
-But if you don't want to use the package manager, then you can also build it
-manually using the standard build2 build system.
-
-Send bug reports or any other feedback to the xsd-users@codesynthesis.com
-mailing list.
diff --git a/xsd-examples/README.md b/xsd-examples/README.md
new file mode 100644
index 0000000..e55a3ee
--- /dev/null
+++ b/xsd-examples/README.md
@@ -0,0 +1,11 @@
+# xsd-examples - examples for XSD compiler
+
+This package contains examples for `xsd`, the XML Schema to C++ data binding
+compiler.
+
+The C++/Tree and C++/Parser mapping examples can be found in the `cxx/tree/`
+and `cxx/parser/` subdirectories, respectively. For the summary of available
+examples for each mapping, see `cxx/tree/README` and `cxx/parser/README`,
+respectively. Each example also comes with its own `README` file that provides
+a detailed description of the functionality shown as well as the steps to
+build and run it.
diff --git a/xsd-examples/build/root.build b/xsd-examples/build/root.build
index 5d7a5b4..d58c13a 100644
--- a/xsd-examples/build/root.build
+++ b/xsd-examples/build/root.build
@@ -1,15 +1,6 @@
# file : build/root.build
# license : not copyrighted - public domain
-define xsd: file
-xsd{*}: extension = xsd
-
-define xml: file
-xml{*}: extension = xml
-
-define map: file
-map{*}: extension = map
-
cxx.std = latest
using cxx
@@ -19,20 +10,32 @@ ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx
-if ($cxx.target.system == 'win32-msvc')
- cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+if ($build.mode != 'skeleton')
+{
+ define xsd: file
+ xsd{*}: extension = xsd
+
+ define xml: file
+ xml{*}: extension = xml
+
+ define map: file
+ map{*}: extension = map
+
+ if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-if ($cxx.class == 'msvc')
- cxx.coptions += /wd4251 /wd4275 /wd4800
+ if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
-# Setup the xsd that we are using.
-#
-import xsd = xsd%exe{xsd}
+ # Import xsd that we are testing.
+ #
+ import! [metadata] xsd = xsd%exe{xsd}
-# Every exe{} in this project is by default a test.
-#
-exe{*}: test = true
+ # Every exe{} in this project is by default a test.
+ #
+ exe{*}: test = true
-# Specify the test target for cross-testing.
-#
-test.target = $cxx.target
+ # Specify the test target for cross-testing.
+ #
+ test.target = $cxx.target
+}
diff --git a/xsd-examples/buildfile b/xsd-examples/buildfile
index 3f8fb1b..f9b2d06 100644
--- a/xsd-examples/buildfile
+++ b/xsd-examples/buildfile
@@ -1,4 +1,4 @@
# file : buildfile
# license : not copyrighted - public domain
-./: {*/ -build/} doc{README} legal{UNLICENSE} manifest
+./: {*/ -build/} doc{README.md} legal{UNLICENSE} manifest
diff --git a/xsd-examples/cxx/parser/README b/xsd-examples/cxx/parser/README
index 01906c7..e1016ce 100644
--- a/xsd-examples/cxx/parser/README
+++ b/xsd-examples/cxx/parser/README
@@ -42,4 +42,4 @@ performance
mixed
Shows how to handle raw, "type-less content" such as mixed content
- models, anyType/anySimpleType, and any/anyAttribute. \ No newline at end of file
+ models, anyType/anySimpleType, and any/anyAttribute.
diff --git a/xsd-examples/cxx/parser/generated/README b/xsd-examples/cxx/parser/generated/README
index ca56974..d772ab8 100644
--- a/xsd-examples/cxx/parser/generated/README
+++ b/xsd-examples/cxx/parser/generated/README
@@ -13,20 +13,38 @@ library.xml
library-pskel.hxx
library-pskel.cxx
- Parser skeletons generated by XSD from library.xsd.
+ Parser skeletons generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-parser --generate-print-impl --generate-test-driver library.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --generate-print-impl \
+ --generate-test-driver library.xsd
library-pimpl.hxx
library-pimpl.cxx
Sample parser implementations that print the XML data to STDOUT.
- These are generated by XSD from library.xsd with the
- --generate-print-impl option.
+ These are also generated by the above XSD command (requested with
+ the --generate-print-impl option).
library-driver.cxx
- Sample driver for the example. It is generated by XSD from
- library.xsd with the --generate-test-driver option.
+ Sample driver for the example. It is also generated by the above
+ XSD command (requested with the --generate-test-driver option).
+
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c library-pskel.cxx
+c++ -c library-pimpl.cxx
+c++ -c library-driver.cxx
+c++ -o driver library-driver.o library-pskel.o library-pimpl.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+c++ -o driver library-driver.o library-pskel.o library-pimpl.o -lexpat
-To run the example on the sample XML instance document simply
-execute:
+To run the example on the sample XML instance document execute:
-$ ./library-driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/parser/generated/buildfile b/xsd-examples/cxx/parser/generated/buildfile
index 5e4adac..85aded9 100644
--- a/xsd-examples/cxx/parser/generated/buildfile
+++ b/xsd-examples/cxx/parser/generated/buildfile
@@ -17,9 +17,7 @@ exe{driver}: xml{library}: test.input = true
{hxx cxx}{library-pimpl} \
{ cxx}{library-driver}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--generate-print-impl \
diff --git a/xsd-examples/cxx/parser/hello/README b/xsd-examples/cxx/parser/hello/README
index 97449de..fc4656d 100644
--- a/xsd-examples/cxx/parser/hello/README
+++ b/xsd-examples/cxx/parser/hello/README
@@ -11,7 +11,14 @@ hello.xml
hello-pskel.hxx
hello-pskel.cxx
- Parser skeletons generated by XSD from hello.xsd.
+ Parser skeletons generated by the XSD compiler from hello.xsd using the
+ following command line:
+
+ xsd cxx-parser hello.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat hello.xsd
driver.cxx
A parser implementation and a driver for the example. The
@@ -22,7 +29,17 @@ driver.cxx
In then invokes this parser instance to parse the input
file.
-To run the example on the sample XML instance document simply
-execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c hello-pskel.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o hello-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o hello-pskel.o -lexpat
+
+To run the example on the sample XML instance document execute:
-$ ./driver hello.xml
+./driver hello.xml
diff --git a/xsd-examples/cxx/parser/hello/buildfile b/xsd-examples/cxx/parser/hello/buildfile
index 2df4a7f..c136334 100644
--- a/xsd-examples/cxx/parser/hello/buildfile
+++ b/xsd-examples/cxx/parser/hello/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{hello}: test.input = true
<{hxx ixx cxx}{hello-pskel}>: xsd{hello} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-examples/cxx/parser/library/README b/xsd-examples/cxx/parser/library/README
index 3f515f6..c0af7fc 100644
--- a/xsd-examples/cxx/parser/library/README
+++ b/xsd-examples/cxx/parser/library/README
@@ -20,8 +20,14 @@ library.map
library-pskel.hxx
library-pskel.ixx
library-pskel.cxx
- Parser skeletons generated by XSD from library.xsd and
- library.map.
+ Parser skeletons generated by the XSD compiler from library.xsd and
+ library.map using the following command line:
+
+ xsd cxx-parser --type-map=library.map library.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --type-map=library.map library.xsd
library-pimpl.hxx
library-pimpl.cxx
@@ -38,7 +44,18 @@ driver.cxx
object model. Finally, it prints the contents of the
in-memory object model to STDERR.
-To run the example on the sample XML instance document simply
-execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c library-pskel.cxx
+c++ -c library-pimpl.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o library-pskel.o library-pimpl.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o library-pskel.o library-pimpl.o -lexpat
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/parser/library/buildfile b/xsd-examples/cxx/parser/library/buildfile
index 40810b3..2d463e5 100644
--- a/xsd-examples/cxx/parser/library/buildfile
+++ b/xsd-examples/cxx/parser/library/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library-pskel}>: xsd{library} map{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--type-map $path($<[1]) \
diff --git a/xsd-examples/cxx/parser/mixed/README b/xsd-examples/cxx/parser/mixed/README
index 23ace6f..a00a86d 100644
--- a/xsd-examples/cxx/parser/mixed/README
+++ b/xsd-examples/cxx/parser/mixed/README
@@ -32,8 +32,14 @@ text.map
text-pskel.hxx
text-pskel.cxx
- Parser skeletons generated by XSD from text.xsd and
- text.map.
+ Parser skeletons generated by the XSD compiler from text.xsd and
+ text.map using the following command line:
+
+ xsd cxx-parser --type-map=text.map text.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --type-map=text.map text.xsd
driver.cxx
A parser implementation and a driver for the example. The
@@ -43,7 +49,17 @@ driver.cxx
parsers for the XML Schema built-in types. In then invokes
this parser instance to parse the input file.
-To run the example on the sample XML instance document simply
-execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c text-pskel.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o text-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o text-pskel.o -lexpat
+
+To run the example on the sample XML instance document:
-$ ./driver text.xml
+./driver text.xml
diff --git a/xsd-examples/cxx/parser/mixed/buildfile b/xsd-examples/cxx/parser/mixed/buildfile
index 0079444..103d94b 100644
--- a/xsd-examples/cxx/parser/mixed/buildfile
+++ b/xsd-examples/cxx/parser/mixed/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text-pskel}>: xsd{text} map{text} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--type-map $path($<[1]) \
diff --git a/xsd-examples/cxx/parser/mixin/README b/xsd-examples/cxx/parser/mixin/README
index 343e379..20e5d53 100644
--- a/xsd-examples/cxx/parser/mixin/README
+++ b/xsd-examples/cxx/parser/mixin/README
@@ -20,15 +20,32 @@ schema.map
schema-pskel.hxx
schema-pskel.cxx
- Parser skeletons generated by XSD from schema.xsd and
- schema.map.
+ Parser skeletons generated by the XSD compiler from schema.xsd and
+ schema.map using the following command line:
+
+ xsd cxx-parser --type-map=schema.map schema.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --type-map=schema.map schema.xsd
driver.cxx
Parser implementations and a driver for the example. It
shows how to mix the implementation of the base parser
into the derived parser.
-To run the example on the sample XML instance document simply
-execute:
-$ ./driver instance.xml
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c schema-pskel.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o schema-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o schema-pskel.o -lexpat
+
+To run the example on the sample XML instance document execute:
+
+./driver instance.xml
diff --git a/xsd-examples/cxx/parser/mixin/buildfile b/xsd-examples/cxx/parser/mixin/buildfile
index 4d4d751..7b6cee2 100644
--- a/xsd-examples/cxx/parser/mixin/buildfile
+++ b/xsd-examples/cxx/parser/mixin/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{instance}: test.input = true
<{hxx ixx cxx}{schema-pskel}>: xsd{schema} map{schema} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--type-map $path($<[1]) \
diff --git a/xsd-examples/cxx/parser/multiroot/README b/xsd-examples/cxx/parser/multiroot/README
index 041dfec..410784d 100644
--- a/xsd-examples/cxx/parser/multiroot/README
+++ b/xsd-examples/cxx/parser/multiroot/README
@@ -22,8 +22,14 @@ protocol.map
protocol-pskel.hxx
protocol-pskel.cxx
- Parser skeletons generated by XSD from protocol.xsd and
- protocol.map.
+ Parser skeletons generated by the XSD compiler from protocol.xsd and
+ protocol.map using the following command line:
+
+ xsd cxx-parser --type-map=protocol.map protocol.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --type-map=protocol.map protocol.xsd
protocol-pimpl.hxx
protocol-pimpl.cxx
@@ -43,9 +49,20 @@ driver.cxx
parse the input file and produce the in-memory object model.
Finally, it prints the contents of the object model to STDERR.
-To run the example on the sample XML request documents simply
-execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c protocol-pskel.cxx
+c++ -c protocol-pimpl.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o protocol-pskel.o protocol-pimpl.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o protocol-pskel.o protocol-pimpl.o -lexpat
+
+To run the example on the sample XML request documents execute:
-$ ./driver balance.xml
-$ ./driver withdraw.xml
-$ ./driver deposit.xml
+./driver balance.xml
+./driver withdraw.xml
+./driver deposit.xml
diff --git a/xsd-examples/cxx/parser/multiroot/buildfile b/xsd-examples/cxx/parser/multiroot/buildfile
index 6b0f604..4c97ca1 100644
--- a/xsd-examples/cxx/parser/multiroot/buildfile
+++ b/xsd-examples/cxx/parser/multiroot/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -protocol-pskel} {hxx ixx cxx}{protocol-pskel} $libs \
<{hxx ixx cxx}{protocol-pskel}>: xsd{protocol} map{protocol} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--type-map $path($<[1]) \
diff --git a/xsd-examples/cxx/parser/performance/README b/xsd-examples/cxx/parser/performance/README
index 46137d0..eda0b16 100644
--- a/xsd-examples/cxx/parser/performance/README
+++ b/xsd-examples/cxx/parser/performance/README
@@ -13,6 +13,16 @@ test-50k.xml
gen.cxx
Program to generate a test document of desired size.
+ To compile and link this program we can use the following commands (replace
+ 'c++' with your C++ compiler name):
+
+ c++ -c gen.cxx
+ c++ -o gen gen.o
+
+ To generate the test document execute, for example:
+
+ ./gen 633 test-100k.xml
+
time.hxx
time.cxx
Class definition that represents time.
@@ -20,7 +30,14 @@ time.cxx
test-pskel.hxx
test-pskel.ixx
test-pskel.cxx
- Parser skeletons generated by the XSD compiler from test.xsd.
+ Parser skeletons generated by the XSD compiler from test.xsd using the
+ following command line:
+
+ xsd cxx-parser --skel-file-suffix=-xerces-pskel test.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --skel-file-suffix=-expat-pskel test.xsd
driver.cxx
Driver for the example. It first parses the command line arguments
@@ -30,17 +47,28 @@ driver.cxx
measurement loop which on each iteration parses the XML document
from the in-memory buffer.
-To run the example on a test XML document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
-$ ./driver test-50k.xml
+c++ -c test-xerces-pskel.cxx
+c++ -c time.cxx
+c++ -DXERCES_PARSER -c driver.cxx
+c++ -o driver driver.o time.o test-xerces-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -c test-expat-pskel.cxx
+c++ -c time.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o time.o test-expat-pskel.o -lexpat
+
+To run the example on a test XML document execute:
+
+./driver test-50k.xml
The -v option can be used to turn on validation in the underlying XML
parser (only makes sense for Xerces-C++, off by default). The -i option
can be used to specify the number of parsing iterations (1000 by default).
For example:
-$ ./driver -v -i 100 test-50k.xml
-
-To generate the test document execute, for example:
-
-$ ./gen 633 test-100k.xml
+./driver -v -i 100 test-50k.xml
diff --git a/xsd-examples/cxx/parser/performance/buildfile b/xsd-examples/cxx/parser/performance/buildfile
index 10111d6..1d0edd7 100644
--- a/xsd-examples/cxx/parser/performance/buildfile
+++ b/xsd-examples/cxx/parser/performance/buildfile
@@ -33,9 +33,7 @@ for p: 'xerces' 'expat'
parser = $p
}
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -$parser-pskel \
--xml-parser $parser \
diff --git a/xsd-examples/cxx/parser/polymorphism/README b/xsd-examples/cxx/parser/polymorphism/README
index 60a97e9..a25464e 100644
--- a/xsd-examples/cxx/parser/polymorphism/README
+++ b/xsd-examples/cxx/parser/polymorphism/README
@@ -13,7 +13,15 @@ supermen.xml
supermen-pskel.hxx
supermen-pskel.cxx
- Parser skeletons generated by the XSD compiler from supermen.xsd.
+ Parser skeletons generated by the XSD compiler from supermen.xsd using
+ the following command line:
+
+ xsd cxx-parser --generate-polymorphic supermen.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --generate-polymorphic supermen.xsd
+
Note the use of the --generate-polymorphic command line option.
supermen-pimpl.hxx
@@ -25,6 +33,18 @@ driver.cxx
all the individual parsers found in supermen-pimpl.hxx. It then invokes
this parser instance to parse the input file.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c supermen-pskel.cxx
+c++ -c supermen-pimpl.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o supermen-pskel.o supermen-pimpl.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o supermen-pskel.o supermen-pimpl.o -lexpat
+
+To run the example on the sample XML instance document execute:
-$ ./driver supermen.xml
+./driver supermen.xml
diff --git a/xsd-examples/cxx/parser/polymorphism/buildfile b/xsd-examples/cxx/parser/polymorphism/buildfile
index de088cf..2fad7dd 100644
--- a/xsd-examples/cxx/parser/polymorphism/buildfile
+++ b/xsd-examples/cxx/parser/polymorphism/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{supermen}: test.input = true
<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--generate-polymorphic \
diff --git a/xsd-examples/cxx/parser/polyroot/README b/xsd-examples/cxx/parser/polyroot/README
index f41b91c..b431417 100644
--- a/xsd-examples/cxx/parser/polyroot/README
+++ b/xsd-examples/cxx/parser/polyroot/README
@@ -14,7 +14,15 @@ batman.xml
supermen-pskel.hxx
supermen-pskel.cxx
- Parser skeletons generated by the XSD compiler from supermen.xsd.
+ Parser skeletons generated by the XSD compiler from supermen.xsd using
+ the following command line:
+
+ xsd cxx-parser --generate-polymorphic supermen.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --generate-polymorphic supermen.xsd
+
Note the use of the --generate-polymorphic command line option.
supermen-pimpl.hxx
@@ -29,8 +37,20 @@ driver.cxx
found in supermen-pimpl.hxx. In then invokes this parser instance
to parse the input file.
-To run the example on the sample XML instance documents simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c supermen-pskel.cxx
+c++ -c supermen-pimpl.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o supermen-pskel.o supermen-pimpl.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o supermen-pskel.o supermen-pimpl.o -lexpat
+
+To run the example on the sample XML instance documents execute:
-$ ./driver person.xml
-$ ./driver superman.xml
-$ ./driver batman.xml
+./driver person.xml
+./driver superman.xml
+./driver batman.xml
diff --git a/xsd-examples/cxx/parser/polyroot/buildfile b/xsd-examples/cxx/parser/polyroot/buildfile
index 6ae0fdc..c1943d4 100644
--- a/xsd-examples/cxx/parser/polyroot/buildfile
+++ b/xsd-examples/cxx/parser/polyroot/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -supermen-pskel} {hxx ixx cxx}{supermen-pskel} $libs \
<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--generate-polymorphic \
diff --git a/xsd-examples/cxx/parser/wildcard/README b/xsd-examples/cxx/parser/wildcard/README
index 89f9aa9..181a2d8 100644
--- a/xsd-examples/cxx/parser/wildcard/README
+++ b/xsd-examples/cxx/parser/wildcard/README
@@ -11,7 +11,14 @@ email.xml
email-pskel.hxx
email-pskel.cxx
- Parser skeletons generated by XSD from email.xsd.
+ Parser skeletons generated by the XSD compiler from email.xsd using the
+ following command line:
+
+ xsd cxx-parser email.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat email.xsd
driver.cxx
Parser implementations and a driver for the example. The
@@ -22,6 +29,17 @@ driver.cxx
In then invokes the parser instances to parse the input
file.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c email-pskel.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o email-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o email-pskel.o -lexpat
+
+To run the example on the sample XML instance document execute:
-$ ./driver email.xml
+./driver email.xml
diff --git a/xsd-examples/cxx/parser/wildcard/buildfile b/xsd-examples/cxx/parser/wildcard/buildfile
index 93e2dc8..5866f38 100644
--- a/xsd-examples/cxx/parser/wildcard/buildfile
+++ b/xsd-examples/cxx/parser/wildcard/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{email}: test.input = true
<{hxx ixx cxx}{email-pskel}>: xsd{email} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-examples/cxx/tree/binary/boost/README b/xsd-examples/cxx/tree/binary/boost/README
index 6cdd2dd..4f5ae9a 100644
--- a/xsd-examples/cxx/tree/binary/boost/README
+++ b/xsd-examples/cxx/tree/binary/boost/README
@@ -28,13 +28,22 @@ library-prologue.hxx
library.hxx
library.cxx
C++ types that represent the given vocabulary as well as Boost
- archive insertion and extraction operations. These are generated
- by the XSD compiler from library.xsd. The --hxx-prologue-file
- option is used to insert the contents of the library-prologue.hxx
- file into the generated header file. The --generate-insertion and
- --generate-extraction options are used to generate the insertion
- and extraction operations for text_oarchive and text_iarchive
- types.
+ archive insertion and extraction operations.
+
+ These files are generated by the XSD compiler from library.xsd
+ using the following command line:
+
+ xsd cxx-tree --generate-ostream \
+ --hxx-prologue-file=library-prologue.hxx \
+ --generate-insertion 'boost::archive::text_oarchive' \
+ --generate-extraction 'boost::archive::text_iarchive' \
+ library.xsd
+
+ The --hxx-prologue-file option is used to insert the contents of
+ the library-prologue.hxx file into the generated header file. The
+ --generate-insertion and --generate-extraction options are used to
+ generate the insertion and extraction operations for text_oarchive
+ and text_iarchive types.
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -44,6 +53,16 @@ driver.cxx
representation as well as the content of the object model before
saving it to text_oarchive and after loading it from text_iarchive.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c library.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o -lboost_serialization -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/tree/binary/boost/buildfile b/xsd-examples/cxx/tree/binary/boost/buildfile
index 4306273..17e67fb 100644
--- a/xsd-examples/cxx/tree/binary/boost/buildfile
+++ b/xsd-examples/cxx/tree/binary/boost/buildfile
@@ -13,9 +13,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} hxx{library-prologue} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--hxx-prologue-file $path($<[1]) \
diff --git a/xsd-examples/cxx/tree/binary/cdr/README b/xsd-examples/cxx/tree/binary/cdr/README
index 914d27c..5e3b7ba 100644
--- a/xsd-examples/cxx/tree/binary/cdr/README
+++ b/xsd-examples/cxx/tree/binary/cdr/README
@@ -17,11 +17,19 @@ library.xml
library.hxx
library.cxx
C++ types that represent the given vocabulary as well as data
- representation stream insertion and extraction operations. These
- are generated by XSD from library.xsd. Note that the
- --generate-insertion and --generate-extraction options are used
- to generate the insertion and extraction operations for ACE CDR
- stream.
+ representation stream insertion and extraction operations.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-ostream \
+ --generate-insertion 'ACE_OutputCDR' \
+ --generate-extraction 'ACE_InputCDR' \
+ --generate-comparison library.xsd
+
+ Note that the --generate-insertion and --generate-extraction options
+ are used to generate the insertion and extraction operations for ACE
+ CDR stream.
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -31,6 +39,13 @@ driver.cxx
representation as well as the content of the object model before
saving it to the CDR stream and after loading it from the CDR stream.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c library.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o library.o -lACE -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/tree/binary/cdr/buildfile b/xsd-examples/cxx/tree/binary/cdr/buildfile
index d78a56a..ccff659 100644
--- a/xsd-examples/cxx/tree/binary/cdr/buildfile
+++ b/xsd-examples/cxx/tree/binary/cdr/buildfile
@@ -13,9 +13,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--generate-insertion 'ACE_OutputCDR' \
diff --git a/xsd-examples/cxx/tree/binary/xdr/README b/xsd-examples/cxx/tree/binary/xdr/README
index e02b2b9..2096064 100644
--- a/xsd-examples/cxx/tree/binary/xdr/README
+++ b/xsd-examples/cxx/tree/binary/xdr/README
@@ -17,10 +17,16 @@ library.xml
library.hxx
library.cxx
C++ types that represent the given vocabulary as well as data
- representation stream insertion and extraction operations. These
- are generated by XSD from library.xsd. Note that the
- --generate-insertion and --generate-extraction options are used
- to generate the insertion and extraction operations for XDR
+ representation stream insertion and extraction operations.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-ostream --generate-comparison \
+ --generate-insertion 'XDR' --generate-extraction 'XDR' library.xsd
+
+ Note that the --generate-insertion and --generate-extraction options
+ are used to generate the insertion and extraction operations for XDR
stream.
driver.cxx
@@ -31,6 +37,13 @@ driver.cxx
it to the XDR representation and after loading it from the XDR
representation.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c library.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o library.o -ltirpc -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/tree/binary/xdr/buildfile b/xsd-examples/cxx/tree/binary/xdr/buildfile
index 92f0c48..0fbab13 100644
--- a/xsd-examples/cxx/tree/binary/xdr/buildfile
+++ b/xsd-examples/cxx/tree/binary/xdr/buildfile
@@ -15,9 +15,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--generate-insertion 'XDR' \
diff --git a/xsd-examples/cxx/tree/caching/README b/xsd-examples/cxx/tree/caching/README
index 64dffb3..1672d6f 100644
--- a/xsd-examples/cxx/tree/caching/README
+++ b/xsd-examples/cxx/tree/caching/README
@@ -14,7 +14,12 @@ library.hxx
library.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from library.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree library.xsd
driver.cxx
Driver for the example. It first sets up the Xerces-C++ DOM parser
@@ -24,6 +29,16 @@ driver.cxx
the object model from this DOM document. On each iteration the driver
prints a number of books in the object model to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c library.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml library.xsd
+./driver library.xml library.xsd
diff --git a/xsd-examples/cxx/tree/caching/buildfile b/xsd-examples/cxx/tree/caching/buildfile
index cb369b7..f1bcb10 100644
--- a/xsd-examples/cxx/tree/caching/buildfile
+++ b/xsd-examples/cxx/tree/caching/buildfile
@@ -12,9 +12,7 @@ exe{driver}: {xml xsd}{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-examples/cxx/tree/compression/README b/xsd-examples/cxx/tree/compression/README
index f163970..e2b7dd5 100644
--- a/xsd-examples/cxx/tree/compression/README
+++ b/xsd-examples/cxx/tree/compression/README
@@ -1,8 +1,8 @@
-This example shows how to compress an XML document during serialization
-and decompress it during parsing. The example uses the compression
+This example shows how to compress an XML document during serialization
+and decompress it during parsing. The example uses the compression
functionality provided by the zlib library[1] which needs to be installed
in order to build and run this example. It should also be fairly straight-
-forward to modify the code in this example to use other compression
+forward to modify the code in this example to use other compression
libraries.
[1] http://www.zlib.net
@@ -31,18 +31,36 @@ library.hxx
library.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from library.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-serialization --generate-ostream library.xsd
driver.cxx
- Driver for the example. It first creates the compressed_input_source
- object and passes it to one of the parsing functions that constructs
- the object model from the compressed input file. It then prints the
- content of the object model to STDERR. Finally, the driver creates the
+ Driver for the example. It first creates the compressed_input_source
+ object and passes it to one of the parsing functions that constructs
+ the object model from the compressed input file. It then prints the
+ content of the object model to STDERR. Finally, the driver creates the
compressed_format_target object and passes it to one of the serialization
functions which converts the object model back to the compressed XML.
-To run the example on the sample XML document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c library.cxx
+c++ -DXSD_CXX11 -c compressed-format-target.cxx
+c++ -DXSD_CXX11 -c compressed-input-source.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o compressed-format-target.o \
+ compressed-input-source.o -lz -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML document execute:
-$ ./driver library.xml.gz
+./driver library.xml.gz
The serialization output is written to the out.xml.gz file.
diff --git a/xsd-examples/cxx/tree/compression/buildfile b/xsd-examples/cxx/tree/compression/buildfile
index 6997339..99dd8a6 100644
--- a/xsd-examples/cxx/tree/compression/buildfile
+++ b/xsd-examples/cxx/tree/compression/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs testscript
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-examples/cxx/tree/custom/calendar/README b/xsd-examples/cxx/tree/custom/calendar/README
index f7f6989..a4297ba 100644
--- a/xsd-examples/cxx/tree/custom/calendar/README
+++ b/xsd-examples/cxx/tree/custom/calendar/README
@@ -16,17 +16,29 @@ calendar.xml
Sample XML instance document.
xml-schema.hxx
- C++ types for XML Schema built-in types. This header file is generated
- by XSD using the --generate-xml-schema option. The --custom-type option
- is also used to customize the xsd:date type.
+ C++ types for XML Schema built-in types.
+
+ This header file is generated by the XSD compiler in the
+ --generate-xml-schema mode using the following command line:
+
+ xsd cxx-tree --generate-xml-schema --custom-type date \
+ --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd
+
+ The --custom-type option is used to customize the xsd:date type.
calendar.hxx
calendar.ixx
calendar.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from calendar.xsd with the
- --extern-xml-schema option in order to include xml-schema.hxx.
+ object model.
+
+ These files are generated by the XSD compiler from calendar.xsd using the
+ following command line:
+
+ xsd cxx-tree --extern-xml-schema xml-schema.xsd calendar.xsd
+
+ The --extern-xml-schema option is used to include xml-schema.hxx.
xml-schema-custom.hxx
Header file which defines our own xml_schema::date class. It is
@@ -42,6 +54,17 @@ driver.cxx
that constructs the object model from the input file. It then prints
the calendar events to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c calendar.cxx
+c++ -DXSD_CXX11 -c xml-schema-custom.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o calendar.o xml-schema-custom.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver calendar.xml
+./driver calendar.xml
diff --git a/xsd-examples/cxx/tree/custom/calendar/buildfile b/xsd-examples/cxx/tree/custom/calendar/buildfile
index 3c26122..3309f6f 100644
--- a/xsd-examples/cxx/tree/custom/calendar/buildfile
+++ b/xsd-examples/cxx/tree/custom/calendar/buildfile
@@ -16,9 +16,7 @@ exe{driver}: xml{calendar}: test.input = true
<{hxx ixx cxx}{calendar}>: xsd{calendar} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--extern-xml-schema xml-schema.xsd \
--output-dir $out_base \
@@ -27,12 +25,12 @@ exe{driver}: xml{calendar}: test.input = true
hxx{xml-schema}: $xsd
{{
- diag xsd gen ($>[0])
+ diag xsd $>
# Note that the specified xml-schema.xsd doesn't exist and is only used to
# deduce the generated header name.
#
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-xml-schema \
--custom-type date \
--hxx-epilogue '#include "xml-schema-custom.hxx"' \
diff --git a/xsd-examples/cxx/tree/custom/comments/README b/xsd-examples/cxx/tree/custom/comments/README
index 8fd69d0..32412db 100644
--- a/xsd-examples/cxx/tree/custom/comments/README
+++ b/xsd-examples/cxx/tree/custom/comments/README
@@ -16,9 +16,17 @@ people.xml
Sample XML instance document.
xml-schema.hxx
- C++ types for XML Schema built-in types. This header file is generated
- by XSD using the --generate-xml-schema option. The --custom-type option
- is also used to customize the xsd:anyType type.
+ C++ types for XML Schema built-in types.
+
+ This header file is generated by by the XSD compiler in the
+ --generate-xml-schema mode using the following command line:
+
+ xsd cxx-tree --generate-xml-schema \
+ --generate-serialization \
+ --custom-type anyType=/type_base \
+ --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd
+
+ The --custom-type option is used to customize the xsd:anyType type.
people.hxx
people.ixx
@@ -26,9 +34,15 @@ people.cxx
C++ types that represent the person record vocabulary, a set of
parsing functions that convert XML instance documents to a tree-like
in-memory object model, and a set of serialization functions that
- convert the object model back to XML. These are generated by XSD
- from people.xsd with the --extern-xml-schema option in order to
- include xml-schema.hxx.
+ convert the object model back to XML.
+
+ These files are generated by the XSD compiler from people.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-serialization --extern-xml-schema xml-schema.xsd \
+ people.xsd
+
+ The --extern-xml-schema option in used to include xml-schema.hxx.
xml-schema-custom.hxx
Header file which defines our own xml_schema::type class. It is
@@ -52,6 +66,18 @@ driver.cxx
on this object model. Finally, it serializes the modified object
model back to XML, including XML comments.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c people.cxx
+c++ -DXSD_CXX11 -c xml-schema-custom.cxx
+c++ -DXSD_CXX11 -c dom-parse.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o people.o xml-schema-custom.o dom-parse.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver people.xml
+./driver people.xml
diff --git a/xsd-examples/cxx/tree/custom/comments/buildfile b/xsd-examples/cxx/tree/custom/comments/buildfile
index 093a6cc..6edf81a 100644
--- a/xsd-examples/cxx/tree/custom/comments/buildfile
+++ b/xsd-examples/cxx/tree/custom/comments/buildfile
@@ -15,9 +15,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd \
@@ -27,12 +25,12 @@ exe{driver}: xml{people}: test.input = true
hxx{xml-schema}: $xsd
{{
- diag xsd gen ($>[0])
+ diag xsd $>
# Note that the specified xml-schema.xsd doesn't exist and is only used to
# deduce the generated header name.
#
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-xml-schema \
--generate-serialization \
--custom-type anyType=/type_base \
diff --git a/xsd-examples/cxx/tree/custom/contacts/README b/xsd-examples/cxx/tree/custom/contacts/README
index 072ede3..b2f95eb 100644
--- a/xsd-examples/cxx/tree/custom/contacts/README
+++ b/xsd-examples/cxx/tree/custom/contacts/README
@@ -19,8 +19,15 @@ contacts.ixx
contacts.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from contacts.xsd with the
- --custom-type option in order to customize the contact type.
+ object model.
+
+ These files are generated by the XSD compiler from contacts.xsd using the
+ following command line:
+
+ xsd cxx-tree --custom-type contact=/contact_base \
+ --hxx-epilogue '#include "contacts-custom.hxx"' contacts.xsd
+
+ The --custom-type option is used to customize the contact type.
contacts-custom.hxx
Header file which defines our own contact class by inheriting from the
@@ -35,6 +42,14 @@ driver.cxx
that constructs the object model from the input file. It then prints
the contacts to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c contacts.cxx
+c++ -c contacts-custom.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o contacts.o contacts-custom.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver contacts.xml
+./driver contacts.xml
diff --git a/xsd-examples/cxx/tree/custom/contacts/buildfile b/xsd-examples/cxx/tree/custom/contacts/buildfile
index 190306c..51e9c99 100644
--- a/xsd-examples/cxx/tree/custom/contacts/buildfile
+++ b/xsd-examples/cxx/tree/custom/contacts/buildfile
@@ -12,13 +12,11 @@ exe{driver}: xml{contacts}: test.input = true
<{hxx ixx cxx}{contacts}>: xsd{contacts} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
- --generate-inline \
- --custom-type contact=/contact_base \
- --hxx-epilogue '#include "contacts-custom.hxx"' \
- --output-dir $out_base \
+ $xsd cxx-tree \
+ --generate-inline \
+ --custom-type contact=/contact_base \
+ --hxx-epilogue '#include "contacts-custom.hxx"' \
+ --output-dir $out_base \
$path($<[0])
}}
diff --git a/xsd-examples/cxx/tree/custom/double/README b/xsd-examples/cxx/tree/custom/double/README
index 15348d2..bf95104 100644
--- a/xsd-examples/cxx/tree/custom/double/README
+++ b/xsd-examples/cxx/tree/custom/double/README
@@ -8,7 +8,7 @@ http://wiki.codesynthesis.com/Tree/Customization_guide
In this example our schema uses xsd:double to represent a price. There are
two potential problems with this choice of a price type. First, xsd:double
can be serialized in the scientific notation which would be an unusual way
-of representing a price. Second, we would like to limit the number of
+of representing a price. Second, we would like to limit the number of
fraction digits in our prices to 2. Furthermore, we would like to always
have two fraction digits, even if one or both of them are zeros, for
example: 12.99, 12.90, 12.00.
@@ -42,21 +42,45 @@ double-custom.cxx
file described below.
xml-schema.hxx
- C++ types for XML Schema built-in types. This header file is generated
- by the XSD compiler using the --generate-xml-schema option. The
- --custom-type option is used to customize the xsd:double type. The
- --hxx-epilogue option is used to include the double-custom.hxx file
- at the end of this file.
+ C++ types for XML Schema built-in types.
+
+ This header file is generated by the XSD compiler in the
+ --generate-xml-schema mode using the following command line:
+
+ xsd cxx-tree --generate-xml-schema --generate-serialization \
+ --custom-type double=double \
+ --hxx-epilogue '#include "double-custom.hxx"' xml-schema.xsd
+
+ The --custom-type option is used to customize the xsd:double type. The
+ --hxx-epilogue option is used to include the double-custom.hxx file at
+ the end of this file.
order.hxx
order.cxx
- C++ types generated from order.xsd. The --extern-xml-schema option
- is used to include xml-schema.hxx into order.hxx.
+ C++ types are generated by the XSD compiler from order.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-serialization --extern-xml-schema xml-schema.xsd \
+ order.xsd
+
+ The --extern-xml-schema option is used to include xml-schema.hxx into
+ order.hxx.
driver.cxx
Test driver for the example. It creates a sample order and then
writes it to XML to test the custom xsd:double serialization code.
-To run the example simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c order.cxx
+c++ -DXSD_CXX11 -c double-custom.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o order.o double-custom.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example execute:
-$ ./driver
+./driver
diff --git a/xsd-examples/cxx/tree/custom/double/buildfile b/xsd-examples/cxx/tree/custom/double/buildfile
index 258191a..0c33afe 100644
--- a/xsd-examples/cxx/tree/custom/double/buildfile
+++ b/xsd-examples/cxx/tree/custom/double/buildfile
@@ -13,9 +13,7 @@ exe{driver}: {hxx cxx}{* -order -xml-schema} \
<{hxx ixx cxx}{order}>: xsd{order} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd \
@@ -25,12 +23,12 @@ exe{driver}: {hxx cxx}{* -order -xml-schema} \
hxx{xml-schema}: $xsd
{{
- diag xsd gen ($>[0])
+ diag xsd $>
# Note that the specified xml-schema.xsd doesn't exist and is only used to
# deduce the generated header name.
#
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-xml-schema \
--generate-serialization \
--custom-type double=double \
diff --git a/xsd-examples/cxx/tree/custom/mixed/README b/xsd-examples/cxx/tree/custom/mixed/README
index 7b56812..8f7bd13 100644
--- a/xsd-examples/cxx/tree/custom/mixed/README
+++ b/xsd-examples/cxx/tree/custom/mixed/README
@@ -1,6 +1,6 @@
This example shows how to use type customization to parse and serialize
-mixed content. The example achieves this by customizing the type with
-the mixed content model to include a DOM document that stores the data
+mixed content. The example achieves this by customizing the type with
+the mixed content model to include a DOM document that stores the data
as a raw XML representation. The customized type also provides its own
parsing constructor and serialization operator where the mixed content
is extracted from and inserted back to DOM, respectively. The use of
@@ -28,8 +28,15 @@ people.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML instance documents to a tree-like in-memory
object model, and a set of serialization functions that convert the
- object model back to XML. These are generated by XSD from people.xsd
- with the --custom-type option in order to customize the bio type.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from people.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-serialization --custom-type bio=/bio_base \
+ --hxx-epilogue '#include "people-custom.hxx"' people.xsd
+
+ The --custom-type option is used to customize the bio type.
people-custom.hxx
Header file which defines our own bio class by inheriting from the
@@ -45,6 +52,17 @@ driver.cxx
the data to STDERR, including the bio information converted to text.
Finally, the driver serializes the object model back to XML.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c people.cxx
+c++ -DXSD_CXX11 -c people-custom.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o people.o people-custom.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver people.xml
+./driver people.xml
diff --git a/xsd-examples/cxx/tree/custom/mixed/buildfile b/xsd-examples/cxx/tree/custom/mixed/buildfile
index 9da936e..e5919fe 100644
--- a/xsd-examples/cxx/tree/custom/mixed/buildfile
+++ b/xsd-examples/cxx/tree/custom/mixed/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--custom-type bio=/bio_base \
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/README b/xsd-examples/cxx/tree/custom/taxonomy/README
index c2e425a..3296508 100644
--- a/xsd-examples/cxx/tree/custom/taxonomy/README
+++ b/xsd-examples/cxx/tree/custom/taxonomy/README
@@ -20,12 +20,24 @@ people.ixx
people.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from people.xsd with the
- --custom-type option in order to customize the person, superman, and
+ object model.
+
+ These files are generated by the XSD compiler from people.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-forward --generate-polymorphic \
+ --polymorphic-type person \
+ --custom-type "person=person_impl<person_base>/person_base" \
+ --custom-type "superman=superman_impl<superman_base>/superman_base" \
+ --custom-type "batman=batman_impl<batman_base>/batman_base" \
+ --fwd-prologue '#include "people-custom-fwd.hxx"' \
+ --hxx-prologue '#include "people-custom.hxx"' people.xsd
+
+ The --custom-type option is used to customize the person, superman, and
batman types. Generation of the people-fwd.hxx forward declaration
- file is requested with the --generate-forward option. Note also that
- we use the --generate-polymorphic command line option as well as
- --polymorphic-type to mark the type hierarchy starting with the
+ file is requested with the --generate-forward option. Note also that
+ we use the --generate-polymorphic command line option as well as
+ --polymorphic-type to mark the type hierarchy starting with the
person type as polymorphic.
people-custom-fwd.hxx
@@ -48,6 +60,14 @@ driver.cxx
that constructs the object model from the input file. It then prints
the database to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c people.cxx
+c++ -c people-custom.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o people.o people-custom.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver people.xml
+./driver people.xml
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/buildfile b/xsd-examples/cxx/tree/custom/taxonomy/buildfile
index 9267c68..4068daa 100644
--- a/xsd-examples/cxx/tree/custom/taxonomy/buildfile
+++ b/xsd-examples/cxx/tree/custom/taxonomy/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people} hxx{people-fwd}>: xsd{people} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-forward \
--generate-polymorphic \
diff --git a/xsd-examples/cxx/tree/custom/wildcard/README b/xsd-examples/cxx/tree/custom/wildcard/README
index 70eaea4..8b5b2f0 100644
--- a/xsd-examples/cxx/tree/custom/wildcard/README
+++ b/xsd-examples/cxx/tree/custom/wildcard/README
@@ -23,8 +23,16 @@ wildcard.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML instance documents to a tree-like in-memory
object model, and a set of serialization functions that convert the
- object model back to XML. These are generated by XSD from wildcard.xsd
- with the --custom-type option in order to customize the data type.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from wildcard.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-serialization --generate-ostream \
+ --custom-type data=/data_base \
+ --hxx-epilogue '#include "wildcard-custom.hxx"' wildcard.xsd
+
+ The --custom-type option is used to customize the data type.
wildcard-custom.hxx
Header file which defines our own data class by inheriting from the
@@ -40,6 +48,14 @@ driver.cxx
the data to STDERR, including the extra attribute. Finally, the driver
serializes the object model back to XML.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c wildcard.cxx
+c++ -c wildcard-custom.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o wildcard.o wildcard-custom.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver wildcard.xml
+./driver wildcard.xml
diff --git a/xsd-examples/cxx/tree/custom/wildcard/buildfile b/xsd-examples/cxx/tree/custom/wildcard/buildfile
index e386709..1bb5a8f 100644
--- a/xsd-examples/cxx/tree/custom/wildcard/buildfile
+++ b/xsd-examples/cxx/tree/custom/wildcard/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{wildcard}: test.input = true
<{hxx ixx cxx}{wildcard}>: xsd{wildcard} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-examples/cxx/tree/embedded/README b/xsd-examples/cxx/tree/embedded/README
index 266a8ff..f1946bf 100644
--- a/xsd-examples/cxx/tree/embedded/README
+++ b/xsd-examples/cxx/tree/embedded/README
@@ -1,5 +1,5 @@
This example shows how to embed the binary representation of the schema
-grammar into an application and then use it with the C++/Tree mapping to
+grammar into an application and then use it with the C++/Tree mapping to
parse and validate XML documents. This example is similar to the 'caching'
example except that it loads the binary representation of the schemas
embedded into the application instead of pre-parsing external schema files.
@@ -8,10 +8,16 @@ The example consists of the following files:
xsdbin.cxx
Tool for converting one or more XML Schema files to the compressed binary
- representation. The output is written as a pair of C++ source files
+ representation. The output is written as a pair of C++ source files
containing the array with the binary data. Use the --help option to see
the tool's usage information.
+ To compile and link this tool we can use the following commands (replace
+ 'c++' with your C++ compiler name):
+
+ c++ -c xsdbin.cxx
+ c++ -o xsdbin xsdbin.o -lxerces-c
+
library.xsd
XML Schema which describes a library of books.
@@ -22,16 +28,25 @@ library.hxx
library.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by the XSD compiler from library.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree library.xsd
library-schema.hxx
library-schema.cxx
- Binary representation of the library.xsd schema. These files are generated
- by the xsdbin tool.
+ Binary representation of the library.xsd schema.
+
+ These files are generated by the xsdbin tool from library.xsd using the
+ following command line:
+
+ ./xsdbin library.xsd
grammar-input-stream.hxx
grammar-input-stream.cxx
- Input stream implementation with the special-purpose schema grammar
+ Input stream implementation with the special-purpose schema grammar
decompression algorithm. It is used to load the binary schema representation
produced by the xsdbin tool.
@@ -43,6 +58,19 @@ driver.cxx
model from this DOM document. On each iteration the driver prints a number
of books in the object model to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c library.cxx
+c++ -DXSD_CXX11 -c library-schema.cxx
+c++ -DXSD_CXX11 -c grammar-input-stream.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o library-schema.o grammar-input-stream.o \
+ -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
diff --git a/xsd-examples/cxx/tree/embedded/buildfile b/xsd-examples/cxx/tree/embedded/buildfile
index c8e7808..20b7207 100644
--- a/xsd-examples/cxx/tree/embedded/buildfile
+++ b/xsd-examples/cxx/tree/embedded/buildfile
@@ -17,9 +17,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
@@ -27,7 +25,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx cxx}{library-schema}>: xsd{library} exe{xsdbin}
{{
- diag xsdbin ($<[0]) # @@ TMP
+ diag xsdbin ($<[0]) -> $>
($<[1]) --output-dir $out_base $path($<[0])
}}
diff --git a/xsd-examples/cxx/tree/hello/README b/xsd-examples/cxx/tree/hello/README
index bb98584..989d6da 100644
--- a/xsd-examples/cxx/tree/hello/README
+++ b/xsd-examples/cxx/tree/hello/README
@@ -14,13 +14,25 @@ hello.hxx
hello.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from hello.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from hello.xsd using the
+ following command line:
+
+ xsd cxx-tree hello.xsd
driver.cxx
Driver for the example. It first calls one of the parsing functions
that constructs the object model from the input file. It then prints
the content of the object model to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c hello.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o hello.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver hello.xml
+./driver hello.xml
diff --git a/xsd-examples/cxx/tree/hello/buildfile b/xsd-examples/cxx/tree/hello/buildfile
index 241d6f1..1cd17ac 100644
--- a/xsd-examples/cxx/tree/hello/buildfile
+++ b/xsd-examples/cxx/tree/hello/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{hello}: test.input = true
<{hxx ixx cxx}{hello}>: xsd{hello} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-examples/cxx/tree/library/README b/xsd-examples/cxx/tree/library/README
index 0b8638c..bd4fb90 100644
--- a/xsd-examples/cxx/tree/library/README
+++ b/xsd-examples/cxx/tree/library/README
@@ -16,7 +16,12 @@ library.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML documents to a tree-like in-memory object
model, and a set of serialization functions that convert the object
- model back to XML. These are generated by XSD from library.xsd.
+ model back to XML.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-ostream --generate-serialization library.xsd
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -24,9 +29,16 @@ driver.cxx
the content of the object model to STDERR. Finally, the driver modifies
the object model and serializes it back to XML.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c library.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o library.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
This example also shows how to use the ID/IDREF cross-referencing
mechanism and the xsd:enumeration to C++ enum mapping.
diff --git a/xsd-examples/cxx/tree/library/buildfile b/xsd-examples/cxx/tree/library/buildfile
index 4ab023b..03745fb 100644
--- a/xsd-examples/cxx/tree/library/buildfile
+++ b/xsd-examples/cxx/tree/library/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--generate-serialization \
diff --git a/xsd-examples/cxx/tree/messaging/README b/xsd-examples/cxx/tree/messaging/README
index 435a4cf..d3d92c6 100644
--- a/xsd-examples/cxx/tree/messaging/README
+++ b/xsd-examples/cxx/tree/messaging/README
@@ -19,12 +19,18 @@ deposit.xml
protocol.hxx
protocol.cxx
- C++ types that represent the given vocabulary. These are
- generated by the XSD compiler from protocol.xsd. Generation of
- element types instead of parsing and serialization functions is
- requested with the --generate-element-type option. Generation of
- the element map is requested with the --generate-element-map
- option.
+ C++ types that represent the given vocabulary.
+
+ These files are generated by the XSD compiler from protocol.xsd using
+ the following command line:
+
+ xsd cxx-tree --root-element-all --generate-element-type \
+ --generate-element-map --generate-serialization protocol.xsd
+
+ Generation of element types instead of parsing and serialization
+ functions is requested with the --generate-element-type option.
+ Generation of the element map is requested with the
+ --generate-element-map option.
dom-parse.hxx
dom-parse.cxx
@@ -49,10 +55,21 @@ driver.cxx
driver serializes the opaque response object to a DOM document
using the element map and then serializes this DOM document to
STDOUT using the above-mentioned serialize() function.
-
-To run the example on the sample XML request documents simply
-execute:
-$ ./driver balance.xml
-$ ./driver withdraw.xml
-$ ./driver deposit.xml
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c protocol.cxx
+c++ -DXSD_CXX11 -c dom-parse.cxx
+c++ -DXSD_CXX11 -c dom-serialize.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o protocol.o dom-parse.o dom-serialize.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML request documents execute:
+
+./driver balance.xml
+./driver withdraw.xml
+./driver deposit.xml
diff --git a/xsd-examples/cxx/tree/messaging/buildfile b/xsd-examples/cxx/tree/messaging/buildfile
index 62fadda..7be8caf 100644
--- a/xsd-examples/cxx/tree/messaging/buildfile
+++ b/xsd-examples/cxx/tree/messaging/buildfile
@@ -10,9 +10,7 @@ exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--root-element-all \
--generate-element-type \
diff --git a/xsd-examples/cxx/tree/mixed/README b/xsd-examples/cxx/tree/mixed/README
index fc23faa..49ec809 100644
--- a/xsd-examples/cxx/tree/mixed/README
+++ b/xsd-examples/cxx/tree/mixed/README
@@ -32,7 +32,12 @@ text.hxx
text.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from text.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from text.xsd using the
+ following command line:
+
+ xsd cxx-tree text.xsd
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -40,6 +45,16 @@ driver.cxx
both the underlying DOM and statically-typed mapping to perform the
transformation.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c text.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o text.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver text.xml
+./driver text.xml
diff --git a/xsd-examples/cxx/tree/mixed/buildfile b/xsd-examples/cxx/tree/mixed/buildfile
index 4c1be8e..c91021a 100644
--- a/xsd-examples/cxx/tree/mixed/buildfile
+++ b/xsd-examples/cxx/tree/mixed/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text}>: xsd{text} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-examples/cxx/tree/multiroot/README b/xsd-examples/cxx/tree/multiroot/README
index b742422..81c6b26 100644
--- a/xsd-examples/cxx/tree/multiroot/README
+++ b/xsd-examples/cxx/tree/multiroot/README
@@ -20,8 +20,12 @@ protocol.hxx
protocol.cxx
C++ types that represent the given vocabulary and a set of
parsing functions that convert XML documents to a tree-like
- in-memory object model. These are generated by XSD from
- protocol.xsd.
+ in-memory object model.
+
+ These files are generated by the XSD compiler from protocol.xsd using
+ the following command line:
+
+ xsd cxx-tree --root-element-all protocol.xsd
dom-parse.hxx
dom-parse.cxx
@@ -37,9 +41,19 @@ driver.cxx
This example intentionally does not support the deposit request
to show how to handle unknown documents.
-To run the example on the sample XML request documents simply
-execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c protocol.cxx
+c++ -DXSD_CXX11 -c dom-parse.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o protocol.o dom-parse.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML request documents execute:
-$ ./driver balance.xml
-$ ./driver withdraw.xml
-$ ./driver deposit.xml
+./driver balance.xml
+./driver withdraw.xml
+./driver deposit.xml
diff --git a/xsd-examples/cxx/tree/multiroot/buildfile b/xsd-examples/cxx/tree/multiroot/buildfile
index dc10588..55ddb0d 100644
--- a/xsd-examples/cxx/tree/multiroot/buildfile
+++ b/xsd-examples/cxx/tree/multiroot/buildfile
@@ -10,9 +10,7 @@ exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--root-element-all \
--output-dir $out_base \
diff --git a/xsd-examples/cxx/tree/order/element/README b/xsd-examples/cxx/tree/order/element/README
index 19f2381..bd6d0c9 100644
--- a/xsd-examples/cxx/tree/order/element/README
+++ b/xsd-examples/cxx/tree/order/element/README
@@ -8,18 +8,24 @@ transactions.xsd
transactions can contain any number of different transactions in
any order but the order of transaction in the batch is significant.
-library.xml
+transactions.xml
Sample XML instance document.
transactions.hxx
transactions.cxx
C++ types that represent the given vocabulary as well as a set of
- parsing and serialization functions. These are generated by XSD
- from transactions.xsd. Note that the --ordered-type option is
- used to indicate to the XSD compiler that the batch type is
- ordered. We also use the --generate-wildcard option to enable
- wildcard support. An element wildcard is used in the batch to
- allow transaction extensions.
+ parsing and serialization functions.
+
+ These files are generated by the XSD compiler from transactions.xsd
+ using the following command line:
+
+ xsd cxx-tree --generate-serialization --generate-wildcard \
+ --ordered-type batch transactions.xsd
+
+ Note that the --ordered-type option is used to indicate to the XSD
+ compiler that the batch type is ordered. We also use the
+ --generate-wildcard option to enable wildcard support. An element
+ wildcard is used in the batch to allow transaction extensions.
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -30,6 +36,16 @@ driver.cxx
Finally, it saves the modified transaction batch back to XML to
verify that the content order is preserved in the output document.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c transactions.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o transactions.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver transactions.xml
+./driver transactions.xml
diff --git a/xsd-examples/cxx/tree/order/element/buildfile b/xsd-examples/cxx/tree/order/element/buildfile
index eb3834e..6e56a60 100644
--- a/xsd-examples/cxx/tree/order/element/buildfile
+++ b/xsd-examples/cxx/tree/order/element/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{transactions}: test.input = true
<{hxx ixx cxx}{transactions}>: xsd{transactions} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-wildcard \
diff --git a/xsd-examples/cxx/tree/order/mixed/README b/xsd-examples/cxx/tree/order/mixed/README
index e66c1ad..bc209f6 100644
--- a/xsd-examples/cxx/tree/order/mixed/README
+++ b/xsd-examples/cxx/tree/order/mixed/README
@@ -25,10 +25,16 @@ text.xml
text.hxx
text.cxx
C++ types that represent the given vocabulary as well as a set of
- parsing and serialization functions. These are generated by XSD
- from text.xsd. Note that the --ordered-type-mixed option is used
- to indicate to the XSD compiler that all types with mixed content
- should be automatically treated as ordered.
+ parsing and serialization functions.
+
+ These files are generated by the XSD compiler from text.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-serialization --ordered-type-mixed text.xsd
+
+ Note that the --ordered-type-mixed option is used to indicate to the XSD
+ compiler that all types with mixed content should be automatically treated
+ as ordered.
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -40,6 +46,13 @@ driver.cxx
text back to XML to verify that the content order is preserved in
the output document.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c text.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o text.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver text.xml
+./driver text.xml
diff --git a/xsd-examples/cxx/tree/order/mixed/buildfile b/xsd-examples/cxx/tree/order/mixed/buildfile
index 149bca0..6bc21e2 100644
--- a/xsd-examples/cxx/tree/order/mixed/buildfile
+++ b/xsd-examples/cxx/tree/order/mixed/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text}>: xsd{text} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--ordered-type-mixed \
diff --git a/xsd-examples/cxx/tree/performance/README b/xsd-examples/cxx/tree/performance/README
index 0206387..65e3edd 100644
--- a/xsd-examples/cxx/tree/performance/README
+++ b/xsd-examples/cxx/tree/performance/README
@@ -13,6 +13,16 @@ test-50k.xml
gen.cxx
Program to generate a test document of desired size.
+ To compile and link this program we can use the following commands
+ (replace 'c++' with your C++ compiler name):
+
+ c++ -c gen.cxx
+ c++ -o gen gen.o
+
+ To generate the test document execute, for example:
+
+ ./gen 633 test-100k.xml
+
time.hxx
time.cxx
Class definition that represents time.
@@ -23,8 +33,12 @@ test.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML documents to a tree-like in-memory object
model, and a set of serialization functions that convert the object
- model back to XML. These are generated by the XSD compiler from
- test.xsd.
+ model back to XML.
+
+ These files are generated by the XSD compiler from test.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-serialization test.xsd
parsing.cxx
Parsing performance test. It first reads the entire document into
@@ -46,17 +60,26 @@ driver.cxx
It then initializes the Xerces-C++ runtime and calls the parsing
and serialization tests described above.
-To run the example on a test XML document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
-$ ./driver test-50k.xml
+c++ -DXSD_CXX11 -c test.cxx
+c++ -DXSD_CXX11 -c time.cxx
+c++ -DXSD_CXX11 -c parsing.cxx
+c++ -DXSD_CXX11 -c serialization.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o test.o time.o parsing.o serialization.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on a test XML document execute:
+
+./driver test-50k.xml
The -v option can be used to turn on validation in the underlying XML
parser (off by default). The -i option can be used to specify the
number of parsing and serialization iterations (1000 by default). For
example:
-$ ./driver -v -i 100 test-50k.xml
-
-To generate the test document execute, for example:
-
-$ ./gen 633 test-100k.xml
+./driver -v -i 100 test-50k.xml
diff --git a/xsd-examples/cxx/tree/performance/buildfile b/xsd-examples/cxx/tree/performance/buildfile
index e9faeef..7b28308 100644
--- a/xsd-examples/cxx/tree/performance/buildfile
+++ b/xsd-examples/cxx/tree/performance/buildfile
@@ -14,9 +14,7 @@ exe{driver}: xml{test-50k}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--output-dir $out_base \
diff --git a/xsd-examples/cxx/tree/polymorphism/README b/xsd-examples/cxx/tree/polymorphism/README
index 6e54e49..368ddd0 100644
--- a/xsd-examples/cxx/tree/polymorphism/README
+++ b/xsd-examples/cxx/tree/polymorphism/README
@@ -14,9 +14,16 @@ supermen.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML instance documents to a tree-like in-memory
object model, and a set of serialization functions that convert the
- object model back to XML. These are generated by XSD from supermen.xsd.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from supermen.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-polymorphic --generate-serialization \
+ --root-element-last supermen.xsd
+
Note also that we use the --generate-polymorphic command line option
- and that we don't need to use --polymorphic-type to explicitly mark
+ and that we don't need to use --polymorphic-type to explicitly mark
types as polymorphic because this is automatically deduced by the
XSD compiler from the substitution groups used in the supermen.xsd
schema.
@@ -27,6 +34,13 @@ driver.cxx
the content of the object model to STDERR. Finally, the driver serializes
the object model back to XML.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -c supermen.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o supermen.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver instance.xml
+./driver supermen.xml
diff --git a/xsd-examples/cxx/tree/polymorphism/buildfile b/xsd-examples/cxx/tree/polymorphism/buildfile
index 754c6c2..359d4d3 100644
--- a/xsd-examples/cxx/tree/polymorphism/buildfile
+++ b/xsd-examples/cxx/tree/polymorphism/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{supermen}: test.input = true
<{hxx ixx cxx}{supermen}>: xsd{supermen} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--generate-serialization \
diff --git a/xsd-examples/cxx/tree/secure/README b/xsd-examples/cxx/tree/secure/README
index 649f0a3..7fa6445 100644
--- a/xsd-examples/cxx/tree/secure/README
+++ b/xsd-examples/cxx/tree/secure/README
@@ -19,7 +19,12 @@ library.hxx
library.cxx
C++ types that represent the given vocabulary and a set of parsing
functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by the XSD compiler from library.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from library.xsd using the
+ following command line:
+
+ xsd cxx-tree library.xsd
secure-dom-parser.hxx
secure-dom-parser.cxx
@@ -33,9 +38,20 @@ driver.cxx
this DOM document. Finally, the driver prints a number of books in the
object model to STDERR.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c library.cxx
+c++ -DXSD_CXX11 -c secure-dom-parser.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o secure-dom-parser.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver library.xml
+./driver library.xml
To verify that DTD processing is disabled, uncomment a different DOCTYPE
version in the sample document.
diff --git a/xsd-examples/cxx/tree/secure/buildfile b/xsd-examples/cxx/tree/secure/buildfile
index b1ca71f..a86af57 100644
--- a/xsd-examples/cxx/tree/secure/buildfile
+++ b/xsd-examples/cxx/tree/secure/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-examples/cxx/tree/streaming/.gitignore b/xsd-examples/cxx/tree/streaming/.gitignore
index db4a6e9..d2232b3 100644
--- a/xsd-examples/cxx/tree/streaming/.gitignore
+++ b/xsd-examples/cxx/tree/streaming/.gitignore
@@ -1 +1,2 @@
position.?xx
+out.xml
diff --git a/xsd-examples/cxx/tree/streaming/README b/xsd-examples/cxx/tree/streaming/README
index 5a467e0..23d3a7f 100644
--- a/xsd-examples/cxx/tree/streaming/README
+++ b/xsd-examples/cxx/tree/streaming/README
@@ -18,8 +18,12 @@ position.xml
position.hxx
position.cxx
C++ types that represent the position vocabulary as well as parsing
- and serialization functions. These are generated by XSD from
- position.xsd.
+ and serialization functions.
+
+ These files are generated by the XSD compiler from position.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-serialization position.xsd
parser.hxx
parser.cxx
@@ -44,8 +48,22 @@ driver.cxx
It also serializes the object model fragments into a new XML document
(out.xml).
-To run the example simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c position.cxx
+c++ -DXSD_CXX11 -c parser.cxx
+c++ -DXSD_CXX11 -c serializer.cxx
+c++ -DXSD_CXX11 -c grammar-input-stream.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o position.o parser.o serializer.o \
+ grammar-input-stream.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver position.xml
+./driver position.xml
The serialization results are written to the out.xml file.
diff --git a/xsd-examples/cxx/tree/streaming/buildfile b/xsd-examples/cxx/tree/streaming/buildfile
index 8c34b17..8555257 100644
--- a/xsd-examples/cxx/tree/streaming/buildfile
+++ b/xsd-examples/cxx/tree/streaming/buildfile
@@ -10,9 +10,7 @@ exe{driver}: {hxx cxx}{* -position} {hxx ixx cxx}{position} $libs testscript
<{hxx ixx cxx}{position}>: xsd{position} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--output-dir $out_base \
diff --git a/xsd-examples/cxx/tree/wildcard/README b/xsd-examples/cxx/tree/wildcard/README
index d451509..8b89774 100644
--- a/xsd-examples/cxx/tree/wildcard/README
+++ b/xsd-examples/cxx/tree/wildcard/README
@@ -19,7 +19,14 @@ email.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML instance documents to a tree-like in-memory
object model, and a set of serialization functions that convert the
- object model back to XML. These are generated by XSD from email.xsd.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from email.xsd using the
+ following command line:
+
+ xsd cxx-tree --generate-wildcard --generate-serialization \
+ --root-element message email.xsd
+
Note that the --generate-wildcard option is used to request the
wildcard mapping.
@@ -29,6 +36,16 @@ driver.cxx
the content of the object model to STDERR. Next the driver creates a
reply email which is then serialized to XML.
-To run the example on the sample XML instance document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c email.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o email.o -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML instance document execute:
-$ ./driver email.xml
+./driver email.xml
diff --git a/xsd-examples/cxx/tree/wildcard/buildfile b/xsd-examples/cxx/tree/wildcard/buildfile
index 5bc63c5..dc158f4 100644
--- a/xsd-examples/cxx/tree/wildcard/buildfile
+++ b/xsd-examples/cxx/tree/wildcard/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{email}: test.input = true
<{hxx ixx cxx}{email}>: xsd{email} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-wildcard \
--generate-serialization \
diff --git a/xsd-examples/cxx/tree/xpath/README b/xsd-examples/cxx/tree/xpath/README
index 1187743..39f9c09 100644
--- a/xsd-examples/cxx/tree/xpath/README
+++ b/xsd-examples/cxx/tree/xpath/README
@@ -22,7 +22,12 @@ people.hxx
people.cxx
C++ types that represent the person record vocabulary and a set of
parsing functions that convert XML instance documents to a tree-like
- in-memory object model. These are generated by XSD from people.xsd.
+ in-memory object model.
+
+ These files are generated by the XSD compiler from people.xsd using
+ the following command line:
+
+ xsd cxx-tree people.xsd
dom-parse.hxx
dom-parse.cxx
@@ -38,6 +43,17 @@ driver.cxx
the result by getting back from the returned DOM nodes to object
model nodes.
-To run the example on the sample XML document simply execute:
+To compile and link the example manually from the command line we can use
+the following commands (replace 'c++' with your C++ compiler name):
+
+c++ -DXSD_CXX11 -c people.cxx
+c++ -DXSD_CXX11 -c dom-parse.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o people.o dom-parse.o -lxqilla -lxerces-c
+
+Note that we need to define the XSD_CXX11 preprocessor macro since the
+source code includes libxsd headers directly.
+
+To run the example on the sample XML document execute:
-$ ./driver people.xml
+./driver people.xml
diff --git a/xsd-examples/cxx/tree/xpath/buildfile b/xsd-examples/cxx/tree/xpath/buildfile
index c6f090a..4f49599 100644
--- a/xsd-examples/cxx/tree/xpath/buildfile
+++ b/xsd-examples/cxx/tree/xpath/buildfile
@@ -13,9 +13,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-examples/manifest b/xsd-examples/manifest
index fc949c2..438b347 100644
--- a/xsd-examples/manifest
+++ b/xsd-examples/manifest
@@ -1,16 +1,18 @@
: 1
name: xsd-examples
-version: 4.2.0-b.2.z
+version: 4.2.1-a.0.z
project: xsd
+type: examples
+language: c++
summary: XML Schema to C++ data binding compiler examples
license: Unlicence
-description-file: README
-url: https://www.codesynthesis.com/projects/xsd/
-doc-url: https://www.codesynthesis.com/projects/xsd/
-src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-examples/
+description-file: README.md
+url: https://www.codesynthesis.com/products/xsd/
+doc-url: https://www.codesynthesis.com/products/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0
-depends: * bpkg >= 0.14.0
+depends: * build2 >= 0.16.0
+depends: * bpkg >= 0.16.0
depends: libxsd == $
depends: libxerces-c ^3.0.0
depends: libexpat ^2.1.0
diff --git a/xsd-tests/.gitignore b/xsd-tests/.gitignore
index d87c74c..2d3e43c 100644
--- a/xsd-tests/.gitignore
+++ b/xsd-tests/.gitignore
@@ -3,10 +3,16 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
+*.dylib
*.dll
*.a
*.lib
diff --git a/xsd-tests/README b/xsd-tests/README
deleted file mode 100644
index 1b529ab..0000000
--- a/xsd-tests/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This package contains tests for the XSD to C++ data binding compiler.
-
-See the LICENSE file for distribution conditions.
-
-The project page is at https://www.codesynthesis.com/projects/xsd/.
-
-Send bug reports or any other feedback to the xsd-users@codesynthesis.com
-mailing list.
diff --git a/xsd-tests/README.md b/xsd-tests/README.md
new file mode 100644
index 0000000..409c447
--- /dev/null
+++ b/xsd-tests/README.md
@@ -0,0 +1,4 @@
+# xsd-tests - tests for XSD compiler
+
+This package contains tests for `xsd`, the XML Schema to C++ data binding
+compiler.
diff --git a/xsd-tests/build/root.build b/xsd-tests/build/root.build
index 63c3bb4..258d4eb 100644
--- a/xsd-tests/build/root.build
+++ b/xsd-tests/build/root.build
@@ -1,15 +1,6 @@
# file : build/root.build
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-define xsd: file
-xsd{*}: extension = xsd
-
-define xml: file
-xml{*}: extension = xml
-
-define map: file
-map{*}: extension = map
-
using in
cxx.std = latest
@@ -21,20 +12,32 @@ ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx
-if ($cxx.target.system == 'win32-msvc')
- cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+if ($build.mode != 'skeleton')
+{
+ define xsd: file
+ xsd{*}: extension = xsd
+
+ define xml: file
+ xml{*}: extension = xml
+
+ define map: file
+ map{*}: extension = map
+
+ if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-if ($cxx.class == 'msvc')
- cxx.coptions += /wd4251 /wd4275 /wd4800
+ if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
-# Setup the xsd that we are testing.
-#
-import xsd = xsd%exe{xsd}
+ # Import xsd that we are testing.
+ #
+ import! [metadata] xsd = xsd%exe{xsd}
-# Every exe{} in this project is by default a test.
-#
-exe{*}: test = true
+ # Every exe{} in this project is by default a test.
+ #
+ exe{*}: test = true
-# Specify the test target for cross-testing.
-#
-test.target = $cxx.target
+ # Specify the test target for cross-testing.
+ #
+ test.target = $cxx.target
+}
diff --git a/xsd-tests/buildfile b/xsd-tests/buildfile
index e783791..7259a1f 100644
--- a/xsd-tests/buildfile
+++ b/xsd-tests/buildfile
@@ -1,4 +1,4 @@
# file : buildfile
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-./: {*/ -build/} doc{README} legal{GPLv2 LICENSE FLOSSE} manifest
+./: {*/ -build/} doc{README.md} legal{GPLv2 LICENSE FLOSSE} manifest
diff --git a/xsd-tests/clash/buildfile b/xsd-tests/clash/buildfile
index e99dccf..b87d6aa 100644
--- a/xsd-tests/clash/buildfile
+++ b/xsd-tests/clash/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/clash/driver.cxx b/xsd-tests/clash/driver.cxx
index 478e71a..c8fd0ed 100644
--- a/xsd-tests/clash/driver.cxx
+++ b/xsd-tests/clash/driver.cxx
@@ -4,6 +4,9 @@
#include "foo.hxx"
#include "clash.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/code/name-conflict/buildfile b/xsd-tests/code/name-conflict/buildfile
index 3a724f9..03051a5 100644
--- a/xsd-tests/code/name-conflict/buildfile
+++ b/xsd-tests/code/name-conflict/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/code/name-conflict/driver.cxx b/xsd-tests/code/name-conflict/driver.cxx
index a6eb4fe..55763df 100644
--- a/xsd-tests/code/name-conflict/driver.cxx
+++ b/xsd-tests/code/name-conflict/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/code/name-escaping/buildfile b/xsd-tests/code/name-escaping/buildfile
index c252afd..debfe58 100644
--- a/xsd-tests/code/name-escaping/buildfile
+++ b/xsd-tests/code/name-escaping/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/code/name-escaping/driver.cxx b/xsd-tests/code/name-escaping/driver.cxx
index 8d74030..dcfb967 100644
--- a/xsd-tests/code/name-escaping/driver.cxx
+++ b/xsd-tests/code/name-escaping/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/cxx/parser/built-in/buildfile b/xsd-tests/cxx/parser/built-in/buildfile
index 0522c9a..13ae128 100644
--- a/xsd-tests/cxx/parser/built-in/buildfile
+++ b/xsd-tests/cxx/parser/built-in/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/built-in/driver.cxx b/xsd-tests/cxx/parser/built-in/driver.cxx
index 008bc2d..aab2f19 100644
--- a/xsd-tests/cxx/parser/built-in/driver.cxx
+++ b/xsd-tests/cxx/parser/built-in/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/enumeration/buildfile b/xsd-tests/cxx/parser/enumeration/buildfile
index 05163df..fe5933a 100644
--- a/xsd-tests/cxx/parser/enumeration/buildfile
+++ b/xsd-tests/cxx/parser/enumeration/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} map{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/enumeration/driver.cxx b/xsd-tests/cxx/parser/enumeration/driver.cxx
index 4776ee2..d5488f7 100644
--- a/xsd-tests/cxx/parser/enumeration/driver.cxx
+++ b/xsd-tests/cxx/parser/enumeration/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xml_schema;
diff --git a/xsd-tests/cxx/parser/generated-impl/buildfile b/xsd-tests/cxx/parser/generated-impl/buildfile
index 8710a77..f6932f9 100644
--- a/xsd-tests/cxx/parser/generated-impl/buildfile
+++ b/xsd-tests/cxx/parser/generated-impl/buildfile
@@ -16,9 +16,7 @@ exe{driver}: file{output}: test.stdout = true
{hxx cxx}{test-pimpl} \
{ cxx}{test-driver}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--generate-print-impl \
diff --git a/xsd-tests/cxx/parser/list/buildfile b/xsd-tests/cxx/parser/list/buildfile
index 426101e..5f44a93 100644
--- a/xsd-tests/cxx/parser/list/buildfile
+++ b/xsd-tests/cxx/parser/list/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/list/driver.cxx b/xsd-tests/cxx/parser/list/driver.cxx
index 382da5b..42d3255 100644
--- a/xsd-tests/cxx/parser/list/driver.cxx
+++ b/xsd-tests/cxx/parser/list/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/name-clash/inheritance/buildfile b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
index 4bd7b48..d6065be 100644
--- a/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
index 9e9b905..cdb2b22 100644
--- a/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/buildfile b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
index 629645b..02b1b41 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
index 26793a0..4e7ffde 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
#include "test-pimpl.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
index 7c7f410..ba44859 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
@@ -5,6 +5,9 @@
#include "test-pimpl.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
namespace test
diff --git a/xsd-tests/cxx/parser/polymorphism/same-type/buildfile b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
index d98e917..4303002 100644
--- a/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
index 6da4a0a..cf0180b 100644
--- a/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/recursive/buildfile b/xsd-tests/cxx/parser/recursive/buildfile
index 237855c..395908e 100644
--- a/xsd-tests/cxx/parser/recursive/buildfile
+++ b/xsd-tests/cxx/parser/recursive/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/recursive/driver.cxx b/xsd-tests/cxx/parser/recursive/driver.cxx
index c93fd35..0877dfc 100644
--- a/xsd-tests/cxx/parser/recursive/driver.cxx
+++ b/xsd-tests/cxx/parser/recursive/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
struct sub_pimpl: sub_type_pskel
diff --git a/xsd-tests/cxx/parser/test-template/buildfile b/xsd-tests/cxx/parser/test-template/buildfile
index 9f7f5d3..aad21e7 100644
--- a/xsd-tests/cxx/parser/test-template/buildfile
+++ b/xsd-tests/cxx/parser/test-template/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/test-template/driver.cxx b/xsd-tests/cxx/parser/test-template/driver.cxx
index 333c6fd..74c8c99 100644
--- a/xsd-tests/cxx/parser/test-template/driver.cxx
+++ b/xsd-tests/cxx/parser/test-template/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/union/buildfile b/xsd-tests/cxx/parser/union/buildfile
index 1a8615c..6694d5f 100644
--- a/xsd-tests/cxx/parser/union/buildfile
+++ b/xsd-tests/cxx/parser/union/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/union/driver.cxx b/xsd-tests/cxx/parser/union/driver.cxx
index c5b5c71..d133b41 100644
--- a/xsd-tests/cxx/parser/union/driver.cxx
+++ b/xsd-tests/cxx/parser/union/driver.cxx
@@ -9,6 +9,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/all/buildfile b/xsd-tests/cxx/parser/validation/all/buildfile
index 555843e..e9c0550 100644
--- a/xsd-tests/cxx/parser/validation/all/buildfile
+++ b/xsd-tests/cxx/parser/validation/all/buildfile
@@ -9,9 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/all/driver.cxx b/xsd-tests/cxx/parser/validation/all/driver.cxx
index a8cbcca..31081cb 100644
--- a/xsd-tests/cxx/parser/validation/all/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/all/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/any/buildfile b/xsd-tests/cxx/parser/validation/any/buildfile
index 57135f4..9867f51 100644
--- a/xsd-tests/cxx/parser/validation/any/buildfile
+++ b/xsd-tests/cxx/parser/validation/any/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/any/driver.cxx b/xsd-tests/cxx/parser/validation/any/driver.cxx
index 1eceda6..2f22d37 100644
--- a/xsd-tests/cxx/parser/validation/any/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/any/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -35,7 +38,7 @@ struct any_a_pimpl: any_a_pskel
}
virtual void
- _start_any_element (ro_string const&,
+ _start_any_element (ro_string const&,
ro_string const& n,
ro_string const*)
{
diff --git a/xsd-tests/cxx/parser/validation/attribute/buildfile b/xsd-tests/cxx/parser/validation/attribute/buildfile
index d486193..0dfe365 100644
--- a/xsd-tests/cxx/parser/validation/attribute/buildfile
+++ b/xsd-tests/cxx/parser/validation/attribute/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/attribute/driver.cxx b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
index 4710564..a98796e 100644
--- a/xsd-tests/cxx/parser/validation/attribute/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile b/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
index a6f366b..8efcacc 100644
--- a/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
index cbeb864..35b3927 100644
--- a/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -23,7 +26,7 @@ struct any_type_pimpl: xml_schema::any_type_pimpl
}
virtual void
- _start_any_element (ro_string const&,
+ _start_any_element (ro_string const&,
ro_string const& n,
ro_string const*)
{
diff --git a/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
index 3fe20ec..b3f0dbf 100644
--- a/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in base64Binary and hexBinary types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
index f1499cd..3b25ffe 100644
--- a/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in boolean type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
bool
diff --git a/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
index b533cfd..9b0e9a1 100644
--- a/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in byte and unsigned byte types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
index da02a50..36f384f 100644
--- a/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in date and time types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
index e92c419..87a744d 100644
--- a/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
@@ -4,11 +4,13 @@
// Test the built-in float, double, and decimal types validation.
//
#include <math.h>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
index 270cd0e..7e68b35 100644
--- a/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in int and unsigned int types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
index 3a5fdd5..4f8a80c 100644
--- a/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
@@ -7,11 +7,13 @@
#include <string>
#include <sstream>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xsd::cxx::parser::validating;
diff --git a/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
index a4ab565..41feb0b 100644
--- a/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in long and unsigned long types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
index 85acd1c..8845b38 100644
--- a/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in QName type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
bool
diff --git a/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
index 7c79b22..f09f975 100644
--- a/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in short and unsigned short types validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
index 920385a..d74ee52 100644
--- a/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
@@ -4,11 +4,13 @@
// Test the built-in string & friends types validation.
//
#include <string>
-#include <cassert>
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
template <typename T>
diff --git a/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
index dcc9242..c296858 100644
--- a/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
@@ -3,11 +3,12 @@
// Test the built-in anyURI type validation.
//
-#include <cassert>
-
#include <xsd/cxx/parser/validating/exceptions.hxx>
#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xsd::cxx::parser::validating;
int
diff --git a/xsd-tests/cxx/parser/validation/choice/buildfile b/xsd-tests/cxx/parser/validation/choice/buildfile
index adf0832..06eca85 100644
--- a/xsd-tests/cxx/parser/validation/choice/buildfile
+++ b/xsd-tests/cxx/parser/validation/choice/buildfile
@@ -9,9 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/choice/driver.cxx b/xsd-tests/cxx/parser/validation/choice/driver.cxx
index 4a52c5d..edfb15d 100644
--- a/xsd-tests/cxx/parser/validation/choice/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/choice/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
diff --git a/xsd-tests/cxx/parser/validation/restriction/buildfile b/xsd-tests/cxx/parser/validation/restriction/buildfile
index 4c415bf..1086ea0 100644
--- a/xsd-tests/cxx/parser/validation/restriction/buildfile
+++ b/xsd-tests/cxx/parser/validation/restriction/buildfile
@@ -9,9 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/restriction/driver.cxx b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
index 206b9f8..ea7f192 100644
--- a/xsd-tests/cxx/parser/validation/restriction/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/parser/validation/sequence/buildfile b/xsd-tests/cxx/parser/validation/sequence/buildfile
index b205091..2ca2b6a 100644
--- a/xsd-tests/cxx/parser/validation/sequence/buildfile
+++ b/xsd-tests/cxx/parser/validation/sequence/buildfile
@@ -9,9 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/parser/validation/sequence/driver.cxx b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
index 6b5bf70..07d33e2 100644
--- a/xsd-tests/cxx/parser/validation/sequence/driver.cxx
+++ b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
@@ -10,6 +10,9 @@
#include "test-pskel.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using xml_schema::ro_string;
@@ -59,7 +62,7 @@ struct sequence_pimpl: sequence_pskel
}
virtual void
- _start_any_element (ro_string const& ns,
+ _start_any_element (ro_string const& ns,
ro_string const& name,
ro_string const*)
{
diff --git a/xsd-tests/cxx/tree/any-type/buildfile b/xsd-tests/cxx/tree/any-type/buildfile
index c65c403..6f3a355 100644
--- a/xsd-tests/cxx/tree/any-type/buildfile
+++ b/xsd-tests/cxx/tree/any-type/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-any-type \
diff --git a/xsd-tests/cxx/tree/any-type/driver.cxx b/xsd-tests/cxx/tree/any-type/driver.cxx
index a8fccf6..8ed00c7 100644
--- a/xsd-tests/cxx/tree/any-type/driver.cxx
+++ b/xsd-tests/cxx/tree/any-type/driver.cxx
@@ -16,6 +16,9 @@
#include <xsd/cxx/xml/string.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/binary/cdr/buildfile b/xsd-tests/cxx/tree/binary/cdr/buildfile
index 7a1c5b4..7518f04 100644
--- a/xsd-tests/cxx/tree/binary/cdr/buildfile
+++ b/xsd-tests/cxx/tree/binary/cdr/buildfile
@@ -11,9 +11,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-insertion 'ACE_OutputCDR' \
--generate-extraction 'ACE_InputCDR' \
diff --git a/xsd-tests/cxx/tree/binary/cdr/driver.cxx b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
index fe74bb5..4656b03 100644
--- a/xsd-tests/cxx/tree/binary/cdr/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
@@ -5,11 +5,13 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/polymorphic/buildfile b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
index d34ef27..1212a34 100644
--- a/xsd-tests/cxx/tree/binary/polymorphic/buildfile
+++ b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
@@ -11,9 +11,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--root-element-last \
diff --git a/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
index 15ebf17..ebc0dba 100644
--- a/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include <typeinfo>
@@ -13,6 +12,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
index 09414c7..93e1701 100644
--- a/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
@@ -13,9 +13,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-insertion 'XDR' \
--generate-extraction 'XDR' \
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
index d61a645..46a2e1f 100644
--- a/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
@@ -8,11 +8,13 @@
#include <memory> // std::auto_ptr/unique_ptr
#include <cstring> // std::memcpy
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/binary/xdr/buildfile b/xsd-tests/cxx/tree/binary/xdr/buildfile
index b8fc2f4..0c738f6 100644
--- a/xsd-tests/cxx/tree/binary/xdr/buildfile
+++ b/xsd-tests/cxx/tree/binary/xdr/buildfile
@@ -13,9 +13,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-insertion 'XDR' \
--generate-extraction 'XDR' \
diff --git a/xsd-tests/cxx/tree/binary/xdr/driver.cxx b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
index 04606ea..a497d73 100644
--- a/xsd-tests/cxx/tree/binary/xdr/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
@@ -6,11 +6,13 @@
#include <memory> // std::auto_ptr/unique_ptr
#include <cstring> // std::memcpy
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/built-in/buildfile b/xsd-tests/cxx/tree/built-in/buildfile
index 8ee8585..5570ff0 100644
--- a/xsd-tests/cxx/tree/built-in/buildfile
+++ b/xsd-tests/cxx/tree/built-in/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -types} {hxx ixx cxx}{types} $libs testscript
<{hxx ixx cxx}{types}>: xsd{types} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--generate-serialization \
diff --git a/xsd-tests/cxx/tree/built-in/driver.cxx b/xsd-tests/cxx/tree/built-in/driver.cxx
index 4141290..ccb43ac 100644
--- a/xsd-tests/cxx/tree/built-in/driver.cxx
+++ b/xsd-tests/cxx/tree/built-in/driver.cxx
@@ -8,9 +8,11 @@
#include <sstream>
#include <iostream>
-
#include "types.hxx"
+#undef NDEBUG
+#include <cassert>
+
using std::cerr;
using std::endl;
diff --git a/xsd-tests/cxx/tree/chameleon/buildfile b/xsd-tests/cxx/tree/chameleon/buildfile
index cec3b01..c04c4b9 100644
--- a/xsd-tests/cxx/tree/chameleon/buildfile
+++ b/xsd-tests/cxx/tree/chameleon/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{includer}>: xsd{includer includee} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--root-element root \
diff --git a/xsd-tests/cxx/tree/chameleon/driver.cxx b/xsd-tests/cxx/tree/chameleon/driver.cxx
index c22ca55..0d95864 100644
--- a/xsd-tests/cxx/tree/chameleon/driver.cxx
+++ b/xsd-tests/cxx/tree/chameleon/driver.cxx
@@ -9,6 +9,9 @@
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/comparison/buildfile b/xsd-tests/cxx/tree/comparison/buildfile
index 507a703..c1ece3a 100644
--- a/xsd-tests/cxx/tree/comparison/buildfile
+++ b/xsd-tests/cxx/tree/comparison/buildfile
@@ -10,9 +10,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-comparison \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/comparison/driver.cxx b/xsd-tests/cxx/tree/comparison/driver.cxx
index aa7b66d..36b0647 100644
--- a/xsd-tests/cxx/tree/comparison/driver.cxx
+++ b/xsd-tests/cxx/tree/comparison/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/compilation/buildfile b/xsd-tests/cxx/tree/compilation/buildfile
index bec2b4b..26cf0f0 100644
--- a/xsd-tests/cxx/tree/compilation/buildfile
+++ b/xsd-tests/cxx/tree/compilation/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/compilation/driver.cxx b/xsd-tests/cxx/tree/compilation/driver.cxx
index 5c5ab39..818cb6b 100644
--- a/xsd-tests/cxx/tree/compilation/driver.cxx
+++ b/xsd-tests/cxx/tree/compilation/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/complex/ctor/buildfile b/xsd-tests/cxx/tree/complex/ctor/buildfile
index 53e32b7..14a4340 100644
--- a/xsd-tests/cxx/tree/complex/ctor/buildfile
+++ b/xsd-tests/cxx/tree/complex/ctor/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-default-ctor \
--generate-from-base-ctor \
diff --git a/xsd-tests/cxx/tree/complex/ctor/driver.cxx b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
index 7beaa93..7cc25bb 100644
--- a/xsd-tests/cxx/tree/complex/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
@@ -4,7 +4,6 @@
// Test generation of varous complex type constructors.
//
-#include <cassert>
#include <memory>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/containment/buildfile b/xsd-tests/cxx/tree/containment/buildfile
index 1d0272b..f241817 100644
--- a/xsd-tests/cxx/tree/containment/buildfile
+++ b/xsd-tests/cxx/tree/containment/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-default-ctor \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/containment/driver.cxx b/xsd-tests/cxx/tree/containment/driver.cxx
index 65c17fc..db8db72 100644
--- a/xsd-tests/cxx/tree/containment/driver.cxx
+++ b/xsd-tests/cxx/tree/containment/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/default/general/buildfile b/xsd-tests/cxx/tree/default/general/buildfile
index 4e482ce..7ccc174 100644
--- a/xsd-tests/cxx/tree/default/general/buildfile
+++ b/xsd-tests/cxx/tree/default/general/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-tests/cxx/tree/default/general/driver.cxx b/xsd-tests/cxx/tree/default/general/driver.cxx
index 7031636..f15a0c7 100644
--- a/xsd-tests/cxx/tree/default/general/driver.cxx
+++ b/xsd-tests/cxx/tree/default/general/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/default/omit/buildfile b/xsd-tests/cxx/tree/default/omit/buildfile
index 407ab1e..ee6d678 100644
--- a/xsd-tests/cxx/tree/default/omit/buildfile
+++ b/xsd-tests/cxx/tree/default/omit/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-tests/cxx/tree/default/omit/driver.cxx b/xsd-tests/cxx/tree/default/omit/driver.cxx
index 3dcc0d8..c7d32c9 100644
--- a/xsd-tests/cxx/tree/default/omit/driver.cxx
+++ b/xsd-tests/cxx/tree/default/omit/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/detach/buildfile b/xsd-tests/cxx/tree/detach/buildfile
index 07f5f03..8a27a2c 100644
--- a/xsd-tests/cxx/tree/detach/buildfile
+++ b/xsd-tests/cxx/tree/detach/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-detach \
--generate-default-ctor \
diff --git a/xsd-tests/cxx/tree/detach/driver.cxx b/xsd-tests/cxx/tree/detach/driver.cxx
index b632b5d..1d7e1f9 100644
--- a/xsd-tests/cxx/tree/detach/driver.cxx
+++ b/xsd-tests/cxx/tree/detach/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include "test.hxx"
@@ -16,6 +15,9 @@
# define XSD_MOVE(x) x
#endif
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/dom-association/buildfile b/xsd-tests/cxx/tree/dom-association/buildfile
index 85593e5..b6f6e0e 100644
--- a/xsd-tests/cxx/tree/dom-association/buildfile
+++ b/xsd-tests/cxx/tree/dom-association/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/dom-association/dom-parse.cxx b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
index 281eb2c..a14b8e9 100644
--- a/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
+++ b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
@@ -15,6 +15,9 @@
#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/error-handler.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace xercesc;
namespace xml = xsd::cxx::xml;
namespace tree = xsd::cxx::tree;
diff --git a/xsd-tests/cxx/tree/dom-association/driver.cxx b/xsd-tests/cxx/tree/dom-association/driver.cxx
index d85e105..2470212 100644
--- a/xsd-tests/cxx/tree/dom-association/driver.cxx
+++ b/xsd-tests/cxx/tree/dom-association/driver.cxx
@@ -13,6 +13,9 @@
#include "dom-parse.hxx"
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile
index bdea527..a64f457 100644
--- a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--char-encoding iso8859-1 \
diff --git a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
index e356815..9d92c12 100644
--- a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/char/lcp/buildfile b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
index d935b09..65d2f16 100644
--- a/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--char-encoding lcp \
diff --git a/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
index 97c0875..54f99e6 100644
--- a/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
index 4d48165..c4b06b1 100644
--- a/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-doxygen \
diff --git a/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
index 7892667..7f83d2b 100644
--- a/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/encoding/wchar/buildfile b/xsd-tests/cxx/tree/encoding/wchar/buildfile
index f640976..cdc8e60 100644
--- a/xsd-tests/cxx/tree/encoding/wchar/buildfile
+++ b/xsd-tests/cxx/tree/encoding/wchar/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--char-type wchar_t \
diff --git a/xsd-tests/cxx/tree/encoding/wchar/driver.cxx b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
index dbcbcba..f4e7993 100644
--- a/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
+++ b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/buildfile b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
index 96be1ce..41a8028 100644
--- a/xsd-tests/cxx/tree/enumeration/ctor/buildfile
+++ b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-default-ctor \
--generate-from-base-ctor \
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
index c5ea1f2..3ea4a28 100644
--- a/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/enumeration/inheritance/buildfile b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
index 184c95c..beb0add 100644
--- a/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
index b517b1f..d2494c0 100644
--- a/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
@@ -5,11 +5,13 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/float/buildfile b/xsd-tests/cxx/tree/float/buildfile
index 4872a2f..92a5937 100644
--- a/xsd-tests/cxx/tree/float/buildfile
+++ b/xsd-tests/cxx/tree/float/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--root-element-all \
diff --git a/xsd-tests/cxx/tree/float/driver.cxx b/xsd-tests/cxx/tree/float/driver.cxx
index 0f7455f..b4409ad 100644
--- a/xsd-tests/cxx/tree/float/driver.cxx
+++ b/xsd-tests/cxx/tree/float/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/list/ctor/buildfile b/xsd-tests/cxx/tree/list/ctor/buildfile
index 2155f95..adb6a13 100644
--- a/xsd-tests/cxx/tree/list/ctor/buildfile
+++ b/xsd-tests/cxx/tree/list/ctor/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-default-ctor \
--generate-from-base-ctor \
diff --git a/xsd-tests/cxx/tree/list/ctor/driver.cxx b/xsd-tests/cxx/tree/list/ctor/driver.cxx
index 5673e67..f821cdd 100644
--- a/xsd-tests/cxx/tree/list/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/list/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/name-clash/inheritance/buildfile b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
index 530c42f..473d128 100644
--- a/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
index 634c56a..ae0d337 100644
--- a/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/camel/buildfile b/xsd-tests/cxx/tree/naming/camel/buildfile
index 8a8410c..d93bd8e 100644
--- a/xsd-tests/cxx/tree/naming/camel/buildfile
+++ b/xsd-tests/cxx/tree/naming/camel/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming ucc \
diff --git a/xsd-tests/cxx/tree/naming/camel/driver.cxx b/xsd-tests/cxx/tree/naming/camel/driver.cxx
index 600b3ff..82dddba 100644
--- a/xsd-tests/cxx/tree/naming/camel/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/camel/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/java/buildfile b/xsd-tests/cxx/tree/naming/java/buildfile
index 5d4b447..b23f104 100644
--- a/xsd-tests/cxx/tree/naming/java/buildfile
+++ b/xsd-tests/cxx/tree/naming/java/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming java \
diff --git a/xsd-tests/cxx/tree/naming/java/driver.cxx b/xsd-tests/cxx/tree/naming/java/driver.cxx
index b47ff74..4738296 100644
--- a/xsd-tests/cxx/tree/naming/java/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/java/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/naming/knr/buildfile b/xsd-tests/cxx/tree/naming/knr/buildfile
index c4c2287..c694aa2 100644
--- a/xsd-tests/cxx/tree/naming/knr/buildfile
+++ b/xsd-tests/cxx/tree/naming/knr/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming knr \
diff --git a/xsd-tests/cxx/tree/naming/knr/driver.cxx b/xsd-tests/cxx/tree/naming/knr/driver.cxx
index 8c75dd9..f959a20 100644
--- a/xsd-tests/cxx/tree/naming/knr/driver.cxx
+++ b/xsd-tests/cxx/tree/naming/knr/driver.cxx
@@ -11,6 +11,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/order/buildfile b/xsd-tests/cxx/tree/order/buildfile
index 91c3cb7..b490676 100644
--- a/xsd-tests/cxx/tree/order/buildfile
+++ b/xsd-tests/cxx/tree/order/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-wildcard \
diff --git a/xsd-tests/cxx/tree/order/driver.cxx b/xsd-tests/cxx/tree/order/driver.cxx
index f1902ba..46a0065 100644
--- a/xsd-tests/cxx/tree/order/driver.cxx
+++ b/xsd-tests/cxx/tree/order/driver.cxx
@@ -5,7 +5,6 @@
//
#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
#include <iostream>
#include <xercesc/dom/DOM.hpp>
@@ -13,6 +12,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/buildfile b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
index 0bb0b77..fc486ba 100644
--- a/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
@@ -10,9 +10,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-polymorphic \
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
index cadb225..502fa3c 100644
--- a/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
@@ -10,6 +10,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/buildfile b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
index 2237c73..fb9c4d0 100644
--- a/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--polymorphic-type-all \
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
index b030be9..8754ac0 100644
--- a/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/buildfile b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
index 46720d6..e739925 100644
--- a/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--root-element root \
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
index 94f82f5..bebd0a1 100644
--- a/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/prefix/buildfile b/xsd-tests/cxx/tree/prefix/buildfile
index 7ac81de..3ecd411 100644
--- a/xsd-tests/cxx/tree/prefix/buildfile
+++ b/xsd-tests/cxx/tree/prefix/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx ixx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-polymorphic \
diff --git a/xsd-tests/cxx/tree/prefix/driver.cxx b/xsd-tests/cxx/tree/prefix/driver.cxx
index bd2e46d..4eadf96 100644
--- a/xsd-tests/cxx/tree/prefix/driver.cxx
+++ b/xsd-tests/cxx/tree/prefix/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/test-template/buildfile b/xsd-tests/cxx/tree/test-template/buildfile
index b50e6c3..937840f 100644
--- a/xsd-tests/cxx/tree/test-template/buildfile
+++ b/xsd-tests/cxx/tree/test-template/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/test-template/driver.cxx b/xsd-tests/cxx/tree/test-template/driver.cxx
index 5257279..69c1ed9 100644
--- a/xsd-tests/cxx/tree/test-template/driver.cxx
+++ b/xsd-tests/cxx/tree/test-template/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/types-only/buildfile b/xsd-tests/cxx/tree/types-only/buildfile
index fa02277..6436090 100644
--- a/xsd-tests/cxx/tree/types-only/buildfile
+++ b/xsd-tests/cxx/tree/types-only/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--suppress-parsing \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/types-only/driver.cxx b/xsd-tests/cxx/tree/types-only/driver.cxx
index 730b807..f9cce83 100644
--- a/xsd-tests/cxx/tree/types-only/driver.cxx
+++ b/xsd-tests/cxx/tree/types-only/driver.cxx
@@ -9,6 +9,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/union/ctor/buildfile b/xsd-tests/cxx/tree/union/ctor/buildfile
index 6715cb6..e1dcb77 100644
--- a/xsd-tests/cxx/tree/union/ctor/buildfile
+++ b/xsd-tests/cxx/tree/union/ctor/buildfile
@@ -8,9 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-default-ctor \
--generate-from-base-ctor \
diff --git a/xsd-tests/cxx/tree/union/ctor/driver.cxx b/xsd-tests/cxx/tree/union/ctor/driver.cxx
index 246eea8..20d03ad 100644
--- a/xsd-tests/cxx/tree/union/ctor/driver.cxx
+++ b/xsd-tests/cxx/tree/union/ctor/driver.cxx
@@ -7,6 +7,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
diff --git a/xsd-tests/cxx/tree/wildcard/buildfile b/xsd-tests/cxx/tree/wildcard/buildfile
index 67edcdc..d936b0f 100644
--- a/xsd-tests/cxx/tree/wildcard/buildfile
+++ b/xsd-tests/cxx/tree/wildcard/buildfile
@@ -11,9 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-wildcard \
diff --git a/xsd-tests/cxx/tree/wildcard/driver.cxx b/xsd-tests/cxx/tree/wildcard/driver.cxx
index e3040c7..2847391 100644
--- a/xsd-tests/cxx/tree/wildcard/driver.cxx
+++ b/xsd-tests/cxx/tree/wildcard/driver.cxx
@@ -15,6 +15,9 @@
#include <xsd/cxx/xml/string.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace test;
using namespace xercesc;
diff --git a/xsd-tests/failed/buildfile b/xsd-tests/failed/buildfile
index 8739001..a37056e 100644
--- a/xsd-tests/failed/buildfile
+++ b/xsd-tests/failed/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/failed/driver.cxx b/xsd-tests/failed/driver.cxx
index a84b24c..4154f9e 100644
--- a/xsd-tests/failed/driver.cxx
+++ b/xsd-tests/failed/driver.cxx
@@ -3,6 +3,9 @@
#include "test-00.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/manifest b/xsd-tests/manifest
index 9170440..dc0c5b6 100644
--- a/xsd-tests/manifest
+++ b/xsd-tests/manifest
@@ -1,15 +1,17 @@
: 1
name: xsd-tests
-version: 4.2.0-b.2.z
+version: 4.2.1-a.0.z
project: xsd
+type: tests
+language: c++
summary: XML Schema to C++ data binding compiler tests
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
-description-file: README
-url: https://www.codesynthesis.com/projects/xsd/
-doc-url: https://www.codesynthesis.com/projects/xsd/
-src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-tests/
+description-file: README.md
+url: https://www.codesynthesis.com/products/xsd/
+doc-url: https://www.codesynthesis.com/products/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
-depends: * build2 >= 0.14.0
-depends: * bpkg >= 0.14.0
+depends: * build2 >= 0.16.0
+depends: * bpkg >= 0.16.0
depends: libxsd == $
depends: libxerces-c ^3.0.0
diff --git a/xsd-tests/morphing/anonymous/attribute-group/buildfile b/xsd-tests/morphing/anonymous/attribute-group/buildfile
index 3df24fc..38aa6d8 100644
--- a/xsd-tests/morphing/anonymous/attribute-group/buildfile
+++ b/xsd-tests/morphing/anonymous/attribute-group/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/morphing/anonymous/attribute-group/driver.cxx b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
index 1632d7d..e2eb296 100644
--- a/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
+++ b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/basic/buildfile b/xsd-tests/morphing/anonymous/basic/buildfile
index e2573e7..8193904 100644
--- a/xsd-tests/morphing/anonymous/basic/buildfile
+++ b/xsd-tests/morphing/anonymous/basic/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/morphing/anonymous/basic/driver.cxx b/xsd-tests/morphing/anonymous/basic/driver.cxx
index fc289eb..c3f081a 100644
--- a/xsd-tests/morphing/anonymous/basic/driver.cxx
+++ b/xsd-tests/morphing/anonymous/basic/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
index d25143a..15cbbe8 100644
--- a/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
index 9046ee4..d79f00f 100644
--- a/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
@@ -4,6 +4,9 @@
#include "includee.hxx"
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/group/buildfile b/xsd-tests/morphing/anonymous/group/buildfile
index 9cedf39..980dd19 100644
--- a/xsd-tests/morphing/anonymous/group/buildfile
+++ b/xsd-tests/morphing/anonymous/group/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/morphing/anonymous/group/driver.cxx b/xsd-tests/morphing/anonymous/group/driver.cxx
index 2a76396..23a80e6 100644
--- a/xsd-tests/morphing/anonymous/group/driver.cxx
+++ b/xsd-tests/morphing/anonymous/group/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/morphing/anonymous/unstable/buildfile b/xsd-tests/morphing/anonymous/unstable/buildfile
index e83cee7..d61d36b 100644
--- a/xsd-tests/morphing/anonymous/unstable/buildfile
+++ b/xsd-tests/morphing/anonymous/unstable/buildfile
@@ -11,9 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
@@ -27,5 +25,5 @@ for f: $fs
testscript{*}:
{
test = $xsd
- test.arguments = cxx-tree --std c++11
+ test.arguments = cxx-tree
}
diff --git a/xsd-tests/processing/inheritance/buildfile b/xsd-tests/processing/inheritance/buildfile
index 09e64a4..3dee900 100644
--- a/xsd-tests/processing/inheritance/buildfile
+++ b/xsd-tests/processing/inheritance/buildfile
@@ -24,9 +24,7 @@ for nm: 000 001
<{hxx cxx}{$sc}>: xsd{$sc} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/processing/inheritance/driver.cxx.in b/xsd-tests/processing/inheritance/driver.cxx.in
index df18427..b37ad02 100644
--- a/xsd-tests/processing/inheritance/driver.cxx.in
+++ b/xsd-tests/processing/inheritance/driver.cxx.in
@@ -3,6 +3,9 @@
#include "test-$num$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/anonymous/buildfile b/xsd-tests/schema/anonymous/buildfile
index cc01697..060d7d6 100644
--- a/xsd-tests/schema/anonymous/buildfile
+++ b/xsd-tests/schema/anonymous/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/anonymous/driver.cxx b/xsd-tests/schema/anonymous/driver.cxx
index f902fdb..be1e3f0 100644
--- a/xsd-tests/schema/anonymous/driver.cxx
+++ b/xsd-tests/schema/anonymous/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/any-attribute/buildfile b/xsd-tests/schema/any-attribute/buildfile
index e4275a4..b215090 100644
--- a/xsd-tests/schema/any-attribute/buildfile
+++ b/xsd-tests/schema/any-attribute/buildfile
@@ -8,5 +8,5 @@
testscript{*}:
{
test = $xsd
- test.arguments = cxx-tree --std c++11
+ test.arguments = cxx-tree
}
diff --git a/xsd-tests/schema/any-type/buildfile b/xsd-tests/schema/any-type/buildfile
index e575562..9ab1e7d 100644
--- a/xsd-tests/schema/any-type/buildfile
+++ b/xsd-tests/schema/any-type/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0]) 2>>?~%EOE%
diff --git a/xsd-tests/schema/any-type/driver.cxx b/xsd-tests/schema/any-type/driver.cxx
index a94f099..9e82604 100644
--- a/xsd-tests/schema/any-type/driver.cxx
+++ b/xsd-tests/schema/any-type/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/any/buildfile b/xsd-tests/schema/any/buildfile
index 6b76348..f6c163a 100644
--- a/xsd-tests/schema/any/buildfile
+++ b/xsd-tests/schema/any/buildfile
@@ -24,9 +24,7 @@ for sc: test fail
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
@@ -34,9 +32,7 @@ for sc: test fail
<{hxx cxx}{fail}>: xsd{fail} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0]) 2>>?~%EOE%
diff --git a/xsd-tests/schema/any/driver.cxx.in b/xsd-tests/schema/any/driver.cxx.in
index 9c36761..33d5aa7 100644
--- a/xsd-tests/schema/any/driver.cxx.in
+++ b/xsd-tests/schema/any/driver.cxx.in
@@ -3,6 +3,9 @@
#include "$sch$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/attribute-group/buildfile b/xsd-tests/schema/attribute-group/buildfile
index b9ca83b..4b7d27e 100644
--- a/xsd-tests/schema/attribute-group/buildfile
+++ b/xsd-tests/schema/attribute-group/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -global} {hxx cxx}{global} $libs
<{hxx cxx}{global}>: xsd{global} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/attribute-group/driver.cxx b/xsd-tests/schema/attribute-group/driver.cxx
index 328cef4..2ca9593 100644
--- a/xsd-tests/schema/attribute-group/driver.cxx
+++ b/xsd-tests/schema/attribute-group/driver.cxx
@@ -3,6 +3,9 @@
#include "global.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/attribute/buildfile b/xsd-tests/schema/attribute/buildfile
index 00e5410..30d1464 100644
--- a/xsd-tests/schema/attribute/buildfile
+++ b/xsd-tests/schema/attribute/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/attribute/driver.cxx b/xsd-tests/schema/attribute/driver.cxx
index 3d29b36..061e69c 100644
--- a/xsd-tests/schema/attribute/driver.cxx
+++ b/xsd-tests/schema/attribute/driver.cxx
@@ -5,6 +5,9 @@
#include "global.hxx"
#include "local.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/cardinality/buildfile b/xsd-tests/schema/cardinality/buildfile
index cfbb732..93ad75a 100644
--- a/xsd-tests/schema/cardinality/buildfile
+++ b/xsd-tests/schema/cardinality/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/cardinality/driver.cxx b/xsd-tests/schema/cardinality/driver.cxx
index d8b218e..2c7dd73 100644
--- a/xsd-tests/schema/cardinality/driver.cxx
+++ b/xsd-tests/schema/cardinality/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/chameleon/buildfile b/xsd-tests/schema/chameleon/buildfile
index 0143422..e270cf0 100644
--- a/xsd-tests/schema/chameleon/buildfile
+++ b/xsd-tests/schema/chameleon/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $directory($path($>[0])) \
$path($<[0])
diff --git a/xsd-tests/schema/chameleon/driver.cxx b/xsd-tests/schema/chameleon/driver.cxx
index 7b408ef..553b1d3 100644
--- a/xsd-tests/schema/chameleon/driver.cxx
+++ b/xsd-tests/schema/chameleon/driver.cxx
@@ -4,6 +4,9 @@
#include "includer.hxx"
#include "schemas/includee.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/enumeration/buildfile b/xsd-tests/schema/enumeration/buildfile
index efb6b9e..5188b04 100644
--- a/xsd-tests/schema/enumeration/buildfile
+++ b/xsd-tests/schema/enumeration/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/enumeration/driver.cxx b/xsd-tests/schema/enumeration/driver.cxx
index 406c8ab..df1f680 100644
--- a/xsd-tests/schema/enumeration/driver.cxx
+++ b/xsd-tests/schema/enumeration/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/forward/buildfile b/xsd-tests/schema/forward/buildfile
index 969f99f..3b30f53 100644
--- a/xsd-tests/schema/forward/buildfile
+++ b/xsd-tests/schema/forward/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/forward/driver.cxx b/xsd-tests/schema/forward/driver.cxx
index ee6519e..e8c0de0 100644
--- a/xsd-tests/schema/forward/driver.cxx
+++ b/xsd-tests/schema/forward/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/group/buildfile b/xsd-tests/schema/group/buildfile
index dd926dd..e93b592 100644
--- a/xsd-tests/schema/group/buildfile
+++ b/xsd-tests/schema/group/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/group/driver.cxx b/xsd-tests/schema/group/driver.cxx
index e754194..d4744e5 100644
--- a/xsd-tests/schema/group/driver.cxx
+++ b/xsd-tests/schema/group/driver.cxx
@@ -4,6 +4,9 @@
#include "test.hxx"
#include "global.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/import/buildfile b/xsd-tests/schema/import/buildfile
index 9e6aec5..c5fab29 100644
--- a/xsd-tests/schema/import/buildfile
+++ b/xsd-tests/schema/import/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--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
index a94b2f3..aa289ea 100644
--- a/xsd-tests/schema/import/driver.cxx
+++ b/xsd-tests/schema/import/driver.cxx
@@ -3,6 +3,9 @@
#include "importer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/include/buildfile b/xsd-tests/schema/include/buildfile
index 904e819..c013903 100644
--- a/xsd-tests/schema/include/buildfile
+++ b/xsd-tests/schema/include/buildfile
@@ -15,9 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $directory($path($>[0])) \
$path($<[0])
diff --git a/xsd-tests/schema/include/driver.cxx b/xsd-tests/schema/include/driver.cxx
index 779d9d6..8276621 100644
--- a/xsd-tests/schema/include/driver.cxx
+++ b/xsd-tests/schema/include/driver.cxx
@@ -3,6 +3,9 @@
#include "includer.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/inheritance/buildfile b/xsd-tests/schema/inheritance/buildfile
index 48c6dde..0eae9b3 100644
--- a/xsd-tests/schema/inheritance/buildfile
+++ b/xsd-tests/schema/inheritance/buildfile
@@ -11,9 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--output-dir $directory($path($>[0])) \
$path($<[0])
}}
@@ -26,5 +24,5 @@ for f: $fs
testscript{*}:
{
test = $xsd
- test.arguments = cxx-tree --std c++11
+ test.arguments = cxx-tree
}
diff --git a/xsd-tests/schema/list/buildfile b/xsd-tests/schema/list/buildfile
index 5d8f7fc..090e69a 100644
--- a/xsd-tests/schema/list/buildfile
+++ b/xsd-tests/schema/list/buildfile
@@ -11,9 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $directory($path($>[0])) \
$path($<[0])
@@ -27,5 +25,5 @@ for f: $fs
testscript{*}:
{
test = $xsd
- test.arguments = cxx-tree --std c++11
+ test.arguments = cxx-tree
}
diff --git a/xsd-tests/schema/no-namespace/buildfile b/xsd-tests/schema/no-namespace/buildfile
index e407218..6723d4f 100644
--- a/xsd-tests/schema/no-namespace/buildfile
+++ b/xsd-tests/schema/no-namespace/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/no-namespace/driver.cxx b/xsd-tests/schema/no-namespace/driver.cxx
index ef62942..6d31468 100644
--- a/xsd-tests/schema/no-namespace/driver.cxx
+++ b/xsd-tests/schema/no-namespace/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/recursive/buildfile b/xsd-tests/schema/recursive/buildfile
index 34542c6..a166e82 100644
--- a/xsd-tests/schema/recursive/buildfile
+++ b/xsd-tests/schema/recursive/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/recursive/driver.cxx b/xsd-tests/schema/recursive/driver.cxx
index 55c33cd..0e85546 100644
--- a/xsd-tests/schema/recursive/driver.cxx
+++ b/xsd-tests/schema/recursive/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/ref-type/invalid/buildfile b/xsd-tests/schema/ref-type/invalid/buildfile
index 42c7bfb..aac448c 100644
--- a/xsd-tests/schema/ref-type/invalid/buildfile
+++ b/xsd-tests/schema/ref-type/invalid/buildfile
@@ -8,5 +8,5 @@
testscript{*}:
{
test = $xsd
- test.arguments = cxx-tree --std c++11
+ test.arguments = cxx-tree
}
diff --git a/xsd-tests/schema/ref-type/valid/buildfile b/xsd-tests/schema/ref-type/valid/buildfile
index 0534fce..ff962dc 100644
--- a/xsd-tests/schema/ref-type/valid/buildfile
+++ b/xsd-tests/schema/ref-type/valid/buildfile
@@ -23,9 +23,7 @@ for sc: idref idrefs
<{hxx cxx}{$sc}>: xsd{$sc} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/ref-type/valid/driver.cxx.in b/xsd-tests/schema/ref-type/valid/driver.cxx.in
index 434aa40..0c2936b 100644
--- a/xsd-tests/schema/ref-type/valid/driver.cxx.in
+++ b/xsd-tests/schema/ref-type/valid/driver.cxx.in
@@ -3,6 +3,9 @@
#include "$sch$.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/restriction/buildfile b/xsd-tests/schema/restriction/buildfile
index c05718a..314b095 100644
--- a/xsd-tests/schema/restriction/buildfile
+++ b/xsd-tests/schema/restriction/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/restriction/driver.cxx b/xsd-tests/schema/restriction/driver.cxx
index 2ffeb74..eeacc91 100644
--- a/xsd-tests/schema/restriction/driver.cxx
+++ b/xsd-tests/schema/restriction/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd-tests/schema/union/buildfile b/xsd-tests/schema/union/buildfile
index 00d0a83..8ff9349 100644
--- a/xsd-tests/schema/union/buildfile
+++ b/xsd-tests/schema/union/buildfile
@@ -11,9 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/union/driver.cxx b/xsd-tests/schema/union/driver.cxx
index 45f290f..2a0f699 100644
--- a/xsd-tests/schema/union/driver.cxx
+++ b/xsd-tests/schema/union/driver.cxx
@@ -3,6 +3,9 @@
#include "test.hxx"
+#undef NDEBUG
+#include <cassert>
+
int
main (int, char*[])
{
diff --git a/xsd/.gitignore b/xsd/.gitignore
index cece09c..1c363a0 100644
--- a/xsd/.gitignore
+++ b/xsd/.gitignore
@@ -3,10 +3,16 @@
*.d
*.t
*.i
+*.i.*
*.ii
+*.ii.*
*.o
*.obj
+*.gcm
+*.pcm
+*.ifc
*.so
+*.dylib
*.dll
*.a
*.lib
diff --git a/xsd/INSTALL b/xsd/INSTALL
deleted file mode 100644
index 3402df2..0000000
--- a/xsd/INSTALL
+++ /dev/null
@@ -1,6 +0,0 @@
-The easiest way to build this package is with the bpkg package manager:
-
-$ bpkg build xsd
-
-But if you don't want to use the package manager, then you can also build it
-manually using the standard build2 build system.
diff --git a/xsd/NEWS b/xsd/NEWS
index 9e33814..0fae0f8 100644..120000
--- a/xsd/NEWS
+++ b/xsd/NEWS
@@ -1,1220 +1 @@
-Version 4.1.0
-
-C++/Tree
-
- * Support for abstract XML Schema types. The corresponding C++ classes
- now have _clone() declared pure virtual which prevents construction
- of their instances.
-
-Version 4.0.0
-
- * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported.
-
- * Visual Studio 2003 (7.1) is no longer supported.
-
- * HP aCC3 (HP-UX/PA-RISC) is no longer supported.
-
- * Oracle/Berkeley DB XML support has been removed since it no longer
- supports the Xerces-C++-based document access.
-
- * New option, --std, specifies the C++ standard that the generated code
- should conform to. Valid values are c++98 (default) and c++11.
-
- The C++ standard affects various aspects of the generated code that are
- discussed in more detail in mapping-specific documentation (guides and
- manuals). Overall, when C++11 is selected, the generated code relies on
- the move semantics and uses std::unique_ptr instead of deprecated
- std::auto_ptr. See also the documentation for the --std option in the
- XSD compiler command line manual (man pages).
-
- * New option, --fat-type-file, triggers the placement of code corresponding
- to global elements into type files instead of schema files in the file-
- per-type mode. This option is primarily useful when trying to minimize
- the amount of object code that is linked to an executable by packaging
- compiled generated code into a static (archive) library.
-
-C++/Tree
-
- * Support for ordered types. C++/Tree flattens nested compositors which
- sometimes can result in the loss of element ordering information that
- could be significant to the application. Ordered types address this
- problem. For more information, refer to Section 2.8.4, "Element Order"
- in the C++/Tree Mapping User Manual.
-
- * Support for mixed content in ordered types. For more information, refer
- to Section 2.13, "Mapping for Mixed Content Models" in the C++/Tree
- Mapping User Manual.
-
- * xml_schema::type represents anyType content as a DOM fragment, similar
- to wildcards. For more information, refer to Section 2.5.2, "Mapping
- for anyType" in the C++/Tree Mapping User Manual.
-
- * xml_schema::simple_type represents anySimpleType content as a text
- string. For more information, refer to Section 2.5.3, "Mapping for
- anySimpleType" in the C++/Tree Mapping User Manual.
-
- * Improved streaming example that now provides better XML namespace
- handling and supports streaming parsing and serialization at multiple
- document levels.
-
- * New option, --generate-dep, triggers the generation of the make
- dependency files (.d) for the generated C++ files. Other options
- controlling dependency generation are: --generate-dep-only,
- --dep-phony, --dep-target, --dep-suffix, and --dep-regex. For
- details on this functionality, refer to the XSD compiler command
- line manual (man pages).
-
- * New option, --suppress-assignment, suppresses the generation of copy
- assignment operators for complex types. If this option is specified,
- the copy assignment operators for such types are declared private and
- left unimplemented.
-
- * Binary representation now stores string-based enumerations as integer
- values corresponding to C++ enumerators instead of string literals.
-
- * Binary representation now pools polymorphic type-id strings in an
- implicit string pool. The string pool support can also be used to
- pool strings in other situations. For example, you can implement
- string insertion/extraction operators for your stream to pool all
- strings. This can be useful if your documents contain a large number
- of repetitive strings.
-
- * New option, --polymorphic-plate, allows the creation of multiple
- polymorphic map plates in the same application. For details, refer
- to the XSD compiler command line manual (man pages).
-
- * To get the DOM association in the copy of an object model tree one
- now needs to explicitly pass the xml_schema::flags::keep_dom flag as
- the second argument to the copy constructor or clone() function.
-
-Version 3.3.0
-
- * New option, --char-encoding, allows you to specify the character encoding
- that should be used in the generated code. Valid values for the 'char'
- character type are 'utf8' (default), 'iso8859-1' (new), 'lcp' (Xerces-C++
- local code page), and 'custom' (provides support for custom encodings).
- Note that if you use a non-default character encoding and include some
- libxsd headers (e.g., xsd/cxx/xml/string.hxx) directly, then you will
- need to first include the correct xsd/cxx/xml/char-<enc>.hxx header,
- where <enc> is iso8859-1, lcp, etc. This mechanism replaces the
- XSD_USE_LCP macro.
-
- For the wchar_t character type the only valid value for this option is
- 'auto' and the encoding is automatically selected between UTF-16 and
- UTF-32, depending on the wchar_t type size.
-
- * When the XSD compiler is built with Xerces-C++ 3.1.0 or later, the
- handling of multiple imports for the same namespace is enabled. Before,
- all subsequent imports for a namespace were ignored which caused errors
- in some schemas. Note that if your application has XML Schema validation
- enabled, then you will also need to build it with Xerces-C++ 3.1.0 or
- later to take advantage of this feature.
-
- * Automatic mapping for the urn-style XML namespaces. The last component
- in the urn name is used to derive the C++ namespace name.
-
- * New option, --schema-file-regex, in combination with the existing
- --type-file-regex, can be used to place the generated files into
- subdirectories or to resolve file name conflicts in the file-per-
- type mode (--file-per-type).
-
- * Warning id's have changed to start with a letter identifying the
- component issuing the warning. F - compiler frontend, D - compiler
- driver, P - C++/Parser mapping, T - C++/Tree mapping.
-
- * Strings used to match regular expressions supplied with the
- --namespace-regex and --anonymous-regex options now include the file
- component for the schema being compiled.
-
- * The XSD_NO_EXPORT macro can be used to omit code generated with the
- --export/import-maps and, for C++/Tree, --generate-xml-schema options
- during C++ compilation. This may be useful if you would like to use
- the same generated code across multiple platforms.
-
- C++/Tree
-
- * New option, --generate-element-type, triggers the generation of types
- instead of parsing/serialization functions for root elements. This
- is primarily useful to distinguish object models with the same root
- type but with different root elements. For more information, refer
- to the messaging example and Section 2.9.1, "Element Types" in the
- C++/Tree Mapping User Manual. To support the customization of the
- element type naming the --element-type-regex option has been added.
- See the NAMING CONVENTION section in the compiler command line manual
- (man pages) for details.
-
- * New option, --generate-element-map, triggers the generation of a root
- element map. The element map allows uniform parsing and serialization
- of multiple root elements. This option can only be used together with
- --generate-element-type. For more information, refer to the messaging
- example and Section 2.9.2, "Element Map" in the C++/Tree Mapping
- User Manual.
-
- * Prior to this version, if the --generate-polymorphic option is
- specified, the compiler treats all types as potentially polymorphic.
- Now by default only type hierarchies used in substitution groups and
- those explicitly declared polymorphic with the new --polymorphic-type
- option are treated as polymorphic. This results in smaller and faster
- generated code. If you would like to continue using the old behavior,
- you will need to specify --polymorphic-type-all. For more information,
- on this change see Section 2.11, "Mapping for xsi:type and Substitution
- Groups" in the C++/Tree Mapping User Manual.
-
- * New option, --generate-detach, triggers the generation of detach
- functions for required elements and attributes. For optional and
- sequence cardinalities the detach functions are now provided by the
- respective containers even without this option. These functions, for
- example, allow one to move sub-trees in the object model either within
- the same tree or between different trees without copying. For more
- information, refer to Section 2.8 "Mapping for Local Elements and
- Attributes" in the C++/Tree Mapping User Manual.
-
- * New option, --export-xml-schema, causes the compiler to export/import
- types in the XML Schema namespace using the export symbol provided
- with the --export-symbol option.
-
- * New example, embedded, shows how to embed the binary representation of
- the schema grammar into an application and then use it to parse and
- validate XML documents.
-
- * New example, compression, shows how to compress an XML document during
- serialization and decompress it during parsing using the zlib library.
-
- * New example, custom/mixed, shows how to use type customization to parse
- and serialize mixed content.
-
- * The streaming example has been extended to show how to perform stream-
- oriented, partially in-memory XML processing using the C++/Tree mapping.
- With the partially in-memory parsing and serialization only a part of
- the object model is in memory at any given time. With this approach one
- can process parts of the document as they become available as well as
- handle documents that are too large to fit into memory.
-
- * New default/fixed value initialization code. Now the default/fixed values
- are parsed by the XSD compiler at compile time instead of the standard
- parsing code at runtime. This will allow the compilation of schemas that
- use the default/fixed values without support for XML parsing
- (--suppress-parsing option).
-
- * 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 members' enumerators.
-
-Version 3.2.0
-
- * New option, --disable-warning, disables printing of a warning with
- the specified id. Specifying 'all' for the warning id disables all
- warnings.
-
- * New options, --export-maps and --import-maps, provide support for
- splitting a polymorphic type hierarchy across several Win32 DLLs.
- See the compiler command line manual (man pages) for details.
-
- C++/Tree
-
- * During serialization the generated code automatically assigns
- generic prefixes (p1, p2, etc) to XML namespaces used in the
- vocabulary and for which no custom prefix-namespace mapping
- was provided via the xml_schema::namespace_infomap argument.
- The xml_schema::namespace_infomap argument in the serialization
- functions is now default-initialized to an empty map. The
- xml_schema::no_namespace_mapping and xml_schema::xsi_already_in_use
- exceptions have been removed.
-
- * New example, performance, measures the performance of parsing and
- serialization. This example also shows how to structure your code
- to achieve the maximum performance for these two operations.
-
- * New example, xpath, shows how to use the C++/Tree mapping together
- with XPath.
-
- * New options, --one-accessor-regex, --opt-accessor-regex,
- --seq-accessor-regex, --one-modifier-regex, --opt-modifier-regex,
- and --seq-modifier-regex, allow specification of transformations
- for accessor and modifier function names for elements and attributes
- with specific cardinalities. For more information see the NAMING
- CONVENTION section in the compiler command line manual (man pages).
-
- * Support for comparison (--generate-comparison) and printing
- (--generate-ostream) of polymorphic object models.
-
- * New serialization flag, xml_schema::flags::dont_pretty_print,
- disables extra spaces and new lines that make the resulting XML
- slightly bigger but easier to read.
-
- * New example, custom/double, shows how to customize parsing and
- serialization code for the xsd:double XML Schema built-in type.
- It can be used as a guide on how to customize built-in XML Schema
- types that are mapped to fundamental C++ types.
-
- * Support for fractionDigits and totalDigits facets in serialization
- of types derived from xsd:decimal.
-
- * New set of compile-time macros that control how the xsd:float,
- xsd:double, and xsd:decimal types are serialized. The following
- macros control the format:
-
- XSD_CXX_TREE_FLOAT_FIXED
- XSD_CXX_TREE_FLOAT_SCIENTIFIC
- XSD_CXX_TREE_DOUBLE_FIXED
- XSD_CXX_TREE_DOUBLE_SCIENTIFIC
-
- The following macros control the precision:
-
- XSD_CXX_TREE_FLOAT_PRECISION_MAX
- XSD_CXX_TREE_FLOAT_PRECISION
- XSD_CXX_TREE_DOUBLE_PRECISION_MAX
- XSD_CXX_TREE_DOUBLE_PRECISION
- XSD_CXX_TREE_DECIMAL_PRECISION_MAX
- XSD_CXX_TREE_DECIMAL_PRECISION
-
- If the *_PRECISION_MAX macro is defined then the maximum number of
- potentially significant decimal digits that the type can represent
- is used. Otherwise, if the *_PRECISION macro is defined then its
- value is used. By default the precision is set to the number of
- decimal digits that the type can represent without change. For
- more information on these options, refer to the following paper:
-
- http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf
-
- The old macro, XSD_FP_ALL_DIGITS, that was equivalent to defining
- all three *_PRECISION_MAX macros has been removed.
-
- An alternative to using these macros is to customize the floating
- point type as shown in the custom/double example.
-
- * An additional constructor is generated in situations where a type
- contains one or more required element of complex type (that is,
- it itself contains elements or attributes). In this constructor,
- initializers for such elements are passed as std::auto_ptr and the
- newly created instance is directly initialized with and assumes
- ownership of the pointed to objects. This constructor is a logical
- addition to the non-copying modifiers that were introduced in the
- previous version.
-
- * Extra conversion operators in the fundamental_base class template
- which is used to emulate inheritance from fundamental types are now
- disabled by default since they cause problems on several compilers.
- To enable them compile your code with the XSD_TREE_EXTRA_FUND_CONV
- macro defined.
-
- C++/Parser
-
- * New options, --generate-xml-schema and --extern-xml-schema, trigger
- generation of the mapping for the XML Schema namespace to a separate
- header file and inclusion of that header into other generated header
- files instead of generating the necessary declarations inline,
- respectively. See the compiler command line manual (man pages) for
- details.
-
- * New example, performance, measures the performance of XML parsing.
- This example also shows how to structure your code to achieve the
- maximum performance for this operation.
-
- * Type map files can now include comments. A comment starts with #
- and ends with a new line or end of file. To specify a name that
- contains # enclose it in "".
-
- * In type map files the optional argument type now defaults to the
- return type if the return type ends with * or & (that is, it is
- a pointer or a reference) and 'const return type&' otherwise.
-
- * The interface for polymorphic parsing has been simplified. Calling the
- *_parser() functions multiple times to specify several parsers is no
- longer supported. Instead you need to pass the xml_schema::parser_map
- object which contains the parsers. For more information refer to
- Section 5.4, "Support for Polymorphism" in the C++/Parser Mapping
- Getting Started Guide.
-
- * The use of virtual inheritance has been reduced which results in a
- much smaller object code size (more than factor of 2 on some tests)
- and faster C++ compilation with less RAM used.
-
- * The low-level Expat-specific parsing API (parse_begin() and parse_end())
- has been extended to provide XML and XML Schema error translation to
- exceptions or error handler calls. See Section 7.2, "Expat Document
- Parser" in the C++/Parser Mapping Getting Started Guide for more
- information.
-
-Version 3.1.0
-
- * New option, --file-per-type, triggers generation of a separate set
- of C++ files for each type defined in XML Schema. This compilation
- mode is primarily useful when some of your schemas cannot be compiled
- separately or have cyclic dependencies which involve inheritance.
- Other new options that are useful in this compilation mode are
- --type-file-regex, --type-file-regex-trace, and --file-list. See the
- compiler command line manual (man pages) for more information.
-
- * New option, --options-file, allows additional command line options
- to be provided in files, with one option per line.
-
- * New option, --reserved-name, allows insertion of additional names
- with optional replacements to the list of names that should not be
- used as identifiers. See the compiler command line manual (man pages)
- for details.
-
- * New options, --location-map, --location-regex, and
- --location-regex-trace, allow re-mapping of schema locations
- specified in the include and import elements without modifying the
- schema files. See the compiler command line manual (man pages) for
- more information.
-
- * New option, --guard-prefix, allows specification of a prefix that
- should be added to generated header inclusion guards.
-
- * New option, --file-list, triggers creation of a file with a list of
- generated C++ files. This option is primarily useful in the file-per-
- type compilation mode (--file-per-type) to create a list of generated
- C++ files, for example, as a makefile fragment. Other new options
- that are useful with --file-list are --file-list-prologue,
- --file-list-epilogue, and --file-list-delim. See the compiler command
- line manual (man pages) for more information.
-
- * Support for the upcoming Xerces-C++ 3.0.0 release.
-
- C++/Tree
-
- * New option, --generate-intellisense, triggers generation of workarounds
- for IntelliSense bugs in Visual Studio 2005 (8.0). When this option is
- used, the resulting code is slightly more verbose. IntelliSense in
- Visual Studio 2008 (9.0) does not require these workarounds. Support
- for IntelliSense in Visual Studio 2003 (7.1) is improved with this
- option but is still incomplete.
-
- * New options, --type-naming and --function-naming, allow specification
- of the type and function naming conventions that should be used in the
- generated code. Supported values for --type-naming are: knr (K&R), ucc
- (upper-camel-case), and java. Supported values for --function-naming
- are: knr (K&R), lcc (lower-camel-case), and java. For more information
- see the NAMING CONVENTION section in the compiler command line manual
- (man pages).
-
- * New options, --type-regex, --accessor-regex, --modifier-regex,
- --parser-regex, --serializer-regex, and --enumerator-regex, allow
- specification of transformations for type, accessor function,
- modifier function, parsing function, serialization function, and
- enumerator names in order to produce the generated code using a
- custom naming convention. For more information see the NAMING
- CONVENTION section in the compiler command line manual (man pages).
-
- * Generated list classes now provide a complete set of constructors and
- conform to the standard C++ sequence interface.
-
- * String-based types now provide two extra constructors that expect a
- C string and std::string as their arguments. This allows direct
- initialization of string-based types from string literals.
-
- * New implementations of the XML Schema date/time types (date, dateTime,
- duration, gDay, gMonth, gMonthDay, gYear, gYearMonth, and time) that
- represent the information in the numerical form.
-
- * New binary serialization examples: binary/boost, which shows how to
- save/load the object model to/from a custom format using the Boost
- serialization library as an example, and binary/xdr, which shows how to
- save/load the object model to/from XDR (eXternal Data Representation)
- binary format using the XDR API provided as part of Sun RPC.
-
- * The non-copying modifier functions can now be used to assemble object
- models from scratch. For more information see Section 4.4, "Creating
- the Object Model from Scratch" in the C++/Tree Mapping Getting Started
- Guide as well as Section 2.8, "Mapping for Local Elements and Attributes"
- in the C++/Tree Mapping User Manual.
-
- * Doxygen documentation was added to the XSD runtime for the built-in XML
- Schema types, exceptions, etc. This allows linking of the generated
- documentation to the XSD runtime documentation using the Doxygen tags
- mechanism. The Doxygen configuration file for the XSD runtime is
- provided in the documentation/cxx/tree/reference/ directory.
-
- * Support for customization of anyType. Because anyType is a base type
- for every generated type, customizing it allows one to implement custom
- functionality that spans the entire type system. See the comments
- example in the examples/cxx/tree/custom/ directory.
-
- * New option, --omit-default-attributes, triggers generation of extra
- checks that exclude attributes with default and fixed values from the
- serialized XML documents.
-
- * The parsing functions that used to read from DOMInputSource were changed
- to use InputSource to ease support of Xerces-C++ 3 and 2 series in the
- same code base.
-
- * The parsing function that used to parse DOMDocument* was changed to
- parse xml_schema::dom::auto_ptr<DOMDocument>& instead. If the keep_dom
- and own_dom flags are specified then this parsing function resets the
- passed automatic pointer and the returned object model assumes
- ownership of the DOM document. xml_schema::dom::auto_ptr is a simple
- automatic pointer for Xerces-C++ DOM with the same interface as
- std::auto_ptr.
-
- * The xml_schema::tree_node_key DOM user data key was moved to
- xml_schema::dom::tree_node_key.
-
- C++/Parser
-
- * New option, --generate-polymorphic, triggers generation of polymorphism-
- aware code. This option should be used on XML vocabularies which use
- xsi:type and/or substitution groups. For more information see Section
- 5.4, "Support for Polymorphism" in the C++/Parser Mapping Getting
- Started Guide we well as the polymorphism and polyroot examples in the
- examples/cxx/parser/ directory.
-
- * The date/time types (date, dateTime, gDay, gMonth, gMonthDay, gYear,
- gYearMonth, and time) now represent time zone in the numerical form.
-
- * In order to support parsing of polymorphic XML documents, the signatures
- of the start_* functions (_start_element, _start_any_element, and
- start_root_element) have changed to include a third argument of type
- const ro_string<C>*. This argument contains the resolved type name and
- namespace in case the xsi:type attribute was specified.
-
-Version 3.0.0
-
- * Anonymous type morphing (automatic type naming) is now performed by
- default in both mappings. The --morph-anonymous option does not have
- any effect but is preserved for backwards compatibility. A new option,
- --preserve-anonymous, disables anonymous type morphing. This option is
- useful together with --show-anonymous if you want to make sure your
- schemas do not have any anonymous types.
-
- * A number of bugs fixed in both C++/Tree and C++/Parser mappings.
-
- C++/Tree
-
- * The new C++/Tree Mapping Getting Started Guide is available in the
- documentation/cxx/tree/guide/ directory.
-
- * The type definitions for local elements and attributes in the form
- name::type have been changed to name_type. For example, an element
- bar in type foo with maxOccurs="unbounded" used to have its iterator
- type defined as foo::bar::iterator. With this change it becomes
- foo::bar_iterator. Furthermore, the container type name for sequence
- elements has changed from foo::bar::container to foo::bar_sequence
- and for optional elements and attributes from foo::bar::container
- to foo::bar_optional. This is a backwards incompatible change and
- may require application code adjustments (the C++ compiler will
- pinpoint the affected places).
-
- * New option, --generate-doxygen, triggers generation of documentation
- comments suitable for extraction by the Doxygen documentation system.
- Documentation from annotations is added to the comments if present in
- the schema.
-
- * New option, --generate-wildcard, triggers generation of the new
- wildcard (any and anyAttribute) mapping. This mapping represents the
- content matched by wildcards as DOM fragments. For more information on
- the new mapping see Section 2.12, "Mapping for any and anyAttribute"
- in the C++/Tree Mapping User Manual as well as the wildcard example in
- the examples/cxx/tree/ directory.
-
- * New option, --generate-comparison, triggers generation of comparison
- operators (== and !=) for complex types. Comparison is performed
- memberwise.
-
- * Support for the RPC XDR binary stream in addition to ACE CDR.
-
- * New constructor is generated for complex types with ultimate bases
- that are simple types and can be default-initialized. This constructor
- includes initializers for all required members but omits the initializer
- for the base type. See Section 2.7, "Mapping for Complex Types" in the
- C++/Tree Mapping User Manual for more information.
-
- * Support for polymorphic binary serialization and extraction. Note that
- the semantics of the --generate-insertion and --generate-extraction
- options has changed. See the the compiler command line manual (man
- pages) for details.
-
- * New parsing function with the DOMDocument* argument and the own_dom
- flag allow the tree to assume the ownership of the DOM document
- being parsed when DOM association is requested (keep_dom flag).
- See the C++/Tree Mapping User Manual for more information.
-
- * New example, multiroot, shows how to handle XML vocabularies with
- multiple root elements.
-
- * New example, caching, shows how to parse several XML documents while
- reusing the underlying XML parser and caching the schemas used for
- validation.
-
- * The mapping of built-in XML Schema type decimal has changed from
- long double to double. The old mapping can be obtained by providing
- a custom mapping for this type.
-
- * The xml_schema::errors type which is used in the xml_schema::parsing
- and xml_schema::serialization exceptions has been renamed to
- xml_schema::diagnostics and extended to include warnings in addition
- to errors.
-
- * Serialization operators now clear the element being serialized to from
- existing child nodes and attributes (except for special attributes such
- as prefix-namespace mappings, etc.).
-
- * Improved built-in type parsing, including support for normalization and
- whitespace collapsing.
-
- * Optimizations for the generated code size and compilation time,
- including space optimizations for polymorphic parsing and
- serialization. Optimizations for XML parsing speed.
-
- C++/Parser
-
- * The C++/Parser mapping have been significantly redesigned. See the new
- Getting Started Guide in documentation/cxx/parser/guide/ for details.
-
- * The new C++/Parser Mapping Getting Started Guide is available in the
- documentation/cxx/parser/guide/ directory.
-
- * The mapping now provides parser implementations for all built-in XML
- Schema types. See Chapter 6, "Built-In XML Schema Type Parsers" in
- the C++/Parser Mapping Getting Started Guide for more information.
-
- * The mapping now supports automatic generation of sample parser
- implementations and a test driver. The --generate-noop-impl option
- triggers generation of a sample implementation with empty function
- bodies. The --generate-print-impl option triggers generation of a
- sample implementation that prints the data stored in XML to STDOUT.
- The --generate-test-driver option trigger generation of a test driver.
- For more information on this feature see the compiler command line
- manual (man pages) and the generated example in the examples/cxx/parser/
- directory. Other relevant options include: --force-overwrite,
- --root-element-first, --root-element-last, and --root-element.
-
- * New example, wildcard, shows how to parse the XML data matched by
- XML Schema wildcards (any and anyAttribute).
-
- * The xml_schema::document parser has been extended with overridable
- virtual functions start_root_element and end_root_element to support
- parsing of XML vocabularies with multiple document roots. See the
- multiroot example in the examples/cxx/parser/ directory for more
- information.
-
- * The xml_schema::errors type which is used in the xml_schema::parsing
- exception has been renamed to xml_schema::diagnostics and extended to
- include warnings in addition to errors.
-
-Version 2.3.1
-
- * The compiler is now capable of translating multiple schemas with
- one invocation.
-
- * New option, --sloc-limit, allows one to limit the amount of the
- generated code.
-
- * New option, --proprietary-license, instructs the compiler not to
- include the GPL banner in each generated file. Instead a short
- notice about a required proprietary license is generated. You
- should not use this option unless you have obtained a proprietary
- license from Code Synthesis Tools CC.
-
- * The default encoding for the 'char' character type is now UTF-8.
- To get the previous behavior (local code page via the Xerces-C++
- transcode functions) define the XSD_USE_LCP preprocessor macro
- when compiling your source code.
-
- C++/Tree
-
- * The --parts option has been improved to split generated code more
- evenly by analyzing the complexity of the generated schema constructs.
-
- * Ability to customize serialization, std::ostream, and binary
- insertion/extraction operators. See examples/cxx/tree/custom/wildcard
- for an example on how to handle XML Schema wildcards (xsd:any and
- xsd:anyAttribute) by customizing the parsing constructor and
- serialization operators.
-
- * Optimizations for the run-time memory consumption.
-
- * Optimizations for space in the generated code.
-
- * Number of bug fixes.
-
- C++/Parser
-
- * Proper handling of an xsd:any nested content. Nested elements,
- attributes, and text are reported via _any_* hooks of the current
- parser.
-
- * Number of bug fixes, mostly in the generated validation code.
-
-
-Version 2.3.0
-
- * Name conflicts across type inheritance hierarchies are now detected
- and resolved via name escaping.
-
- C++/Tree
-
- * New option, --suppress-parsing, suppresses generation of the parsing
- constructors and functions. This can be used to minimize the generated
- code footprint when parsing from XML is not used.
-
- * New option, --generate-forward, triggers generation of a forward
- declaration header file for types defined in the schema. A set of
- --fwd-* options that control the resulting file name as well as
- prologue and epilogue code are available.
-
- * New option, --generate-xml-schema, triggers generation of the mapping
- for the XML Schema namespace to a separate header file. See the man
- pages for details and examples/cxx/tree/custom/calendar for an example.
-
- * New option, --extern-xml-schema, triggers inclusion of a header
- file for the XML Schema namespace instead of generating the
- necessary declarations inline. See the man pages for details and
- examples/cxx/tree/custom/calendar for an example.
-
- * New options, --custom-type and --custom-type-regex, instruct the
- compiler to use custom C++ type for a type defined in the schema.
- The standard mapping can still be generated (with a different name)
- usually to be used as a base. Built-in XML Schema types can be
- customized using this mechanism. See the man pages for details and
- examples/cxx/tree/custom/* for examples.
-
- * The generated parsing constructors and serialization operators have
- been changed to use the Xerces-C++ DOM elements and attributes
- instead of the internal wrapper types. This should provide easier
- integration with other code and libraries that use the Xerces-C++
- DOM types such as Berkeley DB XML.
-
- * New example, examples/cxx/tree/dbxml, shows how to use the C++/Tree
- mapping on top of the Berkeley DB XML database.
-
- C++/Parser
-
- * Validation of the attribute structure in the generated code.
-
- * Validation of the character content models including mixed content in
- the generated code.
-
- * Validation of the built-in XML Schema types.
-
- * Optimizations for space and time in the generated code. In particular
- data coping during parsing and validation was significantly reduced.
-
-
-Version 2.2.0
-
- * Detection of a version mismatch between the generated code and
- the runtime.
-
- C++/Tree
-
- * Escaping of a global element name that conflicts with a global type
- name. This is a backwards-incompatible change. Previous versions
- map them to the same name.
-
- * New options, --generate--insertion and --generate-extraction,
- trigger generation of (binary) data representation stream
- insertion and extraction operators, respectively. This allows
- one to serialize/deserialize in-memory representation to/from
- data representation streams such as XSD, CDR, etc. ACE CDR
- streams are supported out of the box (see the binary example).
- User-supplied streams can be used via an adaptation layer.
-
- * New serialization flag, no_xml_declaration, instructs the XML
- serialization functions to omit an XML declaration. This is useful
- for streaming serialization (see the streaming example).
-
- * Optimizations to reduce generated code size.
-
-
- C++/Parser
-
- * New options, --generate-validation and --suppress-validation,
- trigger and suppress generation of the validation code,
- respectively. The validation code is the implementation of the
- XML Schema validation in the generated code (also known as
- "perfect" parser). In this version validation of the element
- structure has been implemented.
-
- * New architecture for underlying XML parsers. This is a backwards-
- incompatible change. Existing applications will have to be
- modified. See examples for details.
-
-
-Version 2.1.1
-
- C++/Tree
-
- * New option, --namespace-map, allows direct mapping of XML Schema
- namespaces to C++ namespaces without the use of regular expressions.
-
- * Further optimizations in the container code and enum mapping to
- reduce generated code size.
-
- * Number of bug fixes in the generated code.
-
-
- C++/Parser
-
- * New option, --namespace-map, allows direct mapping of XML Schema
- namespaces to C++ namespaces without the use of regular expressions.
-
-
-Version 2.1.0
-
- * Automatic handling of forward inheritance. XML Schema allows
- inheritance from yet undefined types while it is illegal to do
- so in C++. Now the translator automatically handles forward
- inheritance by re-arranging the schema during compilation.
-
-
- C++/Tree
-
- * New enum mapping with support for inheritance. Enumerators are
- now parsed using binary search instead of linear search.
-
- * Associated DOM nodes now retain "back" pointers to tree nodes.
-
- * Optimizations to reduce generated code size.
-
-
- C++/Parser
-
- * Specialization for void. You can now use void as a hook argument
- type if you don't want to pass any data between parsers.
-
- * Support for re-use of implementations of base parsers in derived
- parsers using the mixin C++ idiom. See the examples/cxx/parser/mixin
- for more information.
-
- * Support for uninitialized parser. If you don't provide a parser
- for element/attribute, that element/attribute will be ignored
- during parsing.
-
-
-Version 2.0.0
-
- * New cardinality calculator. This improves support for schemas that
- use complex structures with repeated elements, e.g.,
-
- <complexType name="Type">
- <choice>
- <sequence>
- <element name="a" type="string"/>
- <element name="c" type="string"/>
- </sequence>
- <sequence>
- <element name="b" type="string"/>
- <element name="c" type="string"/>
- </sequence>
- </choice>
- </complexType>
-
-
- * New identifier escaping code. With this feature xsd generates proper
- code for schemas that use the same name for an element and an attribute
- in the same type or use several elements/attributes with different
- qualified names but with the same local name, e.g.,
-
- <!-- base.xsd -->
- <schema xmlns="http://codesynthesis.com/xmlns/test/foo"
- targetNamespace="http://codesynthesis.com/xmlns/test/foo">
-
- <element name="foo" type="int"/>
- </schema>
-
- <schema xmlns="http://codesynthesis.com/xmlns/test/bar"
- xmlns:f="http://codesynthesis.com/xmlns/test/foo"
- targetNamespace="http://codesynthesis.com/xmlns/test/bar">
-
- <import namespace="http://codesynthesis.com/xmlns/test/foo"
- schemaLocation="base.xsd"/>
-
- <element name="foo" type="string"/>
-
- <complexType name="Foo">
- <sequence>
- <element ref="foo"/>
- <element name="foo" type="long"/>
- <element ref="f:foo"/>
- <element ref="f:foo"/>
- </sequence>
- <attribute name="foo" type="string"/>
- </complexType>
- </schema>
-
-
- C++/Tree
-
- * New option, --generate-polymorphic, triggers generation of
- polymorphism-aware code. Before this release xsd used to always
- generate polymorphism-aware code. However, it appears to be quite
- wasteful in terms of the generated code size (up to 40%). You will
- now need to explicitly specify this option if you use substitution
- groups or xsi:type. A warning is issued if this option is not
- specified but the schema makes use of substitution groups.
-
- * New options, --root-element-first, --root-element-last,
- --root-element-all, --root-element-none, and --root-element, control
- generation of parsing and serialization functions. With these options
- you can avoid generating extra code for global elements that are not
- document roots. See the man pages for details.
-
- * New options, --parts and -parts-suffix, allows you to split generated
- source code into a number of parts. This is useful when translating
- large, monolithic schemas and a C++ compiler is not able to compile
- the resulting source code at once (usually due to insufficient memory).
-
- * New option, --generate-default-ctor, triggers generation of default
- constructors even for types that have required members. Required
- members of an instance constructed using such a constructor are not
- initialized and accessing them results in undefined behavior. Thanks
- to Jean-Francois Dube <jf at magnu.polymtl.ca> for suggesting this
- feature.
-
- * New option, --generate-from-base-ctor, triggers generation of
- constructors that expect an instance of a base type followed by all
- required members. Thanks to Jean-Francois Dube <jf at magnu.polymtl.ca>
- for suggesting this feature.
-
- * Information scopes for attributes and elements with default/fixed values
- now define the public static default_value function which allows one to
- obtain the default/fixed value for the element/attribute. Thanks to
- Dave Moss <david.r.moss at selex-comm.com> for suggesting this feature.
-
- * MSVC 7.1 has a limit on the length of the "if else if" chain. This
- results in ICE when compiling generated code for enumerations with
- a large number of values. This version addresses this issue. Thanks
- to Cyrille Chépélov <cyrille at chepelov.org> for reporting this and
- suggesting a fix.
-
-
- C++/Parser
-
- * The parser construction API has changed. Now, for element 'foo',
- the name of the parser modifier function is 'foo_parser'. Likewise,
- operator() for setting all parsers at once has been changed to the
- 'parsers' function.
-
-
-Version 1.9.0
-
- C++/Tree
-
- * The size modifier function in the base64_binary and hex_binary
- built-in types automatically adjusts capacity if needed.
-
- * More internal names (names that start with _xsd_) were made
- private or protected.
-
- C++/Parser
-
- * Typedef for the parser base in the xml_schema namespace.
-
- C++/Parser-E
-
- * C++/Parser mapping optimized for embedded systems. For now it
- is equivalent to 'cxx-parser --xml-parser expat'.
-
-
-Version 1.8.0
-
- * Moved to the build 0.2 series.
-
- C++/Tree
-
- * Support for default and fixed values in attributes. An optional
- attribute with a default or fixed value is mapped to the One
- cardinality class instead of the Optional cardinality class.
-
- * Mapping for base64Binary and hexBinary has improved. Now these
- types support a basic buffer abstraction and perform automatic
- encoding and decoding.
-
- * Internal names are protected. We've noticed (via bug reports) a
- wide use of internal names (names that start with _xsd_) in user
- code. This is not portable and instead you should use public
- names. To prevent this from happening in the future we've made
- all internal names protected.
-
- C++/Parser
-
- * Support for Expat as the underlying XML parser in addition to
- Xerces-C++. This allows one to use the C++/Parser mapping in
- memory-constrained environments such as embedded systems. To
- select Expat instead of Xerces-C++ (default) add
- '--xml-parser expat' to the command line. At the moment only
- 'char' (UTF-8) is supported as the base character type when
- Expat is selected.
-
- * The invalid_instance exception has been renamed to parsing.
-
- * Generic error_handler interface has been added in addition
- to Xerces-C++-specific DOMErrorHandler. It allows you to
- handle parsing errors and warnings without having to deal
- with Xerces-C++ specifics.
-
- * The default error handling behavior has changed in parsing
- functions. Instead of printing errors and warnings to STDERR,
- the errors are now collected and thrown as part of the parsing
- exception.
-
- * In parsing functions, the name, namespace arguments order has
- been reversed to be consistent with the one used in parsing
- hooks.
-
-Version 1.7.0
-
- * Number of bug fixes in libxsd and the generated code.
-
- C++/Tree
-
- * Comprehensive XML Schema C++/Tree Mapping User Manual.
-
- * Basic support for union. A simple type that is defined using
- derivation by union is mapped to a C++ class that derives from
- string.
-
- * The _clone function has its arguments default-initialized.
-
- * The invalid_instance exception has been renamed to parsing.
-
- * Generic error_handler interface has been added in addition
- to Xerces-C++-specific DOMErrorHandler. It allows you to
- handle parsing/serialization errors and warnings without
- having to deal with Xerces-C++ specifics. See the user
- manual for more information.
-
- * The default error handling behavior has changed in parsing
- and serialization functions. Instead of printing errors and
- warnings to STDERR, the errors are now collected and thrown
- as part of the parsing/serialization exception. See the user
- manual for more information.
-
- * The optional and sequence containers now support operators ==,
- !=, <, >, <=, and >=.
-
- * Flags argument has been added to serialization functions. The
- only flag that is currently supported is dont_initialize.
-
- * Generated code cleanups.
-
- C++/Parser
-
- * Basic support for union. A simple type that is defined using
- derivation by union is mapped to a C++ class template that
- is just an alias for the generic parser. You are expected to
- override the _characters function in your implementation.
-
- * Properties argument to parsing functions which allows to
- programmatically specify schemas for instance document
- validation.
-
- * Flags argument to parsing functions. The following flags
- are supported:
-
- dont_validate - do not validate instance documents
- dont_initialize - do not initialize the Xerces-C++ runtime
-
-Version 1.6.0
-
- * Number of bug fixes in libxsd and the generated code.
-
- C++/Tree
-
- * Support for xsi:type and substitution groups in parsing and
- serialization. See examples/cxx/tree/polymorphism for a code
- sample.
-
- * Properties argument to parsing functions which allows to
- programmatically specify schemas for instance document
- validation.
-
- * Extra checks in parsing code which prevents construction
- of inconsistent in-memory representation from invalid
- instance documents. Should be useful when validation is
- disabled.
-
- * Accessors and modifier were made normal member functions.
- Before they were implemented via functors.
-
- * Workaround for g++-3.3 bug# 16650:
-
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16650
-
- C++/Parser
-
- * All "service" functions were renamed to start with '_'.
- This should prevent hiding of service functions by
- elements/attributes with the same names.
-
-Version 1.5.0
-
- * Number of bug fixes in libxsd and the generated code.
-
- C++/Tree
-
- * Basic support for inheritance-by-restriction in complex types.
-
- * The following parsing flags have been introduced:
-
- keep_dom - keep association with underlying DOM nodes
- dont_validate - do not validate instance documents
- dont_initialize - do not initialize the Xerces-C++ runtime
-
- * "Type-less content" such as mixed content models, xsd:anyType/
- xsd:anySimpleType, and xsd:any/xsd:anyAttribute is supported by
- exposing corresponding DOM nodes (see the keep_dom parsing flag).
- Note that only a subset of XML Schema xsd:any functionality is
- supported. The compiler will issue diagnostics for unsupported
- cases. See examples/cxx/tree/mixed for a code sample.
-
- C++/Parser
-
- * Support for inheritance-by-restriction in complex types.
-
- * "Type-less content" such as mixed content models, xsd:anyType/
- xsd:anySimpleType, and xsd:any/xsd:anyAttribute is supported
- by forwarding parsing events to a set of "unexpected" hooks.
- Note that only a subset of XML Schema xsd:any functionality is
- supported. The compiler will issue diagnostics for unsupported
- cases. See examples/cxx/parser/mixed for a code sample.
-
-Version 1.4.0
-
- * Number of improvements and bug fixes in the diagnostics code.
-
- * libxsd has been reorganized to provide a clean split of code with
- regards to char/wchar_t use. It should be possible to use libxsd
- and the xsd-generated code on platforms that lack wchar_t support,
- such as mingw.
-
- C++/Tree
-
- * Work around for g++ bug# 23206.
-
- * Support for xsd:list.
-
- * Type/member name conflicts are auto-resolved. Such conflicts
- occur when a type and an element or attribute withing this type
- share the same name.
-
- * XML Schema extension, the 'refType' attribute, allows one to
- specify referenced type for xsd:IDREF and xsd:IDREFS data types.
- See examples/cxx/tree/library for details.
-
- * New option, --morph-anonymous, allows automatic morphing
- of anonymous types to named ones. See the man pages for
- details.
-
- * New option, --namespace-regex-trace, allows one to trace the
- namespace mapping process. See the man pages for details.
-
- * Mapping for optional elements/attributes (cardinality 0..1)
- has changed in a backwards-incompatible way. In the previous
- version you would write:
-
- Bar& bar = ...
-
- if (bar.foo.present ()) // test
- {
- Foo& foo (bar.foo ()); // get
-
- bar.foo (Foo (...)); // set
-
- bar.foo.reset (); // reset
- }
-
- Now you would write it like this:
-
- if (bar.foo ().present ()) // test
- {
- Foo& foo (bar.foo ().get ()); // get
-
- bar.foo (Foo (...)); // set
-
- bar.foo ().reset (); // reset
- }
-
- Or using the pointer notation:
-
- if (bar.foo ()) // test
- {
- Foo& foo (*bar.foo ()); // get
-
- bar.foo (Foo (...)); // set
-
- bar.foo ().reset (); // reset
- }
-
- C++/Parser
-
- * Support for xsd:list.
-
- * Type/member name conflicts are auto-resolved. Such conflicts
- occur when a type and an element or attribute withing this type
- share the same name.
-
- * New option, --namespace-regex-trace, allows one to trace the
- namespace mapping process. See the man pages for details.
-
-Version 1.3.0
-
- * Numerous bug fixes.
-
- * The XML subsystem of libxsd has been reorganized to provide
- a clean split of DOM and SAX functionalities.
-
- C++/Parser
-
- * New option, --morph-anonymous, allows automatic morphing
- of anonymous types to named ones. See the man pages for
- details.
-
- C++/Tree
-
- * Additional parser functions provide support for reading
- from std::istream.
-
-Version 1.2.0
-
- C++/Parser
-
- * New backend that generates the C++/Parser mapping.
-
-Version 1.1.1
-
- all backends
-
- * Bug fixes in the filesystem path handling logic.
-
-Version 1.1.0
-
- C++/Tree
-
- * New option, --generate-serialization, triggers generation of
- serialization functions. Serialization functions convert an in-memory
- representation back to XML.
-
- * xsd::cxx::tree::vector has been extended to closely follow std::vector
- API. This allows you to access and modify element sequences as if they
- were of type std::vector.
-
- * Generated constructors from xml::attribute and xml::element are made
- explicit.
-
- * The library example was extended to showcase modification and
- serialization of the in-memory representation.
-
- * New "XML Schema C++/Tree Mapping Serialization Guide" has an in-depth
- treatment of the serialization mechanisms provided by xsd.
-
-Version 1.0.1
-
- all backends
-
- * Improved diagnostics.
-
- * Bug fixes in the schema inclusion/importing logic.
-
- C++/Tree
-
- * Two new options: --include-with-brackets and --include-prefix
-
-Version 1.0.0
-
- * First public release.
+../NEWS \ No newline at end of file
diff --git a/xsd/PACKAGE-README.md b/xsd/PACKAGE-README.md
new file mode 120000
index 0000000..422e63f
--- /dev/null
+++ b/xsd/PACKAGE-README.md
@@ -0,0 +1 @@
+../PACKAGE-README.md \ No newline at end of file
diff --git a/xsd/README b/xsd/README
deleted file mode 100644
index dc1d4db..0000000
--- a/xsd/README
+++ /dev/null
@@ -1,29 +0,0 @@
-CodeSynthesis XSD is a W3C XML Schema to C++ data binding compiler.
-It generates vocabulary-specific, statically-typed C++ mappings (also
-called bindings) from XML Schema definitions. XSD supports two C++
-mappings: in-memory C++/Tree and event-driven C++/Parser.
-
-The C++/Tree mapping consists of types that represent the given
-vocabulary, a set of parsing functions that convert XML instance
-documents to a tree-like in-memory object model, and a set of
-serialization functions that convert the object model back to XML.
-
-The C++/Parser mapping provides parser templates for data types
-defined in XML Schema. Using these parser templates you can build
-your own in-memory representations or perform immediate processing
-of XML instance documents.
-
-Note also that the xsd executable provides build2 metadata.
-
-See the NEWS file for the user-visible changes from the previous release.
-
-See the LICENSE file for distribution conditions.
-
-See the INSTALL file for prerequisites and installation instructions.
-
-See the doc/ directory for documentation.
-
-The project page is at https://www.codesynthesis.com/projects/xsd/.
-
-Send bug reports or any other feedback to the xsd-users@codesynthesis.com
-mailing list.
diff --git a/xsd/README.md b/xsd/README.md
new file mode 100644
index 0000000..e2b2887
--- /dev/null
+++ b/xsd/README.md
@@ -0,0 +1,12 @@
+# xsd - XML Schema to C++ data binding compiler
+
+XSD is an open-source, cross-platform XML Schema to C++ data binding
+compiler. Provided with an XML document specification (XML Schema), it
+generates C++ classes that represent the given vocabulary as well as XML
+parsing and serialization code. You can then access the data stored in XML
+using types and functions that semantically correspond to your application
+domain rather than dealing with generic elements/attributes and raw strings.
+
+For further information, including licensing conditions, documentation, and
+binary packages, refer to the [XSD project
+page](https://codesynthesis.com/products/xsd/).
diff --git a/xsd/build/root.build b/xsd/build/root.build
index 4407c3e..cf9d6a6 100644
--- a/xsd/build/root.build
+++ b/xsd/build/root.build
@@ -3,6 +3,8 @@
config [bool] config.xsd.develop ?= false
+develop = $config.xsd.develop
+
define cli: file
cli{*}: extension = cli
@@ -21,7 +23,7 @@ if ($cxx.target.system == 'win32-msvc')
cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
if ($cxx.class == 'msvc')
- cxx.coptions += /wd4251 /wd4275 /wd4800 /wd4819
+ cxx.coptions += /wd4251 /wd4275 /wd4800
cxx.poptions =+ "-I$out_root" "-I$src_root"
@@ -29,6 +31,7 @@ cxx.poptions =+ "-I$out_root" "-I$src_root"
#
# Note that cat is a builtin which means this is both portable and fast.
#
-copyright = $process.run_regex(cat $src_root/LICENSE, \
- 'Copyright \(c\) (.+)\.', \
- '\1')
+if ($build.mode != 'skeleton')
+ copyright = $process.run_regex(cat $src_root/LICENSE, \
+ 'Copyright \(c\) (.+)\.', \
+ '\1')
diff --git a/xsd/buildfile b/xsd/buildfile
index 298d3ce..b0121dd 100644
--- a/xsd/buildfile
+++ b/xsd/buildfile
@@ -1,8 +1,11 @@
# file : buildfile
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-./: {*/ -build/} doc{INSTALL NEWS README} legal{GPLv2 LICENSE FLOSSE} manifest
+./: {*/ -build/} \
+ doc{README.md PACKAGE-README.md NEWS} \
+ legal{GPLv2 LICENSE FLOSSE} \
+ manifest
-# Don't install the INSTALL file.
+# Don't install tests.
#
-doc{INSTALL}@./: install = false
+tests/: install = false
diff --git a/xsd/doc/.gitignore b/xsd/doc/.gitignore
index 7ae560f..19b80b4 100644
--- a/xsd/doc/.gitignore
+++ b/xsd/doc/.gitignore
@@ -1,2 +1,5 @@
-xsd.1
-xsd.xhtml
+/xsd.1
+/xsd.xhtml
+
+*.ps
+*.pdf
diff --git a/xsd/doc/buildfile b/xsd/doc/buildfile
index b15831a..271d17e 100644
--- a/xsd/doc/buildfile
+++ b/xsd/doc/buildfile
@@ -25,172 +25,271 @@ png{*}: extension = png
define svg: file
svg{*}: extension = svg
-import! [metadata] cli = cli%exe{cli}
+./: css{default} xsd{custom-literals} {png svg}{**}
-# Import the html2ps and ps2pdf14 programs only if present on the system. This
-# way a distribution that includes pre-generated files can be built without
-# installing these programs.
+# Note: doc_version is also used in the man pages and the manual.
#
-import? html2ps = html2ps%exe{html2ps}
-import? ps2pdf14 = ps2pdf14%exe{ps2pdf14}
+doc_version = [string] "$version.major.$version.minor.$version.patch"
+if $version.pre_release
+ doc_version += "-$version.pre_release_string"
-if $config.xsd.develop
-{
- if ($html2ps == [null] || $ps2pdf14 == [null])
- warn "html2ps and/or ps2pdf14 are not available, not generating .ps and .pdf documentation"
-}
+# Man pages.
+#
-./: xsd{custom-literals}
+## Consumption build ($develop == false).
+#
-# Generate the man pages.
+# Use pregenerated versions in the consumption build.
#
-ops = $(src_root)/xsd/cxx/cli{options tree/options parser/options}
+./: pregenerated/{man1 xhtml}{*}: include = (!$develop)
-doc_version = [string] "$version.major\.$version.minor\.$version.patch"
-if $version.pre_release
- doc_version += "-$version.pre_release_string"
+# Distribute pregenerated versions only in the consumption build.
+#
+pregenerated/{man1 xhtml}{*}: dist = (!$develop)
-# Let's take the last for-digit number to cover 2000-2021,2022.
#
-doc_year = $regex.replace($copyright, '.+[-, ]([0-9][0-9][0-9][0-9]) .+', '\1')
+##
-man_options = -v project="XSD" \
- -v version="$doc_version" \
- -v copyright="$copyright" \
- -I $src_root \
- --stdout \
- --suppress-undocumented \
- --exclude-base
+## Development build ($develop == true).
+#
+./: {man1 xhtml}{xsd}: include = $develop
-# Note: *logue and *-header are not real man pages.
-#
-./: man1{xsd}: $ops \
- file{xsd-prologue.1 \
- xsd-tree-header.1 \
- xsd-parser-header.1 \
- xsd-epilogue.1} \
- $cli
+if $develop
{
- dist = true # Include into the distribution for user's convenience.
+ # Let's take the last four-digit number to cover 2000-2021,2022.
+ #
+ doc_year = $regex.replace($copyright, '.+[-, ]([0-9][0-9][0-9][0-9]) .+', '\1')
+
+ man_options = -v project="XSD" \
+ -v version="$doc_version" \
+ -v copyright="$copyright" \
+ -I $src_root \
+ --stdout \
+ --suppress-undocumented \
+ --exclude-base
+
+ import! [metadata] cli = cli%exe{cli}
}
+
+# In the development build distribute regenerated versions, remapping their
+# locations to the paths of the pregenerated versions (which are only
+# distributed in the consumption build; see above). This way we make sure that
+# the distributed files are always up-to-date.
+#
+{man1 xhtml}{xsd}: dist = ($develop ? pregenerated/ : false)
+
+ops = ../xsd/cli{options cxx/options cxx/tree/options cxx/parser/options}
+
+man1{xsd}: $ops \
+ file{xsd-prologue.1 \
+ xsd-tree-header.1 \
+ xsd-parser-header.1 \
+ xsd-epilogue.1} \
+ $cli
+%
+if $develop
{{
- diag cli --man ($<[0])
+ o = $path($>)
# Use the copyright year to approximate the last authoring date.
#
- $cli --generate-man -v date="January $doc_year" \
- $man_options \
- --class CXX::options \
- --class options \
- --man-prologue-file $path($<[3]) \
- $path($<[0]) >$path($>)
-
- $cli --generate-man -v date="January $doc_year" \
- $man_options \
- --man-prologue-file $path($<[4]) \
- $path($<[1]) >>$path($>)
-
- $cli --generate-man -v date="January $doc_year" \
- $man_options \
- --man-prologue-file $path($<[5]) \
- --man-epilogue-file $path($<[6]) \
- $path($<[2]) >>$path($>)
+ $cli --generate-man $man_options \
+ -v date="January $doc_year" \
+ --class CXX::options \
+ --class options \
+ --man-prologue-file $path($<[4]) \
+ $path($<[1]) >$o
+
+ $cli --generate-man $man_options \
+ -v date="January $doc_year" \
+ --man-prologue-file $path($<[5]) \
+ $path($<[2]) >>$o
+
+ $cli --generate-man $man_options \
+ -v date="January $doc_year" \
+ --man-prologue-file $path($<[6]) \
+ --man-epilogue-file $path($<[7]) \
+ $path($<[3]) >>$o
+
+ # If the result differs from the pregenerated version, copy it over.
+ #
+ if! diff $src_base/pregenerated/xsd.1 $o >-
+ cp $o $src_base/pregenerated/xsd.1
+ end
}}
-# Note: *logue and *-header are not real xhtml files.
-#
-./: xhtml{xsd}: $ops \
- file{xsd-prologue.xhtml \
- xsd-tree-header.xhtml \
- xsd-parser-header.xhtml \
- xsd-epilogue.xhtml} \
- css{*} \
- $cli
-{
- dist = true
-}
+xhtml{xsd}: $ops \
+ file{xsd-prologue.xhtml \
+ xsd-tree-header.xhtml \
+ xsd-parser-header.xhtml \
+ xsd-epilogue.xhtml} \
+ $cli
+%
+if $develop
{{
- diag cli --html ($<[0])
-
- $cli --generate-html -v date="January $doc_year" \
- $man_options \
- --class CXX::options \
- --class options \
- --html-prologue-file $path($<[3]) \
- $path($<[0]) >$path($>)
-
- $cli --generate-html -v date="January $doc_year" \
- $man_options \
- --html-prologue-file $path($<[4]) \
- $path($<[1]) >>$path($>)
-
- $cli --generate-html -v date="January $doc_year" \
- $man_options \
- --html-prologue-file $path($<[5]) \
- --html-epilogue-file $path($<[6]) \
- $path($<[2]) >>$path($>)
+ o = $path($>)
+
+ $cli --generate-html $man_options \
+ -v date="January $doc_year" \
+ --class CXX::options \
+ --class options \
+ --html-prologue-file $path($<[4]) \
+ $path($<[1]) >$o
+
+ $cli --generate-html $man_options \
+ -v date="January $doc_year" \
+ --html-prologue-file $path($<[5]) \
+ $path($<[2]) >>$o
+
+ $cli --generate-html $man_options \
+ -v date="January $doc_year" \
+ --html-prologue-file $path($<[6]) \
+ --html-epilogue-file $path($<[7]) \
+ $path($<[3]) >>$o
+
+ if! diff $src_base/pregenerated/xsd.xhtml $o >-
+ cp $o $src_base/pregenerated/xsd.xhtml
+ end
}}
-# Generate the user guide/manual ps/pdf files if the html2ps and ps2pdf14
-# programs are imported and handle (install, distribute, etc) the
-# pre-generated files otherwise, if present.
#
-for d: cxx/parser/guide/ cxx/tree/guide/ cxx/tree/manual/
-{
- p = "([dir_path] $path.leaf($path.directory($d)))" # parser, tree
- l = "([dir_path] $path.leaf($d))" # guide, manual
- f = "cxx-$p-$l" # cxx-parser-guide, etc
+##
+
+# Manuals/guides.
+#
+# This case is slightly more involved because we make the generation of the
+# manuals/guides ps/pdf files optional and also don't keep the result in the
+# repository. Specifically:
+#
+# 1. In the consumption build we will install/redistribute ps/pdf if present.
+#
+# 2. In the development build we will generate ps/pdf if we are able to import
+# the needed tools, issuing a warning otherwise.
+#
+# 3. We generate manuals/guides xhtml files from the templates and distribute
+# them.
- ./: $d/{png svg}{*}
+manuals = cxx/parser/guide/index cxx/tree/guide/index cxx/tree/manual/index
- ./: $d/xhtml{index}: $d/in{index}
+for m: $manuals
+{
+ ./: xhtml{$m}: in{$m}
{
in.symbol = '@'
dist = true
clean = ($src_root != $out_root)
}
+}
- if ($html2ps != [null] && $ps2pdf14 != [null])
+## Consumption build ($develop == false).
+#
+
+# Use pregenerated versions, if exist, in the consumption build.
+#
+./: pregenerated/{ps pdf}{**}: include = (!$develop)
+
+# Distribute pregenerated versions only in the consumption build.
+#
+pregenerated/{ps pdf}{*}: dist = (!$develop)
+
+#
+##
+
+## Development build ($develop == true).
+#
+
+html2pdf = false
+
+if $develop
+{
+ # Import the html2ps and ps2pdf programs from the system, if available.
+ #
+ import? html2ps = html2ps%exe{html2ps}
+ import? ps2pdf = ps2pdf14%exe{ps2pdf14}
+
+ html2pdf = ($html2ps != [null] && $ps2pdf != [null])
+
+ if! $html2pdf
+ warn "html2ps and/or ps2pdf14 are not available, not generating .ps and .pdf documentation"
+}
+
+for m: $manuals
+{
+ d = $directory($m) # cxx/parser/guide/, etc
+ p = "$leaf($directory($d))" # parser, tree
+ l = "$leaf($d)" # guide, manual
+ f = "cxx-$p-$l" # cxx-parser-guide, etc
+
+ pf = $d/$f # cxx/parser/guide/cxx-parser-guide, etc
+ cf = $d/$l # cxx/parser/guide/guide, etc
+
+ ./: {ps pdf}{$pf}: include = $html2pdf
+
+ # In the development build distribute regenerated versions, remapping their
+ # locations to the paths of the pregenerated versions (which are only
+ # distributed in the consumption build; see above). This way we make sure
+ # that the distributed files are always up-to-date.
+ #
+ {ps pdf}{$pf}: \
+ dist = ($html2pdf ? $relative([dir_path] "pregenerated/$d", $d) : false)
+
+ pdf{$pf}: ps{$pf}: xhtml{$m} html2ps{$cf}
+
+ html2ps{$cf}: in{$cf}
{
- # Note that we include these generated files into the distribution and
- # don't remove them when cleaning in src (so that clean results in a state
- # identical to distributed).
- #
- ./: $d/ps{$f}: $d/xhtml{index} $d/html2ps{$l} $html2ps
- {
- base = $src_base/$d
-
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag html2ps ($<[0])
-
- # Note: --base must include trailing directory separator.
- #
- $html2ps --base $base -f $path($<[1]) -o $path($>) $path($<[0])
- }}
-
- ./: $d/pdf{$f}: $d/ps{$f} $ps2pdf14
- {
- dist = true
- clean = ($src_root != $out_root)
- }
- {{
- diag ps2pdf14 ($<[0])
-
- $ps2pdf14 -dOptimize=true -dEmbedAllFonts=true $path($<[0]) $path($>)
- }}
-
- $d/html2ps{$l}: $d/in{$l}
- {
- in.symbol = '@'
- }
+ in.symbol = '@'
}
- else
- ./: $d/{ps pdf}{+$f} $d/file{$l.html2ps.in}
}
-doc{*}: install.subdirs = true
+# Note: the pregenerated file may not exist, thus --no-cleanup option is
+# required for the mkdir and cp builtin calls. Strictly speaking we don't
+# really need to copy them since they are not stored in the repository, but
+# let's do that for consistency with the distributed source tree.
+#
+ps{~'/cxx-.+-(.+)/'}: xhtml{~'/index/'} html2ps{~'/\1/'} $html2ps
+%
+if $html2pdf
+{{
+ # cxx/parser/guide/, etc
+ #
+ d = [dir_path] $leaf($directory($path($>[0])), $out_base)
+
+ # Note: --base must include trailing directory separator.
+ #
+ options = --base $src_base/$d
+
+ diag html2ps ($<[0]) -> $>
+ $html2ps $options -f $path($<[1]) -o $path($>) $path($<[0])
+
+ # Note: must include trailing directory separator (see cp for details).
+ #
+ d = $src_base/pregenerated/$d
+
+ mkdir -p --no-cleanup $d
+ cp --no-cleanup $path($>) $d
+}}
+
+pdf{~'/(cxx-.+-.+)/'}: ps{~'/\1/'} $ps2pdf
+%
+if $html2pdf
+{{
+ options = -dOptimize=true -dEmbedAllFonts=true
+
+ diag ps2pdf ($<[0]) -> $>
+ $ps2pdf $options $path($<[0]) $path($>)
+
+ # Note: must include trailing directory separator (see cp for details).
+ #
+ d = $src_base/pregenerated/$leaf($directory($path($>[0])), $out_base)
+
+ mkdir -p --no-cleanup $d
+ cp --no-cleanup $path($>) $d
+}}
+
+#
+##
+
+doc{*}: install.subdirs = true
+pregenerated/doc{*}: install.subdirs = true
diff --git a/xsd/doc/cxx/.gitignore b/xsd/doc/cxx/.gitignore
index 239cc7f..45f6b1e 100644
--- a/xsd/doc/cxx/.gitignore
+++ b/xsd/doc/cxx/.gitignore
@@ -1,2 +1,2 @@
-*.ps
-*.pdf
+*.xhtml
+*.html2ps
diff --git a/xsd/doc/cxx/parser/guide/.gitignore b/xsd/doc/cxx/parser/guide/.gitignore
deleted file mode 100644
index 17828e9..0000000
--- a/xsd/doc/cxx/parser/guide/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-index.xhtml
-guide.html2ps
diff --git a/xsd/doc/cxx/parser/guide/index.xhtml.in b/xsd/doc/cxx/parser/guide/index.xhtml.in
index 96d06e2..119f421 100644
--- a/xsd/doc/cxx/parser/guide/index.xhtml.in
+++ b/xsd/doc/cxx/parser/guide/index.xhtml.in
@@ -553,7 +553,7 @@
</p>
<pre class="terminal">
-$ xsd cxx-parser --std c++11 --xml-parser expat hello.xsd
+$ xsd cxx-parser --xml-parser expat hello.xsd
</pre>
<p>The <code>--xml-parser</code> option indicates that we want to
@@ -1494,7 +1494,7 @@ gender ::gender ::gender;
option to let the XSD compiler know about our type map:</p>
<pre class="terminal">
-$ xsd cxx-parser --std c++11 --type-map people.map people.xsd
+$ xsd cxx-parser --type-map people.map people.xsd
</pre>
<p>If we now look at the generated <code>people-pskel.hxx</code>,
@@ -1673,10 +1673,10 @@ namespace http://www.w3.org/2001/XMLSchema
QName xml_schema::qname;
- base64Binary std::[auto|unique]_ptr&lt;xml_schema::buffer>
- std::[auto|unique]_ptr&lt;xml_schema::buffer>;
- hexBinary std::[auto|unique]_ptr&lt;xml_schema::buffer>
- std::[auto|unique]_ptr&lt;xml_schema::buffer>;
+ base64Binary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
+ hexBinary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
date xml_schema::date;
dateTime xml_schema::date_time;
@@ -1742,8 +1742,7 @@ people ::people;
recompile our schema and move on to implementing the parsers:</p>
<pre class="terminal">
-$ xsd cxx-parser --std c++11 --xml-parser expat --type-map people.map \
- people.xsd
+$ xsd cxx-parser --xml-parser expat --type-map people.map people.xsd
</pre>
<p>Here is the implementation of our three parsers in full. One
@@ -2608,14 +2607,14 @@ private:
<tr>
<td><code>base64Binary</code></td>
<td><code>base64_binary_pimpl</code></td>
- <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
+ <td><code>std::[unique|auto]_ptr&lt; xml_schema::buffer></code><br/>
<a href="#6.3">Section 6.3, "<code>base64Binary</code> and
<code>hexBinary</code> Parsers"</a></td>
</tr>
<tr>
<td><code>hexBinary</code></td>
<td><code>hex_binary_pimpl</code></td>
- <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
+ <td><code>std::[unique|auto]_ptr&lt; xml_schema::buffer></code><br/>
<a href="#6.3">Section 6.3, "<code>base64Binary</code> and
<code>hexBinary</code> Parsers"</a></td>
</tr>
diff --git a/xsd/doc/cxx/tree/guide/.gitignore b/xsd/doc/cxx/tree/guide/.gitignore
deleted file mode 100644
index 17828e9..0000000
--- a/xsd/doc/cxx/tree/guide/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-index.xhtml
-guide.html2ps
diff --git a/xsd/doc/cxx/tree/guide/index.xhtml.in b/xsd/doc/cxx/tree/guide/index.xhtml.in
index b704e50..2f7f1e2 100644
--- a/xsd/doc/cxx/tree/guide/index.xhtml.in
+++ b/xsd/doc/cxx/tree/guide/index.xhtml.in
@@ -536,7 +536,7 @@
</p>
<pre class="terminal">
-$ xsd cxx-tree --std c++11 hello.xsd
+$ xsd cxx-tree hello.xsd
</pre>
<p>The XSD compiler produces two C++ files: <code>hello.hxx</code> and
@@ -633,7 +633,7 @@ hello (std::istream&amp;);
select C++98:</p>
<pre class="terminal">
-$ xsd cxx-tree hello.xsd
+$ xsd cxx-tree --std c++98 hello.xsd
</pre>
<p>Then the parsing function signatures will become:</p>
@@ -726,7 +726,7 @@ Hello, world!
it with the <code>--generate-serialization</code> options:</p>
<pre class="terminal">
-$ xsd cxx-tree --std c++11 --generate-serialization hello.xsd
+$ xsd cxx-tree --generate-serialization hello.xsd
</pre>
<p>If we now examine the generated <code>hello.hxx</code> file,
@@ -911,7 +911,7 @@ main (int argc, char* argv[])
change the type naming scheme:</p>
<pre class="terminal">
-$ xsd cxx-tree --std c++11 --type-naming ucc hello.xsd
+$ xsd cxx-tree --type-naming ucc hello.xsd
</pre>
<p>The <code>ucc</code> argument to the <code>--type-naming</code>
@@ -978,8 +978,7 @@ hello (std::istream&amp;);
<code>--type-regex</code> option:</p>
<pre class="terminal">
-$ xsd cxx-tree --std c++11 --type-naming ucc \
- --type-regex '/ (.+)_t/\u$1/' hello.xsd
+$ xsd cxx-tree --type-naming ucc --type-regex '/ (.+)_t/\u$1/' hello.xsd
</pre>
<p>This results in the following changes to the generated code:</p>
@@ -1114,8 +1113,7 @@ hello (std::istream&amp;);
our schema with the <code>--generate-doxygen</code> option:</p>
<pre class="terminal">
-$ xsd cxx-tree --std c++11 --generate-serialization --generate-doxygen \
- hello.xsd
+$ xsd cxx-tree --generate-serialization --generate-doxygen hello.xsd
</pre>
<p>Now the generated <code>hello.hxx</code> file contains comments
diff --git a/xsd/doc/cxx/tree/manual/.gitignore b/xsd/doc/cxx/tree/manual/.gitignore
deleted file mode 100644
index 39e8d48..0000000
--- a/xsd/doc/cxx/tree/manual/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-index.xhtml
-manual.html2ps
diff --git a/xsd/doc/cxx/tree/manual/index.xhtml.in b/xsd/doc/cxx/tree/manual/index.xhtml.in
index 5a7240a..5274229 100644
--- a/xsd/doc/cxx/tree/manual/index.xhtml.in
+++ b/xsd/doc/cxx/tree/manual/index.xhtml.in
@@ -8,7 +8,7 @@
<meta name="copyright" content="&#169; @copyright@"/>
<meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,tree,serialization,guide,manual,examples"/>
<meta name="description" content="C++/Tree Mapping User Manual"/>
- <meta name="revision" content="4.1.0"/>
+ <meta name="revision" content="@doc_version@"/>
<link rel="stylesheet" type="text/css" href="../../../default.css" />
@@ -441,9 +441,9 @@
called C++/Tree.
</p>
- <p>Revision 4.1.0<br/> <!-- Remember to change revision in other places -->
+ <p>Revision @doc_version@<br/>
This revision of the manual describes the C++/Tree
- mapping as implemented by CodeSynthesis XSD version 4.1.0.
+ mapping as implemented by CodeSynthesis XSD version @doc_version@.
</p>
<p>This document is available in the following formats:
diff --git a/xsd/doc/pregenerated/xsd.1 b/xsd/doc/pregenerated/xsd.1
new file mode 100644
index 0000000..580ac78
--- /dev/null
+++ b/xsd/doc/pregenerated/xsd.1
@@ -0,0 +1,1500 @@
+.\" Process this file with
+.\" groff -man -Tascii xsd.1
+.\"
+.TH XSD 1 "January 2023" "XSD 4.2.1-a.0"
+.SH NAME
+xsd \- W3C XML Schema to C++ Compiler
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH SYNOPSIS
+.\"--------------------------------------------------------------------
+.B xsd
+.I command
+.B [
+.I options
+.B ]
+.I file
+.B [
+.I file
+.B ...]
+.in
+.B xsd help
+.B [
+.I command
+.B ]
+.in
+.B xsd version
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH DESCRIPTION
+.\"--------------------------------------------------------------------
+.B xsd
+generates vocabulary-specific, statically-typed C++ mapping from W3C XML
+Schema definitions. Particular mapping to produce is selected by a
+.IR command .
+Each mapping has a number of mapping-specific
+.I options
+that should appear, if any, after the
+.IR command .
+Input files should be W3C XML Schema definitions. The exact set of the
+generated files depends on the selected mapping and options.
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH COMMANDS
+.\"--------------------------------------------------------------------
+.IP \fBcxx-tree\fR
+Generate the C++/Tree mapping. For each input file in the form
+.B name.xsd
+the following C++ files are generated:
+.B name.hxx
+(header file),
+.B name.ixx
+(inline file, generated only if the
+.B --generate-inline
+option is specified),
+.B name.cxx
+(source file), and
+.B name-fwd.hxx
+(forward declaration file, generated only if the
+.B --generate-forward
+option is specified).
+
+.IP \fBcxx-parser\fR
+Generate the C++/Parser mapping. For each input file in the form
+.B name.xsd
+the following C++ files are generated:
+.B name-pskel.hxx
+(parser skeleton header file),
+.B name-pskel.ixx
+(parser skeleton inline file, generated only if the
+.B --generate-inline
+option is specified), and
+.B name-pskel.cxx
+(parser skeleton source file). If the
+.B --generate-noop-impl
+or
+.B --generate-print-impl
+option is specified, the following additional sample implementation files
+are generated:
+.B name-pimpl.hxx
+(parser implementation header file) and
+.B name-pimpl.cxx
+(parser implementation source file). If the
+.B --generate-test-driver
+option is specified, the additional
+.B name-driver.cxx
+test driver file is generated.
+
+.IP \fBhelp\fR
+Print usage information and exit. Use
+.PP
+.RS
+.RS 3
+.B xsd help
+.I command
+.RE
+.PP
+for command-specific help.
+.RE
+.IP \fBversion\fR
+Print version and exit.
+.\"--------------------------------------------------------------------
+.SH OPTIONS
+.\"--------------------------------------------------------------------
+Command-specific
+.IR options ,
+if any, should appear after the corresponding
+.IR command .
+
+.\"
+.\" Common options.
+.\"
+.SS common options
+.
+.IP "\fB--std\fR \fIversion\fR"
+Specify the C++ standard that the generated code should conform to\. Valid
+values are \fBc++98\fR, \fBc++11\fR (default), \fBc++14\fR, \fBc++17\fR,
+\fBc++20\fR, and \fBc++23\fR\.
+
+The C++ standard affects various aspects of the generated code that are
+discussed in more detail in various mapping-specific documentation\. Overall,
+when C++11 is selected, the generated code relies on the move semantics and
+uses \fBstd::unique_ptr\fR instead of deprecated \fBstd::auto_ptr\fR\.
+Currently, there is no difference between the C++11 and the later standards
+modes\.
+
+When the C++11 mode is selected, you normally don't need to perform any extra
+steps other than enable C++11 in your C++ compiler, if required\. The XSD
+compiler will automatically add the necessary macro defines to the generated
+header files that will switch the header-only XSD runtime library
+(\fBlibxsd\fR) to the C++11 mode\. However, if you include any of the XSD
+runtime headers directly in your application (normally you just include the
+generated headers), then you will need to define the \fBXSD_CXX11\fR macro for
+your entire project\.
+.IP "\fB--char-type\fR \fItype\fR"
+Generate code using the provided character \fItype\fR instead of the default
+\fBchar\fR\. Valid values are \fBchar\fR and \fBwchar_t\fR\.
+.IP "\fB--char-encoding\fR \fIenc\fR"
+Specify the character encoding that should be used in the generated code\.
+Valid values for the \fBchar\fR character type are \fButf8\fR (default),
+\fBiso8859-1\fR, \fBlcp\fR (Xerces-C++ local code page), and \fBcustom\fR\. If
+you pass \fBcustom\fR as the value then you will need to include the
+transcoder implementation header for your encoding at the beginning of the
+generated header files (see the \fB--hxx-prologue\fR option)\.
+
+For the \fBwchar_t\fR character type the only valid value is \fBauto\fR and
+the encoding is automatically selected between UTF-16 and UTF-32/UCS-4,
+depending on the \fBwchar_t\fR type size\.
+.IP "\fB--output-dir\fR \fIdir\fR"
+Write generated files to \fIdir\fR instead of the current directory\.
+.IP "\fB--generate-inline\fR"
+Generate simple functions inline\. This option triggers creation of the inline
+file\.
+.IP "\fB--generate-xml-schema\fR"
+Generate a C++ header file as if the schema being compiled defines the XML
+Schema namespace\. For the C++/Tree mapping, the resulting file will contain
+definitions for all XML Schema built-in types\. For the C++/Parser mapping,
+the resulting file will contain definitions for all the parser skeletons and
+implementations corresponding to the XML Schema built-in types\.
+
+The schema file provided to the compiler need not exist and is only used to
+derive the name of the resulting header file\. Use the
+\fB--extern-xml-schema\fR option to include this file in the generated files
+for other schemas\.
+.IP "\fB--extern-xml-schema\fR \fIfile\fR"
+Include a header file derived from \fIfile\fR instead of generating the XML
+Schema namespace mapping inline\. The provided file need not exist and is only
+used to derive the name of the included header file\. Use the
+\fB--generate-xml-schema\fR option to generate this header file\.
+.IP "\fB--namespace-map\fR \fIxns\fR=\fIcns\fR"
+Map XML Schema namespace \fIxns\fR to C++ namespace \fIcns\fR\. Repeat this
+option to specify mapping for more than one XML Schema namespace\. For
+example, the following option:
+
+\fB--namespace-map http://example\.com/foo/bar=foo::bar\fR
+
+Will map the \fBhttp://example\.com/foo/bar\fR XML Schema namespace to the
+\fBfoo::bar\fR C++ namespace\.
+.IP "\fB--namespace-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema namespace names to C++ namespace names\. \fIregex\fR is a Perl-like
+regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any character can be
+used as a delimiter instead of '\fB/\fR'\. Escaping of the delimiter character
+in \fIpattern\fR or \fIreplacement\fR is not supported\.
+
+All the regular expressions are pushed into a stack with the last specified
+expression considered first\. The first match that succeeds is used\. Regular
+expressions are applied to a string in the form
+
+\fIfilename\fR \fInamespace\fR\fR
+
+For example, if you have file \fBhello\.xsd\fR with namespace
+\fBhttp://example\.com/hello\fR and you run \fBxsd\fR on this file, then the
+string in question will be:
+
+\fBhello\.xsd\. http://example\.com/hello\fR
+
+For the built-in XML Schema namespace the string is:
+
+\fBXMLSchema\.xsd http://www\.w3\.org/2001/XMLSchema\fR
+
+The following three steps are performed for each regular expression until the
+match is found:
+
+1\. The expression is applied and if the result is empty the next expression
+is considered\.
+
+2\. All '\fB/\fR' are replaced with '\fB::\fR'\.
+
+3\. The result is verified to be a valid C++ scope name (e\.g\.,
+\fBfoo::bar\fR)\. If this test succeeds, the result is used as a C++ namespace
+name\.
+
+As an example, the following expression maps XML Schema namespaces in the
+form \fBhttp://example\.com/foo/bar\fR to C++ namespaces in the form
+\fBfoo::bar\fR:
+
+\fB%\.* http://example\.com/(\.+)%$1%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--namespace-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--namespace-regex\fR option\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--reserved-name\fR \fIn\fR[=\fIr\fR]"
+Add name \fIn\fR to the list of names that should not be used as identifiers\.
+The name can optionally be followed by \fB=\fR and the replacement name
+\fIr\fR that should be used instead\. All the C++ keywords are already in this
+list\.
+.IP "\fB--include-with-brackets\fR"
+Use angle brackets (<>) instead of quotes ("") in generated \fB#include\fR
+directives\.
+.IP "\fB--include-prefix\fR \fIprefix\fR"
+Add \fIprefix\fR to generated \fB#include\fR directive paths\.
+
+For example, if you had the following import element in your schema
+
+\fB<import namespace="\.\.\." schemaLocation="base\.xsd"/>\fR
+
+and compiled this fragment with \fB--include-prefix schemas/\fR, then the
+include directive in the generated code would be:
+
+\fB#include "schemas/base\.hxx"\fR
+.IP "\fB--include-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to transform
+\fB#include\fR directive paths\. \fIregex\fR is a Perl-like regular expression
+in the form \fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any
+character can be used as a delimiter instead of '\fB/\fR'\. Escaping of the
+delimiter character in \fIpattern\fR or \fIreplacement\fR is not supported\.
+
+All the regular expressions are pushed into a stack with the last specified
+expression considered first\. The first match that succeeds is used\.
+
+As an example, the following expression transforms paths in the form
+\fBschemas/foo/bar\fR to paths in the form \fBgenerated/foo/bar\fR:
+
+\fB%schemas/(\.+)%generated/$1%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--include-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--include-regex\fR option\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--guard-prefix\fR \fIprefix\fR"
+Add \fIprefix\fR to generated header inclusion guards\. The prefix is
+transformed to upper case and characters that are illegal in a preprocessor
+macro name are replaced with underscores\. If this option is not specified
+then the directory part of the input schema file is used as a prefix\.
+.IP "\fB--hxx-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB\.hxx\fR to construct
+the name of the header file\. Note that this suffix is also used to construct
+names of header files corresponding to included/imported schemas\.
+.IP "\fB--ixx-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB\.ixx\fR to construct
+the name of the inline file\.
+.IP "\fB--cxx-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB\.cxx\fR to construct
+the name of the source file\.
+.IP "\fB--fwd-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB-fwd\.hxx\fR to
+construct the name of the forward declaration file\.
+.IP "\fB--hxx-regex\fR \fIregex\fR"
+Use the provided expression to construct the name of the header file\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Note that this
+expression is also used to construct names of header files corresponding to
+included/imported schemas\. See also the REGEX AND SHELL QUOTING section
+below\.
+.IP "\fB--ixx-regex\fR \fIregex\fR"
+Use the provided expression to construct the name of the inline file\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. See also the REGEX
+AND SHELL QUOTING section below\.
+.IP "\fB--cxx-regex\fR \fIregex\fR"
+Use the provided expression to construct the name of the source file\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. See also the REGEX
+AND SHELL QUOTING section below\.
+.IP "\fB--fwd-regex\fR \fIregex\fR"
+Use the provided expression to construct the name of the forward declaration
+file\. \fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. See also the REGEX
+AND SHELL QUOTING section below\.
+.IP "\fB--hxx-prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of the header file\.
+.IP "\fB--ixx-prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of the inline file\.
+.IP "\fB--cxx-prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of the source file\.
+.IP "\fB--fwd-prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of the forward declaration file\.
+.IP "\fB--prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of each generated file for which there is
+no file-specific prologue\.
+.IP "\fB--hxx-epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of the header file\.
+.IP "\fB--ixx-epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of the inline file\.
+.IP "\fB--cxx-epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of the source file\.
+.IP "\fB--fwd-epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of the forward declaration file\.
+.IP "\fB--epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of each generated file for which there is no
+file-specific epilogue\.
+.IP "\fB--hxx-prologue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the beginning of the header file\.
+.IP "\fB--ixx-prologue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the beginning of the inline file\.
+.IP "\fB--cxx-prologue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the beginning of the source file\.
+.IP "\fB--fwd-prologue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the beginning of the forward
+declaration file\.
+.IP "\fB--prologue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the beginning of each generated file
+for which there is no file-specific prologue file\.
+.IP "\fB--hxx-epilogue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the end of the header file\.
+.IP "\fB--ixx-epilogue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the end of the inline file\.
+.IP "\fB--cxx-epilogue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the end of the source file\.
+.IP "\fB--fwd-epilogue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the end of the forward declaration
+file\.
+.IP "\fB--epilogue-file\fR \fIfile\fR"
+Insert the content of the \fIfile\fR at the end of each generated file for
+which there is no file-specific epilogue file\.
+.IP "\fB--export-symbol\fR \fIsymbol\fR"
+Insert \fIsymbol\fR in places where DLL export/import control statements
+(\fB__declspec(dllexport/dllimport)\fR) are necessary\.
+.IP "\fB--export-xml-schema\fR"
+Export/import types in the XML Schema namespace using the export symbol
+provided with the \fB--export-symbol\fR option\. The \fBXSD_NO_EXPORT\fR macro
+can be used to omit this code during C++ compilation, which may be useful if
+you would like to use the same generated code across multiple platforms\.
+.IP "\fB--export-maps\fR"
+Export polymorphism support maps from a Win32 DLL into which this generated
+code is placed\. This is necessary when your type hierarchy is split across
+several DLLs since otherwise each DLL will have its own set of maps\. In this
+situation the generated code for the DLL which contains base types and/or
+substitution group heads should be compiled with this option and the generated
+code for all other DLLs should be compiled with \fB--import-maps\fR\. This
+option is only valid together with \fB--generate-polymorphic\fR\. The
+\fBXSD_NO_EXPORT\fR macro can be used to omit this code during C++
+compilation, which may be useful if you would like to use the same generated
+code across multiple platforms\.
+.IP "\fB--import-maps\fR"
+Import polymorphism support maps to a Win32 DLL or executable into which this
+generated code is linked\. See the \fB--export-maps\fR option documentation
+for details\. This options is only valid together with
+\fB--generate-polymorphic\fR\. The \fBXSD_NO_EXPORT\fR macro can be used to
+omit this code during C++ compilation, which may be useful if you would like
+to use the same generated code across multiple platforms\.
+.IP "\fB--generate-dep\fR"
+Generate \fBmake\fR dependency information\. This option triggers the creation
+of the \fB\.d\fR file containing the dependencies of the generated files on
+the main schema file as well as all the schema files that it includes/imports,
+transitively\. This dependency file is then normally included into the main
+\fBmakefile\fR to implement automatic dependency tracking\. See also the
+\fB--dep-*\fR options\.
+
+Note also that automatic dependency generation is not supported in the
+file-per-type mode (\fB--file-per-type\fR)\. In this case, all the generated
+files are produced with a single compiler invocation and depend on all the
+schemas\. As a result, it is easier to establish such a dependency manually,
+perhaps with the help of the \fB--file-list*\fR options\.
+.IP "\fB--generate-dep-only\fR"
+Generate \fBmake\fR dependency information only\.
+.IP "\fB--dep-phony\fR"
+Generate phony targets for included/imported schema files, causing each to
+depend on nothing\. Such dummy rules work around \fBmake\fR errors caused by
+the removal of schema files without also updating the dependency file to
+match\.
+.IP "\fB--dep-target\fR \fItarget\fR"
+Change the target of the dependency rule\. By default it contains all the
+generated C++ files as well as the dependency file itself, without any
+directory prefixes\. If you require multiple targets, then you can specify
+them as a single, space-separated argument or you can repeat this option
+multiple times\.
+.IP "\fB--dep-suffix\fR \fIsuffix\fR"
+Use \fIsuffix\fR instead of the default \fB\.d\fR to construct the name of the
+dependency file\. See also \fB--dep-file\fR\.
+.IP "\fB--dep-file\fR \fIpath\fR"
+Use \fIpath\fR as the generated dependency file path instead of deriving it
+from the input file name\. Write the dependency information to \fBstdout\fR if
+\fIpath\fR is \fB-\fR\. See also \fB--dep-regex\fR\.
+.IP "\fB--dep-regex\fR \fIregex\fR"
+Use the provided expression to construct the name of the dependency file\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. See also the REGEX
+AND SHELL QUOTING section below\.
+.IP "\fB--disable-warning\fR \fIwarn\fR"
+Disable printing warning with id \fIwarn\fR\. If \fBall\fR is specified for
+the warning id then all warnings are disabled\.
+.IP "\fB--options-file\fR \fIfile\fR"
+Read additional options from \fIfile\fR\. Each option should appearing on a
+separate line optionally followed by space and an option value\. Empty lines
+and lines starting with \fB#\fR are ignored\. Option values can be enclosed in
+double (\fB"\fR) or single (\fB'\fR) quotes to preserve leading and trailing
+whitespaces as well as to specify empty values\. If the value itself contains
+trailing or leading quotes, enclose it with an extra pair of quotes, for
+example \fB'"x"'\fR\. Non-leading and non-trailing quotes are interpreted as
+being part of the option value\.
+
+The semantics of providing options in a file is equivalent to providing the
+same set of options in the same order on the command line at the point where
+the \fB--options-file\fR option is specified except that the shell escaping
+and quoting is not required\. You can repeat this option to specify more than
+one options file\.
+.IP "\fB--show-sloc\fR"
+Show the number of generated physical source lines of code (SLOC)\.
+.IP "\fB--sloc-limit\fR \fInum\fR"
+Check that the number of generated physical source lines of code (SLOC) does
+not exceed \fInum\fR\.
+.IP "\fB--proprietary-license\fR"
+Indicate that the generated code is licensed under a proprietary license
+instead of the GPL\.
+.IP "\fB--custom-literals\fR \fIfile\fR"
+Load custom XML string to C++ literal mappings from \fIfile\fR\. This
+mechanism can be useful if you are using a custom character encoding and some
+of the strings in your schemas, for example element/attribute names or
+enumeration values, contain non-ASCII characters\. In this case you will need
+to provide a custom mapping to C++ literals for such strings\. The format of
+this file is specified in the \fBcustom-literals\.xsd\fR XML Schema file that
+can be found in the documentation directory\.
+.IP "\fB--preserve-anonymous\fR"
+Preserve anonymous types\. By default anonymous types are automatically named
+with names derived from the enclosing elements/attributes\. Because mappings
+implemented by this compiler require all types to be named, this option is
+only useful if you want to make sure your schemas don't have anonymous types\.
+.IP "\fB--show-anonymous\fR"
+Show elements and attributes that are of anonymous types\. This option only
+makes sense together with the \fB--preserve-anonymous\fR option\.
+.IP "\fB--anonymous-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to derive names for
+anonymous types from the enclosing attributes/elements\. \fIregex\fR is a
+Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any character can be
+used as a delimiter instead of '\fB/\fR'\. Escaping of the delimiter character
+in \fIpattern\fR or \fIreplacement\fR is not supported\.
+
+All the regular expressions are pushed into a stack with the last specified
+expression considered first\. The first match that succeeds is used\. Regular
+expressions are applied to a string in the form
+
+\fIfilename\fR \fInamespace\fR \fIxpath\fR\fR
+
+For instance:
+
+\fBhello\.xsd http://example\.com/hello element\fR
+
+\fBhello\.xsd http://example\.com/hello type/element\fR
+
+As an example, the following expression makes all the derived names start with
+capital letters\. This could be useful when your naming convention requires
+type names to start with capital letters:
+
+\fB%\.* \.* (\.+/)*(\.+)%\eu$2%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--anonymous-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--anonymous-regex\fR option\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--location-map\fR \fIol\fR=\fInl\fR"
+Map the original schema location \fIol\fR that is specified in the XML Schema
+include or import elements to new schema location \fInl\fR\. Repeat this
+option to map more than one schema location\. For example, the following
+option maps the \fBhttp://example\.com/foo\.xsd\fR URL to the \fBfoo\.xsd\fR
+local file\.
+
+\fB--location-map http://example\.com/foo\.xsd=foo\.xsd\fR
+.IP "\fB--location-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to map schema
+locations that are specified in the XML Schema include or import elements\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any character can be
+used as a delimiter instead of '\fB/\fR'\. Escaping of the delimiter character
+in \fIpattern\fR or \fIreplacement\fR is not supported\. All the regular
+expressions are pushed into a stack with the last specified expression
+considered first\. The first match that succeeds is used\.
+
+For example, the following expression maps URL locations in the form
+\fBhttp://example\.com/foo/bar\.xsd\fR to local files in the form
+\fBbar\.xsd\fR:
+
+\fB%http://\.+/(\.+)%$1%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--location-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--location-regex\fR option\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--file-per-type\fR"
+Generate a separate set of C++ files for each type defined in XML Schema\.
+Note that in this mode you only need to compile the root schema(s) and the
+code will be generated for all included and imported schemas\. This
+compilation mode is primarily useful when some of your schemas cannot be
+compiled separately or have cyclic dependencies which involve type
+inheritance\. Other options related to this mode are: \fB--type-file-regex\fR,
+\fB--schema-file-regex\fR, \fB--fat-type-file\fR, and \fB--file-list\fR\.
+.IP "\fB--type-file-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate type
+names to file names when the \fB--file-per-type\fR option is specified\.
+\fIregex\fR is a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any character can be
+used as a delimiter instead of '\fB/\fR'\. Escaping of the delimiter character
+in \fIpattern\fR or \fIreplacement\fR is not supported\. All the regular
+expressions are pushed into a stack with the last specified expression
+considered first\. The first match that succeeds is used\. Regular expressions
+are applied to a string in the form
+
+\fInamespace\fR \fItype-name\fR\fR
+
+For example, the following expression maps type \fBfoo\fR that is defined in
+the \fBhttp://example\.com/bar\fR namespace to file name \fBbar-foo\fR:
+
+\fB%http://example\.com/(\.+) (\.+)%$1-$2%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--type-file-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--type-file-regex\fR option\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--schema-file-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate schema
+file names when the \fB--file-per-type\fR option is specified\. \fIregex\fR is
+a Perl-like regular expression in the form
+\fB/\fR\fIpattern\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR\. Any character can be
+used as a delimiter instead of '\fB/\fR'\. Escaping of the delimiter character
+in \fIpattern\fR or \fIreplacement\fR is not supported\. All the regular
+expressions are pushed into a stack with the last specified expression
+considered first\. The first match that succeeds is used\. Regular Expressions
+are applied to the absolute filesystem path of a schema file and the result,
+including the directory part, if any, is used to derive the \fB#include\fR
+directive paths as well as the generated C++ file paths\. This option, along
+with \fB--type-file-regex\fR are primarily useful to place the generated files
+into subdirectories or to resolve file name conflicts\.
+
+For example, the following expression maps schema files in the
+\fBfoo/1\.0\.0/\fR subdirectory to the files in the \fBfoo/\fR subdirectory\.
+As a result, the \fB#include\fR directive paths for such schemas will be in
+the \fBfoo/schema\.hxx\fR form and the generated C++ files will be placed into
+the \fBfoo/\fR subdirectory:
+
+\fB%\.*/foo/1\.0\.0/(\.+)%foo/$1%\fR
+
+See also the REGEX AND SHELL QUOTING section below\.
+.IP "\fB--schema-file-regex-trace\fR"
+Trace the process of applying regular expressions specified with the
+\fB--schema-file-regex\fR option\. Use this option to find out why your
+regular expressions don't do what you expected them to do\.
+.IP "\fB--fat-type-file\fR"
+Generate code corresponding to global elements into type files instead of
+schema files when the \fB--type-file-regex\fR option is specified\. This
+option is primarily useful when trying to minimize the amount of object code
+that is linked to an executable by packaging compiled generated code into a
+static (archive) library\.
+.IP "\fB--file-list\fR \fIfile\fR"
+Write a list of generated C++ files to \fIfile\fR or to \fBstdout\fR if
+\fIfile\fR is \fB-\fR\. This option is primarily useful in the file-per-type
+compilation mode (\fB--file-per-type\fR) to create a list of generated C++
+files, for example, as a makefile fragment\.
+.IP "\fB--file-list-only\fR"
+Only write the list of C++ files that would be generated without actually
+generating them\. This option only makes sense together with
+\fB--file-list\fR\.
+.IP "\fB--file-list-prologue\fR \fItext\fR"
+Insert \fItext\fR at the beginning of the file list\. As a convenience, all
+occurrences of the \fB\en\fR character sequence in \fItext\fR are replaced
+with new lines\. This option can, for example, be used to assign the generated
+file list to a makefile variable\.
+.IP "\fB--file-list-epilogue\fR \fItext\fR"
+Insert \fItext\fR at the end of the file list\. As a convenience, all
+occurrences of the \fB\en\fR character sequence in \fItext\fR are replaced
+with new lines\.
+.IP "\fB--file-list-delim\fR \fItext\fR"
+Delimit file names written to the file list with \fItext\fR instead of new
+lines\. As a convenience, all occurrences of the \fB\en\fR character sequence
+in \fItext\fR are replaced with new lines\.
+.\"
+.\" C++/Tree options.
+.\"
+.SS cxx-tree command options
+.IP "\fB--generate-polymorphic\fR"
+Generate polymorphism-aware code\. Specify this option if you use substitution
+groups or \fBxsi:type\fR\. Use the \fB--polymorphic-type\fR or
+\fB--polymorphic-type-all\fR option to specify which type hierarchies are
+polymorphic\.
+.IP "\fB--polymorphic-type\fR \fItype\fR"
+Indicate that \fItype\fR is a root of a polymorphic type hierarchy\. The
+compiler can often automatically determine which types are polymorphic based
+on the substitution group declarations\. However, you may need to use this
+option if you are not using substitution groups or if substitution groups are
+defined in another schema\. You need to specify this option when compiling
+every schema file that references \fItype\fR\. The \fItype\fR argument is an
+XML Schema type name that can be optionally qualified with a namespace in the
+\fInamespace\fR\fB#\fR\fIname\fR\fR form\.
+.IP "\fB--polymorphic-type-all\fR"
+Indicate that all types should be treated as polymorphic\.
+.IP "\fB--polymorphic-plate\fR \fInum\fR"
+Specify the polymorphic map plate the generated code should register on\. This
+functionality is primarily useful to segregate multiple schemas that define
+the same polymorphic types\.
+.IP "\fB--ordered-type\fR \fItype\fR"
+Indicate that element order in \fItype\fR is significant\. An example would be
+a complex type with unbounded choice as a content model where the element
+order in XML has application-specific semantics\. For ordered types the
+compiler generates a special container data member and a corresponding set of
+accessors and modifiers that are used to capture the order of elements and,
+for mixed content, of text\.
+
+The \fItype\fR argument is an XML Schema type name that can be optionally
+qualified with a namespace in the \fInamespace\fR\fB#\fR\fIname\fR\fR form\.
+Note also that you will need to specify this option when compiling every
+schema file that has other ordered types derived from this type\.
+.IP "\fB--ordered-type-derived\fR"
+Automatically treat types derived from ordered bases as also ordered\. This is
+primarily useful if you would like to be able to iterate over the complete
+content using the content order container\.
+.IP "\fB--ordered-type-mixed\fR"
+Automatically treat complex types with mixed content as ordered\.
+.IP "\fB--ordered-type-all\fR"
+Indicate that element order in all types is significant\.
+.IP "\fB--order-container\fR \fItype\fR"
+Specify a custom class template that should be used as a container for the
+content order in ordered types instead of the default \fBstd::vector\fR\. See
+\fB--ordered-type\fR for more information on ordered type\. This option is
+primarily useful if you need to perform more complex lookups in the content
+order container, for example by element id\. In this case, a container like
+Boost multi-index may be more convenient\. Note that if using a custom
+container, you will also most likely need to include the relevant headers
+using the \fB--hxx-prologue*\fR options\.
+.IP "\fB--generate-serialization\fR"
+Generate serialization functions\. Serialization functions convert the object
+model back to XML\.
+.IP "\fB--generate-ostream\fR"
+Generate ostream insertion operators (\fBoperator<<\fR) for generated types\.
+This allows one to easily print a fragment or the whole object model for
+debugging or logging\.
+.IP "\fB--generate-doxygen\fR"
+Generate documentation comments suitable for extraction by the Doxygen
+documentation system\. Documentation from annotations is added to the comments
+if present in the schema\.
+.IP "\fB--generate-comparison\fR"
+Generate comparison operators (\fBoperator==\fR and \fBoperator!=\fR) for
+complex types\. Comparison is performed member-wise\.
+.IP "\fB--generate-default-ctor\fR"
+Generate default constructors even for types that have required members\.
+Required members of an instance constructed using such a constructor are not
+initialized and accessing them results in undefined behavior\.
+.IP "\fB--generate-from-base-ctor\fR"
+Generate constructors that expect an instance of a base type followed by all
+required members\.
+.IP "\fB--suppress-assignment\fR"
+Suppress the generation of copy assignment operators for complex types\. If
+this option is specified, the copy assignment operators for such types are
+declared private and left unimplemented\.
+.IP "\fB--generate-detach\fR"
+Generate detach functions for required elements and attributes\. Detach
+functions for optional and sequence cardinalities are provided by the
+respective containers\. These functions, for example, allow you to move
+sub-trees in the object model either within the same tree or between different
+trees\.
+.IP "\fB--generate-wildcard\fR"
+Generate accessors and modifiers as well as parsing and serialization code for
+XML Schema wildcards (\fBany\fR and \fBanyAttribute\fR)\. XML content matched
+by wildcards is presented as DOM fragments\. Note that you need to initialize
+the Xerces-C++ runtime if you are using this option\.
+.IP "\fB--generate-any-type\fR"
+Extract and store content of the XML Schema \fBanyType\fR type as a DOM
+fragment\. Note that you need to initialize the Xerces-C++ runtime if you are
+using this option\.
+.IP "\fB--generate-insertion\fR \fIos\fR"
+Generate data representation stream insertion operators for the \fIos\fR
+output stream type\. Repeat this option to specify more than one stream type\.
+The ACE CDR stream (\fBACE_OutputCDR\fR) and RPC XDR are recognized by the
+compiler and the necessary \fB#include\fR directives are automatically
+generated\. For custom stream types use the \fB--hxx-prologue*\fR options to
+provide the necessary declarations\.
+.IP "\fB--generate-extraction\fR \fIis\fR"
+Generate data representation stream extraction constructors for the \fIis\fR
+input stream type\. Repeat this option to specify more than one stream type\.
+The ACE CDR stream (\fBACE_InputCDR\fR) and RPC XDR are recognized by the
+compiler and the necessary \fB#include\fR directives are automatically
+generated\. For custom stream types use the \fB--hxx-prologue*\fR options to
+provide the necessary declarations\.
+.IP "\fB--generate-forward\fR"
+Generate a separate header file with forward declarations for the types being
+generated\.
+.IP "\fB--suppress-parsing\fR"
+Suppress the generation of the parsing functions and constructors\. Use this
+option to reduce the generated code size when parsing from XML is not needed\.
+.IP "\fB--generate-element-type\fR"
+Generate types instead of parsing and serialization functions for root
+elements\. This is primarily useful to distinguish object models with the same
+root type but with different root elements\.
+.IP "\fB--generate-element-map\fR"
+Generate a root element map that allows uniform parsing and serialization of
+multiple root elements\. This option is only valid together with
+\fB--generate-element-type\fR\.
+.IP "\fB--generate-intellisense\fR"
+Generate workarounds for IntelliSense bugs in Visual Studio 2005 (8\.0)\. When
+this option is used, the resulting code is slightly more verbose\.
+IntelliSense in Visual Studio 2008 (9\.0) and later does not require these
+workarounds\. Support for IntelliSense in Visual Studio 2003 (7\.1) is
+improved with this option but is still incomplete\.
+.IP "\fB--omit-default-attributes\fR"
+Omit attributes with default and fixed values from serialized XML documents\.
+.IP "\fB--type-naming\fR \fIstyle\fR"
+Specify the type naming convention that should be used in the generated code\.
+Valid styles are \fBknr\fR (default), \fBucc\fR, and \fBjava\fR\. See the
+NAMING CONVENTION section below for more information\.
+.IP "\fB--function-naming\fR \fIstyle\fR"
+Specify the function naming convention that should be used in the generated
+code\. Valid styles are \fBknr\fR (default), \fBlcc\fR, \fBucc\fR, and
+\fBjava\fR\. See the NAMING CONVENTION section below for more information\.
+.IP "\fB--type-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema type names to C++ type names\. See the NAMING CONVENTION section below
+for more information\.
+.IP "\fB--accessor-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes to C++ accessor function names\. See the
+NAMING CONVENTION section below for more information\.
+.IP "\fB--one-accessor-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality one to C++ accessor
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--opt-accessor-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality optional to C++ accessor
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--seq-accessor-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality sequence to C++ accessor
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--modifier-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes to C++ modifier function names\. See the
+NAMING CONVENTION section below for more information\.
+.IP "\fB--one-modifier-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality one to C++ modifier
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--opt-modifier-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality optional to C++ modifier
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--seq-modifier-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema names of elements/attributes with cardinality sequence to C++ modifier
+function names\. See the NAMING CONVENTION section below for more
+information\.
+.IP "\fB--parser-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema element names to C++ parsing function names\. See the NAMING CONVENTION
+section below for more information\.
+.IP "\fB--serializer-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema element names to C++ serialization function names\. See the NAMING
+CONVENTION section below for more information\.
+.IP "\fB--const-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema-derived names to C++ constant names\. See the NAMING CONVENTION section
+below for more information\.
+.IP "\fB--enumerator-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema enumeration values to C++ enumerator names\. See the NAMING CONVENTION
+section below for more information\.
+.IP "\fB--element-type-regex\fR \fIregex\fR"
+Add \fIregex\fR to the list of regular expressions used to translate XML
+Schema element names to C++ element type names\. See the NAMING CONVENTION
+section below for more information\.
+.IP "\fB--name-regex-trace\fR"
+Trace the process of applying regular expressions specified with the name
+transformation options\. Use this option to find out why your regular
+expressions don't do what you expected them to do\.
+.IP "\fB--root-element-first\fR"
+Treat only the first global element as a document root\. By default all global
+elements are considered document roots\.
+.IP "\fB--root-element-last\fR"
+Treat only the last global element as a document root\. By default all global
+elements are considered document roots\.
+.IP "\fB--root-element-all\fR"
+Treat all global elements as document roots\. This is the default behavior\.
+By explicitly specifying this option you can suppress the warning that is
+issued if more than one global element is defined\.
+.IP "\fB--root-element-none\fR"
+Do not treat any global elements as document roots\. By default all global
+elements are considered document roots\.
+.IP "\fB--root-element\fR \fIelement\fR"
+Treat only \fIelement\fR as a document root\. Repeat this option to specify
+more than one root element\.
+.IP "\fB--custom-type\fR \fImap\fR"
+Use a custom C++ type instead of the generated class\. The \fImap\fR argument
+is in the form \fIname\fR[\fB=\fR\fItype\fR[\fB/\fR\fIbase\fR]]\fR, where
+\fIname\fR is a type name as defined in XML Schema and \fItype\fR is a C++
+type name that should be used instead\. If \fItype\fR is not present or empty
+then the custom type is assumed to have the same name and be defined in the
+same namespace as the generated class would have\. If \fIbase\fR is specified
+then the generated class is still generated but with that name\.
+.IP "\fB--custom-type-regex\fR \fIregex\fR"
+Use custom C++ types instead of the generated classes\. The \fIregex\fR
+argument is in the form
+\fB/\fR\fIname-pat\fR\fB/\fR[\fItype-sub\fR\fB/\fR[\fIbase-sub\fR\fB/\fR]]\fR,
+where \fIname-pat\fR is a regex pattern that will be matched against type
+names as defined in XML Schema and \fItype-sub\fR is a C++ type name
+substitution that should be used instead\. If \fItype-sub\fR is not present or
+its substitution results in an empty string then the custom type is assumed to
+have the same name and be defined in the same namespace as the generated class
+would have\. If \fIbase-sub\fR is present and its substitution results in a
+non-empty string then the generated class is still generated but with the
+result of this substitution as its name\. The pattern and substitutions are in
+the Perl regular expression format\. See also the REGEX AND SHELL QUOTING
+section below\.
+.IP "\fB--parts\fR \fInum\fR"
+Split generated source code into \fInum\fR parts\. This is useful when
+translating large, monolithic schemas and a C++ compiler is not able to
+compile the resulting source code at once (usually due to insufficient
+memory)\.
+.IP "\fB--parts-suffix\fR \fIsuffix\fR"
+Use \fIsuffix\fR instead of the default '\fB-\fR' to separate the file name
+from the part number\.
+\"
+\" C++/Parser
+\"
+.SS cxx-parser command options
+.IP "\fB--type-map\fR \fImapfile\fR"
+Read XML Schema to C++ type mapping information from \fImapfile\fR\. Repeat
+this option to specify several type maps\. Type maps are considered in order
+of appearance and the first match is used\. By default all user-defined types
+are mapped to \fBvoid\fR\. See the TYPE MAP section below for more
+information\.
+.IP "\fB--xml-parser\fR \fIparser\fR"
+Use \fIparser\fR as the underlying XML parser\. Valid values are \fBxerces\fR
+for Xerces-C++ (default) and \fBexpat\fR for Expat\.
+.IP "\fB--generate-validation\fR"
+Generate validation code\. The validation code ("perfect parser") ensures that
+instance documents conform to the schema\. Validation code is generated by
+default when the selected underlying XML parser is non-validating
+(\fBexpat\fR)\.
+.IP "\fB--suppress-validation\fR"
+Suppress the generation of validation code\. Validation is suppressed by
+default when the selected underlying XML parser is validating (\fBxerces\fR)\.
+.IP "\fB--generate-polymorphic\fR"
+Generate polymorphism-aware code\. Specify this option if you use substitution
+groups or \fBxsi:type\fR\.
+.IP "\fB--generate-noop-impl\fR"
+Generate a sample parser implementation that does nothing (no operation)\. The
+sample implementation can then be filled with the application-specific code\.
+For an input file in the form \fBname\.xsd\fR this option triggers the
+generation of two additional C++ files in the form: \fBname-pimpl\.hxx\fR
+(parser implementation header file) and \fBname-pimpl\.cxx\fR (parser
+implementation source file)\.
+.IP "\fB--generate-print-impl\fR"
+Generate a sample parser implementation that prints the XML data to
+STDOUT\fR\. For an input file in the form \fBname\.xsd\fR this option triggers
+the generation of two additional C++ files in the form: \fBname-pimpl\.hxx\fR
+(parser implementation header file) and \fBname-pimpl\.cxx\fR (parser
+implementation source file)\.
+.IP "\fB--generate-test-driver\fR"
+Generate a test driver for the sample parser implementation\. For an input
+file in the form \fBname\.xsd\fR this option triggers the generation of an
+additional C++ file in the form \fBname-driver\.cxx\fR\.
+.IP "\fB--force-overwrite\fR"
+Force overwriting of the existing implementation and test driver files\. Use
+this option only if you do not mind loosing the changes you have made in the
+sample implementation or test driver files\.
+.IP "\fB--root-element-first\fR"
+Indicate that the first global element is the document root\. This information
+is used to generate the test driver for the sample implementation\.
+.IP "\fB--root-element-last\fR"
+Indicate that the last global element is the document root\. This information
+is used to generate the test driver for the sample implementation\.
+.IP "\fB--root-element\fR \fIelement\fR"
+Indicate that \fIelement\fR is the document root\. This information is used to
+generate the test driver for the sample implementation\.
+.IP "\fB--skel-type-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB_pskel\fR to construct
+the names of the generated parser skeletons\.
+.IP "\fB--skel-file-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB-pskel\fR to construct
+the names of the generated parser skeleton files\.
+.IP "\fB--impl-type-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB_pimpl\fR to construct
+the names of the parser implementations for the built-in XML Schema types as
+well as sample parser implementations\.
+.IP "\fB--impl-file-suffix\fR \fIsuffix\fR"
+Use the provided \fIsuffix\fR instead of the default \fB-pimpl\fR to construct
+the names of the generated sample parser implementation files\.
+\"
+\" NAMING CONVENTION
+\"
+
+.SH NAMING CONVENTION
+The compiler can be instructed to use a particular naming convention in
+the generated code. A number of widely-used conventions can be selected
+using the
+.B --type-naming
+and
+.B --function-naming
+options. A custom naming convention can be achieved using the
+.BR --type-regex ,
+.BR --accessor-regex ,
+.BR --one-accessor-regex ,
+.BR --opt-accessor-regex ,
+.BR --seq-accessor-regex ,
+.BR --modifier-regex ,
+.BR --one-modifier-regex ,
+.BR --opt-modifier-regex ,
+.BR --seq-modifier-regex ,
+.BR --parser-regex ,
+.BR --serializer-regex ,
+.BR --const-regex ,
+.BR --enumerator-regex ,
+and
+.B --element-type-regex
+options.
+
+The
+.B --type-naming
+option specifies the convention that should be used for naming C++ types.
+Possible values for this option are
+.B knr
+(default),
+.BR ucc ,
+and
+.BR java .
+The
+.B knr
+value (stands for K&R) signifies the standard, lower-case naming convention
+with the underscore used as a word delimiter, for example: foo, foo_bar.
+The
+.B ucc
+(stands for upper-camel-case) and
+.B java
+values a synonyms for the same naming convention where the first letter
+of each word in the name is capitalized, for example: Foo, FooBar.
+
+Similarly, the
+.B --function-naming
+option specifies the convention that should be used for naming C++ functions.
+Possible values for this option are
+.B knr
+(default),
+.BR lcc ,
+and
+.BR java .
+The
+.B knr
+value (stands for K&R) signifies the standard, lower-case naming convention
+with the underscore used as a word delimiter, for example: foo(), foo_bar().
+The
+.B lcc
+value (stands for lower-camel-case) signifies a naming convention where the
+first letter of each word except the first is capitalized, for example: foo(),
+fooBar(). The
+.B ucc
+value (stands for upper-camel-case) signifies a naming convention where the
+first letter of each word is capitalized, for example: Foo(), FooBar(). The
+.B java
+naming convention is similar to the lower-camel-case one except that accessor
+functions are prefixed with get, modifier functions are prefixed with set,
+parsing functions are prefixed with parse, and serialization functions are
+prefixed with serialize, for example: getFoo(), setFooBar(), parseRoot(),
+serializeRoot().
+
+Note that the naming conventions specified with the
+.B --type-naming
+and
+.B --function-naming
+options perform only limited transformations on the
+names that come from the schema in the form of type, attribute, and element
+names. In other words, to get consistent results, your schemas should follow
+a similar naming convention as the one you would like to have in the generated
+code. Alternatively, you can use the
+.B --*-regex
+options (discussed below) to perform further transformations on the names
+that come from the schema.
+
+The
+.BR --type-regex ,
+.BR --accessor-regex ,
+.BR --one-accessor-regex ,
+.BR --opt-accessor-regex ,
+.BR --seq-accessor-regex ,
+.BR --modifier-regex ,
+.BR --one-modifier-regex ,
+.BR --opt-modifier-regex ,
+.BR --seq-modifier-regex ,
+.BR --parser-regex ,
+.BR --serializer-regex ,
+.BR --const-regex ,
+.BR --enumerator-regex ,
+and
+.B --element-type-regex
+options allow you to specify extra regular expressions for each name
+category in addition to the predefined set that is added depending on
+the
+.B --type-naming
+and
+.B --function-naming
+options. Expressions that are provided with the
+.B --*-regex
+options are evaluated prior to any predefined expressions. This allows
+you to selectively override some or all of the predefined transformations.
+When debugging your own expressions, it is often useful to see which
+expressions match which names. The
+.B --name-regex-trace
+option allows you to trace the process of applying
+regular expressions to names.
+
+The value for the
+.B --*-regex
+options should be a perl-like regular expression in the form
+.BI / pattern / replacement /\fR.
+Any character can be used as a delimiter instead of
+.BR / .
+Escaping of the delimiter character in
+.I pattern
+or
+.I replacement
+is not supported. All the regular expressions for each category are pushed
+into a category-specific stack with the last specified expression
+considered first. The first match that succeeds is used. For the
+.B --one-accessor-regex
+(accessors with cardinality one),
+.B --opt-accessor-regex
+(accessors with cardinality optional), and
+.B --seq-accessor-regex
+(accessors with cardinality sequence) categories the
+.B --accessor-regex
+expressions are used as a fallback. For the
+.BR --one-modifier-regex ,
+.BR --opt-modifier-regex ,
+and
+.B --seq-modifier-regex
+categories the
+.B --modifier-regex
+expressions are used as a fallback. For the
+.B --element-type-regex
+category the
+.B --type-regex
+expressions are used as a fallback.
+
+The type name expressions
+.RB ( --type-regex )
+are evaluated on the name string that has the following format:
+
+[\fInamespace \fR]\fIname\fR[\fB,\fIname\fR][\fB,\fIname\fR][\fB,\fIname\fR]
+
+The element type name expressions
+.RB ( --element-type-regex ),
+effective only when the
+.B --generate-element-type
+option is specified, are evaluated on the name string that has the following
+format:
+
+.I namespace name
+
+In the type name format the
+.I namespace
+part followed by a space is only present for global type names. For global
+types and elements defined in schemas without a target namespace, the
+.I namespace
+part is empty but the space is still present. In the type name format after
+the initial
+.I name
+component, up to three additional
+.I name
+components can be present, separated by commas. For example:
+
+.B http://example.com/hello type
+
+.B foo
+
+.B foo,iterator
+
+.B foo,const,iterator
+
+The following set of predefined regular expressions is used to transform
+type names when the upper-camel-case naming convention is selected:
+
+.B /(?:[^ ]* )?([^,]+)/\\\\u$1/
+
+.B /(?:[^ ]* )?([^,]+),([^,]+)/\\\\u$1\\\\u$2/
+
+.B /(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/\\\\u$1\\\\u$2\\\\u$3/
+
+.B /(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/\\\\u$1\\\\u$2\\\\u$3\\\\u$4/
+
+The accessor and modifier expressions
+.RB ( --*accessor-regex
+and
+.BR --*modifier-regex )
+are evaluated on the name string that has the following format:
+
+\fIname\fR[\fB,\fIname\fR][\fB,\fIname\fR]
+
+After the initial
+.I name
+component, up to two additional
+.I name
+components can be present, separated by commas. For example:
+
+.B foo
+
+.B dom,document
+
+.B foo,default,value
+
+The following set of predefined regular expressions is used to transform
+accessor names when the
+.B java
+naming convention is selected:
+
+.B /([^,]+)/get\\\\u$1/
+
+.B /([^,]+),([^,]+)/get\\\\u$1\\\\u$2/
+
+.B /([^,]+),([^,]+),([^,]+)/get\\\\u$1\\\\u$2\\\\u$3/
+
+For the parser, serializer, and enumerator categories, the corresponding
+regular expressions are evaluated on local names of elements and on
+enumeration values, respectively. For example, the following predefined
+regular expression is used to transform parsing function names when the
+.B java
+naming convention is selected:
+
+.B /(.+)/parse\\\\u$1/
+
+The const category is used to create C++ constant names for the
+element/wildcard/text content ids in ordered types.
+
+See also the REGEX AND SHELL QUOTING section below.
+
+\"
+\" TYPE MAP
+\"
+.SH TYPE MAP
+Type map files are used in C++/Parser to define a mapping between XML
+Schema and C++ types. The compiler uses this information to determine
+the return types of
+.B post_*
+functions in parser skeletons corresponding to XML Schema types
+as well as argument types for callbacks corresponding to elements
+and attributes of these types.
+
+The compiler has a set of predefined mapping rules that map built-in
+XML Schema types to suitable C++ types (discussed below) and all
+other types to
+.BR void .
+By providing your own type maps you can override these predefined rules.
+The format of the type map file is presented below:
+
+.RS
+.B namespace
+.I schema-namespace
+[
+.I cxx-namespace
+]
+.br
+.B {
+.br
+ (
+.B include
+.IB file-name ;
+)*
+.br
+ ([
+.B type
+]
+.I schema-type cxx-ret-type
+[
+.I cxx-arg-type
+.RB ] ;
+)*
+.br
+.B }
+.br
+.RE
+
+Both
+.I schema-namespace
+and
+.I schema-type
+are regex patterns while
+.IR cxx-namespace ,
+.IR cxx-ret-type ,
+and
+.I cxx-arg-type
+are regex pattern substitutions. All names can be optionally enclosed
+in \fR" "\fR, for example, to include white-spaces.
+
+.I schema-namespace
+determines XML Schema namespace. Optional
+.I cxx-namespace
+is prefixed to every C++ type name in this namespace declaration.
+.I cxx-ret-type
+is a C++ type name that is used as a return type for the
+.B post_*
+functions. Optional
+.I cxx-arg-type
+is an argument type for callback functions corresponding to elements and
+attributes of this type. If
+.I cxx-arg-type
+is not specified, it defaults to
+.I cxx-ret-type
+if
+.I cxx-ret-type
+ends with
+.B *
+or
+.B &
+(that is, it is a pointer or a reference) and
+.B const
+\fIcxx-ret-type\fB&\fR otherwise.
+.I file-name
+is a file name either in the \fR" "\fR or < > format and is added with the
+.B #include
+directive to the generated code.
+
+The \fB#\fR character starts a comment that ends with a new line or end of
+file. To specify a name that contains \fB#\fR enclose it in \fR" "\fR. For
+example:
+
+.RS
+namespace http://www.example.com/xmlns/my my
+.br
+{
+.br
+ include "my.hxx";
+.br
+
+ # Pass apples by value.
+ #
+ apple apple;
+.br
+
+ # Pass oranges as pointers.
+ #
+ orange orange_t*;
+.br
+}
+.br
+.RE
+
+In the example above, for the
+.B http://www.example.com/xmlns/my#orange
+XML Schema type, the
+.B my::orange_t*
+C++ type will be used as both return and argument types.
+
+Several namespace declarations can be specified in a single file.
+The namespace declaration can also be completely omitted to map
+types in a schema without a namespace. For instance:
+
+.RS
+include "my.hxx";
+.br
+apple apple;
+.br
+
+namespace http://www.example.com/xmlns/my
+.br
+{
+.br
+ orange "const orange_t*";
+.br
+}
+.br
+.RE
+
+The compiler has a number of predefined mapping rules that can be
+presented as the following map files. The string-based XML Schema
+built-in types are mapped to either
+.B std::string
+or
+.B std::wstring
+depending on the character type selected with the
+.B --char-type
+option
+.RB ( char
+by default). The binary XML Schema types are mapped to either
+.B std::unique_ptr<xml_schema::buffer>
+or
+.B std::auto_ptr<xml_schema::buffer>
+depending on the C++ standard selected with the
+.B --std
+option
+.RB ( c++11
+by default).
+
+.RS
+namespace http://www.w3.org/2001/XMLSchema
+.br
+{
+.br
+ boolean bool bool;
+.br
+
+ byte "signed char" "signed char";
+.br
+ unsignedByte "unsigned char" "unsigned char";
+.br
+
+ short short short;
+.br
+ unsignedShort "unsigned short" "unsigned short";
+.br
+
+ int int int;
+.br
+ unsignedInt "unsigned int" "unsigned int";
+.br
+
+ long "long long" "long long";
+.br
+ unsignedLong "unsigned long long" "unsigned long long";
+.br
+
+ integer "long long" "long long";
+.br
+
+ negativeInteger "long long" "long long";
+.br
+ nonPositiveInteger "long long" "long long";
+.br
+
+ positiveInteger "unsigned long long" "unsigned long long";
+.br
+ nonNegativeInteger "unsigned long long" "unsigned long long";
+.br
+
+ float float float;
+.br
+ double double double;
+.br
+ decimal double double;
+.br
+
+ string std::string;
+.br
+ normalizedString std::string;
+.br
+ token std::string;
+.br
+ Name std::string;
+.br
+ NMTOKEN std::string;
+.br
+ NCName std::string;
+.br
+ ID std::string;
+.br
+ IDREF std::string;
+.br
+ language std::string;
+.br
+ anyURI std::string;
+.br
+
+ NMTOKENS xml_schema::string_sequence;
+.br
+ IDREFS xml_schema::string_sequence;
+.br
+
+ QName xml_schema::qname;
+.br
+
+ base64Binary std::[unique|auto]_ptr<xml_schema::buffer>
+.br
+ std::[unique|auto]_ptr<xml_schema::buffer>;
+.br
+ hexBinary std::[unique|auto]_ptr<xml_schema::buffer>
+.br
+ std::[unique|auto]_ptr<xml_schema::buffer>;
+.br
+
+ date xml_schema::date;
+.br
+ dateTime xml_schema::date_time;
+.br
+ duration xml_schema::duration;
+.br
+ gDay xml_schema::gday;
+.br
+ gMonth xml_schema::gmonth;
+.br
+ gMonthDay xml_schema::gmonth_day;
+.br
+ gYear xml_schema::gyear;
+.br
+ gYearMonth xml_schema::gyear_month;
+.br
+ time xml_schema::time;
+.br
+}
+.br
+.RE
+
+
+The last predefined rule maps anything that wasn't mapped by previous
+rules to
+.BR void :
+
+.RS
+namespace .*
+.br
+{
+.br
+ .* void void;
+.br
+}
+.br
+.RE
+
+When you provide your own type maps with the
+.B --type-map
+option, they are evaluated first. This allows you to selectively override
+predefined rules.
+
+.\"
+.\" REGEX AND SHELL QUOTING
+.\"
+.SH REGEX AND SHELL QUOTING
+When entering a regular expression argument in the shell command line
+it is often necessary to use quoting (enclosing the argument in " "
+or ' ') in order to prevent the shell from interpreting certain
+characters, for example, spaces as argument separators and $ as
+variable expansions.
+
+Unfortunately it is hard to achieve this in a manner that is portable
+across POSIX shells, such as those found on GNU/Linux and UNIX, and
+Windows shell. For example, if you use " " for quoting you will get
+a wrong result with POSIX shells if your expression contains $. The
+standard way of dealing with this on POSIX systems is to use ' '
+instead. Unfortunately, Windows shell does not remove ' ' from
+arguments when they are passed to applications. As a result you may
+have to use ' ' for POSIX and " " for Windows ($ is not treated as
+a special character on Windows).
+
+Alternatively, you can save regular expression options into a file,
+one option per line, and use this file with the
+.B --options-file
+option. With this approach you don't need to worry about shell quoting.
+
+.\"
+.\" DIAGNOSTICS
+.\"
+.SH DIAGNOSTICS
+If the input file is not a valid W3C XML Schema definition,
+.B xsd
+will issue diagnostic messages to
+.B STDERR
+and exit with non-zero exit code.
+.SH BUGS
+Send bug reports to the xsd-users@codesynthesis.com mailing list.
+.SH COPYRIGHT
+Copyright (c) 2005-2023 Code Synthesis.
+
+Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License,
+version 1.2; with no Invariant Sections, no Front-Cover Texts and
+no Back-Cover Texts. Copy of the license can be obtained from
+https://www.codesynthesis.com/licenses/fdl-1.2.txt
diff --git a/xsd/doc/pregenerated/xsd.xhtml b/xsd/doc/pregenerated/xsd.xhtml
new file mode 100644
index 0000000..2e30ed4
--- /dev/null
+++ b/xsd/doc/pregenerated/xsd.xhtml
@@ -0,0 +1,1620 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>XSD 4.2.1-a.0 Compiler Command Line Manual</title>
+
+ <meta charset="UTF-8"/>
+ <meta name="version" content="4.2.1-a.0"/>
+ <meta name="copyright" content="&#169; 2005-2023 Code Synthesis"/>
+ <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,code,generator,manual,man,page"/>
+ <meta name="description" content="XSD Compiler Command Line Manual"/>
+
+ <link rel="stylesheet" type="text/css" href="default.css" />
+
+<style type="text/css">
+
+ #synopsis {
+ list-style-type: none;
+ }
+
+ #synopsis li {
+ padding-top : 0.0em;
+ padding-bottom : 0.0em;
+ }
+
+ #commands dt {
+ padding-top : 0.4em;
+ }
+
+ #commands dd {
+ padding-bottom : 0.4em;
+ padding-left : 2em;
+ }
+
+ .options {
+ margin: 1em 0 1em 0;
+ }
+
+ .options dt {
+ margin: 1em 0 0 0;
+ }
+
+ .options dd {
+ margin: .1em 0 0 4.5em;
+ }
+
+</style>
+</head>
+
+<body>
+<div id="container">
+ <div id="content">
+
+ <h1>NAME</h1>
+
+ <p>xsd - W3C XML Schema to C++ Compiler</p>
+
+ <h1>SYNOPSIS</h1>
+
+ <dl id="synopsis">
+ <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
+ <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
+ <dt><code><b>xsd version</b></code></dt>
+ </dl>
+
+ <h1>DESCRIPTION</h1>
+
+ <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
+ C++ mapping from W3C XML Schema definitions. Particular mapping to
+ produce is selected by a <code><i>command</i></code>. Each mapping has
+ a number of mapping-specific <code><i>options</i></code> that should
+ appear, if any, after the <code><i>command</i></code>. Input files should
+ be W3C XML Schema definitions. The exact set of the generated files depends
+ on the selected mapping and options.</p>
+
+ <h1>COMMANDS</h1>
+
+ <dl id="commands">
+ <dt><code><b>cxx-tree</b></code></dt>
+ <dd>Generate the C++/Tree mapping. For each input file in the form
+ <code><b>name.xsd</b></code> the following C++ files are generated:
+ <code><b>name.hxx</b></code> (header file),
+ <code><b>name.ixx</b></code> (inline file, generated only if the
+ <code><b>--generate-inline</b></code> option is specified),
+ <code><b>name.cxx</b></code> (source file), and
+ <code><b>name-fwd.hxx</b></code> (forward declaration file, generated
+ only if the <code><b>--generate-forward</b></code> option is
+ specified).</dd>
+
+ <dt><code><b>cxx-parser</b></code></dt>
+ <dd>Generate the C++/Parser mapping. For each input file in the form
+ <code><b>name.xsd</b></code> the following C++ files are generated:
+ <code><b>name-pskel.hxx</b></code> (parser skeleton header file),
+ <code><b>name-pskel.ixx</b></code> (parser skeleton inline file,
+ generated only if the <code><b>--generate-inline</b></code>
+ option is specified), and
+ <code><b>name-pskel.cxx</b></code> (parser skeleton source file).
+ If the <code><b>--generate-noop-impl</b></code> or
+ <code><b>--generate-print-impl</b></code> option is specified,
+ the following additional sample implementation files are generated:
+ <code><b>name-pimpl.hxx</b></code> (parser implementation header
+ file) and
+ <code><b>name-pimpl.cxx</b></code> (parser implementation source
+ file). If the <code><b>--generate-test-driver</b></code> option
+ is specified, the additional <code><b>name-driver.cxx</b></code>
+ test driver file is generated.</dd>
+
+ <dt><code><b>help</b></code></dt>
+ <dd>Print usage information and exit. Use
+ <p><code><b>xsd help</b> <i>command</i></code></p>
+ for command-specific help.
+ </dd>
+
+ <dt><code><b>version</b></code></dt>
+ <dd>Print version and exit.</dd>
+ </dl>
+
+ <h1>OPTIONS</h1>
+
+ <p>Command-specific <code><i>options</i></code>, if any, should appear
+ after the corresponding <code><i>command</i></code>.</p>
+
+ <h2>COMMON OPTIONS</h2>
+ <dl class="options">
+ <dt><code><b>--std</b></code> <code><i>version</i></code></dt>
+ <dd>Specify the C++ standard that the generated code should conform to.
+ Valid values are <code><b>c++98</b></code>, <code><b>c++11</b></code>
+ (default), <code><b>c++14</b></code>, <code><b>c++17</b></code>,
+ <code><b>c++20</b></code>, and <code><b>c++23</b></code>.
+
+ <p>The C++ standard affects various aspects of the generated code that are
+ discussed in more detail in various mapping-specific documentation.
+ Overall, when C++11 is selected, the generated code relies on the move
+ semantics and uses <code><b>std::unique_ptr</b></code> instead of
+ deprecated <code><b>std::auto_ptr</b></code>. Currently, there is no
+ difference between the C++11 and the later standards modes.</p>
+
+ <p>When the C++11 mode is selected, you normally don't need to perform any
+ extra steps other than enable C++11 in your C++ compiler, if required. The
+ XSD compiler will automatically add the necessary macro defines to the
+ generated header files that will switch the header-only XSD runtime
+ library (<code><b>libxsd</b></code>) to the C++11 mode. However, if you
+ include any of the XSD runtime headers directly in your application
+ (normally you just include the generated headers), then you will need to
+ define the <code><b>XSD_CXX11</b></code> macro for your entire
+ project.</p></dd>
+
+ <dt><code><b>--char-type</b></code> <code><i>type</i></code></dt>
+ <dd>Generate code using the provided character <code><i>type</i></code>
+ instead of the default <code><b>char</b></code>. Valid values are
+ <code><b>char</b></code> and <code><b>wchar_t</b></code>.</dd>
+
+ <dt><code><b>--char-encoding</b></code> <code><i>enc</i></code></dt>
+ <dd>Specify the character encoding that should be used in the generated
+ code. Valid values for the <code><b>char</b></code> character type are
+ <code><b>utf8</b></code> (default), <code><b>iso8859-1</b></code>,
+ <code><b>lcp</b></code> (Xerces-C++ local code page), and
+ <code><b>custom</b></code>. If you pass <code><b>custom</b></code> as the
+ value then you will need to include the transcoder implementation header
+ for your encoding at the beginning of the generated header files (see the
+ <code><b>--hxx-prologue</b></code> option).
+
+ <p>For the <code><b>wchar_t</b></code> character type the only valid value
+ is <code><b>auto</b></code> and the encoding is automatically selected
+ between UTF-16 and UTF-32/UCS-4, depending on the
+ <code><b>wchar_t</b></code> type size.</p></dd>
+
+ <dt><code><b>--output-dir</b></code> <code><i>dir</i></code></dt>
+ <dd>Write generated files to <code><i>dir</i></code> instead of the
+ current directory.</dd>
+
+ <dt><code><b>--generate-inline</b></code></dt>
+ <dd>Generate simple functions inline. This option triggers creation of the
+ inline file.</dd>
+
+ <dt><code><b>--generate-xml-schema</b></code></dt>
+ <dd>Generate a C++ header file as if the schema being compiled defines the
+ XML Schema namespace. For the C++/Tree mapping, the resulting file will
+ contain definitions for all XML Schema built-in types. For the C++/Parser
+ mapping, the resulting file will contain definitions for all the parser
+ skeletons and implementations corresponding to the XML Schema built-in
+ types.
+
+ <p>The schema file provided to the compiler need not exist and is only
+ used to derive the name of the resulting header file. Use the
+ <code><b>--extern-xml-schema</b></code> option to include this file in the
+ generated files for other schemas.</p></dd>
+
+ <dt><code><b>--extern-xml-schema</b></code> <code><i>file</i></code></dt>
+ <dd>Include a header file derived from <code><i>file</i></code> instead of
+ generating the XML Schema namespace mapping inline. The provided file need
+ not exist and is only used to derive the name of the included header file.
+ Use the <code><b>--generate-xml-schema</b></code> option to generate this
+ header file.</dd>
+
+ <dt><code><b>--namespace-map</b></code> <code><i>xns</i></code>=<code><i>cns</i></code></dt>
+ <dd>Map XML Schema namespace <code><i>xns</i></code> to C++ namespace
+ <code><i>cns</i></code>. Repeat this option to specify mapping for more
+ than one XML Schema namespace. For example, the following option:
+
+ <p class="code"><code><b>--namespace-map
+ http://example.com/foo/bar=foo::bar</b></code></p>
+
+ <p>Will map the <code><b>http://example.com/foo/bar</b></code> XML Schema
+ namespace to the <code><b>foo::bar</b></code> C++ namespace.</p></dd>
+
+ <dt><code><b>--namespace-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema namespace names to C++ namespace names.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported.
+
+ <p>All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that succeeds is
+ used. Regular expressions are applied to a string in the form</p>
+
+ <p class="code"><code><i>filename</i> <i>namespace</i></code></p>
+
+ <p>For example, if you have file <code><b>hello.xsd</b></code> with
+ namespace <code><b>http://example.com/hello</b></code> and you run
+ <code><b>xsd</b></code> on this file, then the string in question will
+ be:</p>
+
+ <p class="code"><code><b>hello.xsd.
+ http://example.com/hello</b></code></p>
+
+ <p>For the built-in XML Schema namespace the string is:</p>
+
+ <p class="code"><code><b>XMLSchema.xsd
+ http://www.w3.org/2001/XMLSchema</b></code></p>
+
+ <p>The following three steps are performed for each regular expression
+ until the match is found:</p>
+
+ <p>1. The expression is applied and if the result is empty the next
+ expression is considered.</p>
+
+ <p>2. All '<code><b>/</b></code>' are replaced with
+ '<code><b>::</b></code>'.</p>
+
+ <p>3. The result is verified to be a valid C++ scope name (e.g.,
+ <code><b>foo::bar</b></code>). If this test succeeds, the result is used
+ as a C++ namespace name.</p>
+
+ <p>As an example, the following expression maps XML Schema namespaces in
+ the form <code><b>http://example.com/foo/bar</b></code> to C++ namespaces
+ in the form <code><b>foo::bar</b></code>:</p>
+
+ <p class="code"><code><b>%.* http://example.com/(.+)%$1%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--namespace-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--namespace-regex</b></code> option. Use this option to find out
+ why your regular expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--reserved-name</b></code> <code><i>n</i></code>[=<code><i>r</i></code>]</dt>
+ <dd>Add name <code><i>n</i></code> to the list of names that should not be
+ used as identifiers. The name can optionally be followed by
+ <code><b>=</b></code> and the replacement name <code><i>r</i></code> that
+ should be used instead. All the C++ keywords are already in this
+ list.</dd>
+
+ <dt><code><b>--include-with-brackets</b></code></dt>
+ <dd>Use angle brackets (&lt;>) instead of quotes ("") in generated
+ <code><b>#include</b></code> directives.</dd>
+
+ <dt><code><b>--include-prefix</b></code> <code><i>prefix</i></code></dt>
+ <dd>Add <code><i>prefix</i></code> to generated
+ <code><b>#include</b></code> directive paths.
+
+ <p>For example, if you had the following import element in your schema</p>
+
+ <p class="code"><code><b>&lt;import namespace="..."
+ schemaLocation="base.xsd"/></b></code></p>
+
+ <p>and compiled this fragment with <code><b>--include-prefix
+ schemas/</b></code>, then the include directive in the generated code
+ would be:</p>
+
+ <p class="code"><code><b>#include "schemas/base.hxx"</b></code></p></dd>
+
+ <dt><code><b>--include-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to transform <code><b>#include</b></code> directive paths.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported.
+
+ <p>All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that succeeds is
+ used.</p>
+
+ <p>As an example, the following expression transforms paths in the form
+ <code><b>schemas/foo/bar</b></code> to paths in the form
+ <code><b>generated/foo/bar</b></code>:</p>
+
+ <p class="code"><code><b>%schemas/(.+)%generated/$1%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--include-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--include-regex</b></code> option. Use this option to find out
+ why your regular expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--guard-prefix</b></code> <code><i>prefix</i></code></dt>
+ <dd>Add <code><i>prefix</i></code> to generated header inclusion guards.
+ The prefix is transformed to upper case and characters that are illegal in
+ a preprocessor macro name are replaced with underscores. If this option is
+ not specified then the directory part of the input schema file is used as
+ a prefix.</dd>
+
+ <dt><code><b>--hxx-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>.hxx</b></code> to construct the name of the header file. Note
+ that this suffix is also used to construct names of header files
+ corresponding to included/imported schemas.</dd>
+
+ <dt><code><b>--ixx-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>.ixx</b></code> to construct the name of the inline file.</dd>
+
+ <dt><code><b>--cxx-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>.cxx</b></code> to construct the name of the source file.</dd>
+
+ <dt><code><b>--fwd-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>-fwd.hxx</b></code> to construct the name of the forward
+ declaration file.</dd>
+
+ <dt><code><b>--hxx-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use the provided expression to construct the name of the header file.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>.
+ Note that this expression is also used to construct names of header files
+ corresponding to included/imported schemas. See also the REGEX AND SHELL
+ QUOTING section below.</dd>
+
+ <dt><code><b>--ixx-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use the provided expression to construct the name of the inline file.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. See
+ also the REGEX AND SHELL QUOTING section below.</dd>
+
+ <dt><code><b>--cxx-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use the provided expression to construct the name of the source file.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. See
+ also the REGEX AND SHELL QUOTING section below.</dd>
+
+ <dt><code><b>--fwd-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use the provided expression to construct the name of the forward
+ declaration file. <code><i>regex</i></code> is a Perl-like regular
+ expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. See
+ also the REGEX AND SHELL QUOTING section below.</dd>
+
+ <dt><code><b>--hxx-prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of the header
+ file.</dd>
+
+ <dt><code><b>--ixx-prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of the inline
+ file.</dd>
+
+ <dt><code><b>--cxx-prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of the source
+ file.</dd>
+
+ <dt><code><b>--fwd-prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of the forward
+ declaration file.</dd>
+
+ <dt><code><b>--prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of each generated
+ file for which there is no file-specific prologue.</dd>
+
+ <dt><code><b>--hxx-epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of the header file.</dd>
+
+ <dt><code><b>--ixx-epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of the inline file.</dd>
+
+ <dt><code><b>--cxx-epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of the source file.</dd>
+
+ <dt><code><b>--fwd-epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of the forward declaration
+ file.</dd>
+
+ <dt><code><b>--epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of each generated file for
+ which there is no file-specific epilogue.</dd>
+
+ <dt><code><b>--hxx-prologue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the beginning of
+ the header file.</dd>
+
+ <dt><code><b>--ixx-prologue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the beginning of
+ the inline file.</dd>
+
+ <dt><code><b>--cxx-prologue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the beginning of
+ the source file.</dd>
+
+ <dt><code><b>--fwd-prologue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the beginning of
+ the forward declaration file.</dd>
+
+ <dt><code><b>--prologue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the beginning of
+ each generated file for which there is no file-specific prologue
+ file.</dd>
+
+ <dt><code><b>--hxx-epilogue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the end of the
+ header file.</dd>
+
+ <dt><code><b>--ixx-epilogue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the end of the
+ inline file.</dd>
+
+ <dt><code><b>--cxx-epilogue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the end of the
+ source file.</dd>
+
+ <dt><code><b>--fwd-epilogue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the end of the
+ forward declaration file.</dd>
+
+ <dt><code><b>--epilogue-file</b></code> <code><i>file</i></code></dt>
+ <dd>Insert the content of the <code><i>file</i></code> at the end of each
+ generated file for which there is no file-specific epilogue file.</dd>
+
+ <dt><code><b>--export-symbol</b></code> <code><i>symbol</i></code></dt>
+ <dd>Insert <code><i>symbol</i></code> in places where DLL export/import
+ control statements (<code><b>__declspec(dllexport/dllimport)</b></code>)
+ are necessary.</dd>
+
+ <dt><code><b>--export-xml-schema</b></code></dt>
+ <dd>Export/import types in the XML Schema namespace using the export
+ symbol provided with the <code><b>--export-symbol</b></code> option. The
+ <code><b>XSD_NO_EXPORT</b></code> macro can be used to omit this code
+ during C++ compilation, which may be useful if you would like to use the
+ same generated code across multiple platforms.</dd>
+
+ <dt><code><b>--export-maps</b></code></dt>
+ <dd>Export polymorphism support maps from a Win32 DLL into which this
+ generated code is placed. This is necessary when your type hierarchy is
+ split across several DLLs since otherwise each DLL will have its own set
+ of maps. In this situation the generated code for the DLL which contains
+ base types and/or substitution group heads should be compiled with this
+ option and the generated code for all other DLLs should be compiled with
+ <code><b>--import-maps</b></code>. This option is only valid together with
+ <code><b>--generate-polymorphic</b></code>. The
+ <code><b>XSD_NO_EXPORT</b></code> macro can be used to omit this code
+ during C++ compilation, which may be useful if you would like to use the
+ same generated code across multiple platforms.</dd>
+
+ <dt><code><b>--import-maps</b></code></dt>
+ <dd>Import polymorphism support maps to a Win32 DLL or executable into
+ which this generated code is linked. See the
+ <code><b>--export-maps</b></code> option documentation for details. This
+ options is only valid together with
+ <code><b>--generate-polymorphic</b></code>. The
+ <code><b>XSD_NO_EXPORT</b></code> macro can be used to omit this code
+ during C++ compilation, which may be useful if you would like to use the
+ same generated code across multiple platforms.</dd>
+
+ <dt><code><b>--generate-dep</b></code></dt>
+ <dd>Generate <code><b>make</b></code> dependency information. This option
+ triggers the creation of the <code><b>.d</b></code> file containing the
+ dependencies of the generated files on the main schema file as well as all
+ the schema files that it includes/imports, transitively. This dependency
+ file is then normally included into the main <code><b>makefile</b></code>
+ to implement automatic dependency tracking. See also the
+ <code><b>--dep-*</b></code> options.
+
+ <p>Note also that automatic dependency generation is not supported in the
+ file-per-type mode (<code><b>--file-per-type</b></code>). In this case,
+ all the generated files are produced with a single compiler invocation and
+ depend on all the schemas. As a result, it is easier to establish such a
+ dependency manually, perhaps with the help of the
+ <code><b>--file-list*</b></code> options.</p></dd>
+
+ <dt><code><b>--generate-dep-only</b></code></dt>
+ <dd>Generate <code><b>make</b></code> dependency information only.</dd>
+
+ <dt><code><b>--dep-phony</b></code></dt>
+ <dd>Generate phony targets for included/imported schema files, causing
+ each to depend on nothing. Such dummy rules work around
+ <code><b>make</b></code> errors caused by the removal of schema files
+ without also updating the dependency file to match.</dd>
+
+ <dt><code><b>--dep-target</b></code> <code><i>target</i></code></dt>
+ <dd>Change the target of the dependency rule. By default it contains all
+ the generated C++ files as well as the dependency file itself, without any
+ directory prefixes. If you require multiple targets, then you can specify
+ them as a single, space-separated argument or you can repeat this option
+ multiple times.</dd>
+
+ <dt><code><b>--dep-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use <code><i>suffix</i></code> instead of the default
+ <code><b>.d</b></code> to construct the name of the dependency file. See
+ also <code><b>--dep-file</b></code>.</dd>
+
+ <dt><code><b>--dep-file</b></code> <code><i>path</i></code></dt>
+ <dd>Use <code><i>path</i></code> as the generated dependency file path
+ instead of deriving it from the input file name. Write the dependency
+ information to <code><b>stdout</b></code> if <code><i>path</i></code> is
+ <code><b>-</b></code>. See also <code><b>--dep-regex</b></code>.</dd>
+
+ <dt><code><b>--dep-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use the provided expression to construct the name of the dependency
+ file. <code><i>regex</i></code> is a Perl-like regular expression in the
+ form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. See
+ also the REGEX AND SHELL QUOTING section below.</dd>
+
+ <dt><code><b>--disable-warning</b></code> <code><i>warn</i></code></dt>
+ <dd>Disable printing warning with id <code><i>warn</i></code>. If
+ <code><b>all</b></code> is specified for the warning id then all warnings
+ are disabled.</dd>
+
+ <dt><code><b>--options-file</b></code> <code><i>file</i></code></dt>
+ <dd>Read additional options from <code><i>file</i></code>. Each option
+ should appearing on a separate line optionally followed by space and an
+ option value. Empty lines and lines starting with <code><b>#</b></code>
+ are ignored. Option values can be enclosed in double
+ (<code><b>"</b></code>) or single (<code><b>'</b></code>) quotes to
+ preserve leading and trailing whitespaces as well as to specify empty
+ values. If the value itself contains trailing or leading quotes, enclose
+ it with an extra pair of quotes, for example <code><b>'"x"'</b></code>.
+ Non-leading and non-trailing quotes are interpreted as being part of the
+ option value.
+
+ <p>The semantics of providing options in a file is equivalent to providing
+ the same set of options in the same order on the command line at the point
+ where the <code><b>--options-file</b></code> option is specified except
+ that the shell escaping and quoting is not required. You can repeat this
+ option to specify more than one options file.</p></dd>
+
+ <dt><code><b>--show-sloc</b></code></dt>
+ <dd>Show the number of generated physical source lines of code
+ (SLOC).</dd>
+
+ <dt><code><b>--sloc-limit</b></code> <code><i>num</i></code></dt>
+ <dd>Check that the number of generated physical source lines of code
+ (SLOC) does not exceed <code><i>num</i></code>.</dd>
+
+ <dt><code><b>--proprietary-license</b></code></dt>
+ <dd>Indicate that the generated code is licensed under a proprietary
+ license instead of the GPL.</dd>
+
+ <dt><code><b>--custom-literals</b></code> <code><i>file</i></code></dt>
+ <dd>Load custom XML string to C++ literal mappings from
+ <code><i>file</i></code>. This mechanism can be useful if you are using a
+ custom character encoding and some of the strings in your schemas, for
+ example element/attribute names or enumeration values, contain non-ASCII
+ characters. In this case you will need to provide a custom mapping to C++
+ literals for such strings. The format of this file is specified in the
+ <code><b>custom-literals.xsd</b></code> XML Schema file that can be found
+ in the documentation directory.</dd>
+
+ <dt><code><b>--preserve-anonymous</b></code></dt>
+ <dd>Preserve anonymous types. By default anonymous types are automatically
+ named with names derived from the enclosing elements/attributes. Because
+ mappings implemented by this compiler require all types to be named, this
+ option is only useful if you want to make sure your schemas don't have
+ anonymous types.</dd>
+
+ <dt><code><b>--show-anonymous</b></code></dt>
+ <dd>Show elements and attributes that are of anonymous types. This option
+ only makes sense together with the
+ <code><b>--preserve-anonymous</b></code> option.</dd>
+
+ <dt><code><b>--anonymous-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to derive names for anonymous types from the enclosing
+ attributes/elements. <code><i>regex</i></code> is a Perl-like regular
+ expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported.
+
+ <p>All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that succeeds is
+ used. Regular expressions are applied to a string in the form</p>
+
+ <p class="code"><code><i>filename</i> <i>namespace</i>
+ <i>xpath</i></code></p>
+
+ <p>For instance:</p>
+
+ <p class="code"><code><b>hello.xsd http://example.com/hello
+ element</b></code></p>
+
+ <p class="code"><code><b>hello.xsd http://example.com/hello
+ type/element</b></code></p>
+
+ <p>As an example, the following expression makes all the derived names
+ start with capital letters. This could be useful when your naming
+ convention requires type names to start with capital letters:</p>
+
+ <p class="code"><code><b>%.* .* (.+/)*(.+)%\u$2%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--anonymous-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--anonymous-regex</b></code> option. Use this option to find out
+ why your regular expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--location-map</b></code> <code><i>ol</i></code>=<code><i>nl</i></code></dt>
+ <dd>Map the original schema location <code><i>ol</i></code> that is
+ specified in the XML Schema include or import elements to new schema
+ location <code><i>nl</i></code>. Repeat this option to map more than one
+ schema location. For example, the following option maps the
+ <code><b>http://example.com/foo.xsd</b></code> URL to the
+ <code><b>foo.xsd</b></code> local file.
+
+ <p class="code"><code><b>--location-map
+ http://example.com/foo.xsd=foo.xsd</b></code></p></dd>
+
+ <dt><code><b>--location-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to map schema locations that are specified in the XML Schema include or
+ import elements. <code><i>regex</i></code> is a Perl-like regular
+ expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported. All the regular
+ expressions are pushed into a stack with the last specified expression
+ considered first. The first match that succeeds is used.
+
+ <p>For example, the following expression maps URL locations in the form
+ <code><b>http://example.com/foo/bar.xsd</b></code> to local files in the
+ form <code><b>bar.xsd</b></code>:</p>
+
+ <p class="code"><code><b>%http://.+/(.+)%$1%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--location-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--location-regex</b></code> option. Use this option to find out
+ why your regular expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--file-per-type</b></code></dt>
+ <dd>Generate a separate set of C++ files for each type defined in XML
+ Schema. Note that in this mode you only need to compile the root schema(s)
+ and the code will be generated for all included and imported schemas. This
+ compilation mode is primarily useful when some of your schemas cannot be
+ compiled separately or have cyclic dependencies which involve type
+ inheritance. Other options related to this mode are:
+ <code><b>--type-file-regex</b></code>,
+ <code><b>--schema-file-regex</b></code>,
+ <code><b>--fat-type-file</b></code>, and
+ <code><b>--file-list</b></code>.</dd>
+
+ <dt><code><b>--type-file-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate type names to file names when the
+ <code><b>--file-per-type</b></code> option is specified.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported. All the regular
+ expressions are pushed into a stack with the last specified expression
+ considered first. The first match that succeeds is used. Regular
+ expressions are applied to a string in the form
+
+ <p class="code"><code><i>namespace</i> <i>type-name</i></code></p>
+
+ <p>For example, the following expression maps type <code><b>foo</b></code>
+ that is defined in the <code><b>http://example.com/bar</b></code>
+ namespace to file name <code><b>bar-foo</b></code>:</p>
+
+ <p class="code"><code><b>%http://example.com/(.+)
+ (.+)%$1-$2%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--type-file-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--type-file-regex</b></code> option. Use this option to find out
+ why your regular expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--schema-file-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate schema file names when the
+ <code><b>--file-per-type</b></code> option is specified.
+ <code><i>regex</i></code> is a Perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>. Any
+ character can be used as a delimiter instead of '<code><b>/</b></code>'.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported. All the regular
+ expressions are pushed into a stack with the last specified expression
+ considered first. The first match that succeeds is used. Regular
+ Expressions are applied to the absolute filesystem path of a schema file
+ and the result, including the directory part, if any, is used to derive
+ the <code><b>#include</b></code> directive paths as well as the generated
+ C++ file paths. This option, along with
+ <code><b>--type-file-regex</b></code> are primarily useful to place the
+ generated files into subdirectories or to resolve file name conflicts.
+
+ <p>For example, the following expression maps schema files in the
+ <code><b>foo/1.0.0/</b></code> subdirectory to the files in the
+ <code><b>foo/</b></code> subdirectory. As a result, the
+ <code><b>#include</b></code> directive paths for such schemas will be in
+ the <code><b>foo/schema.hxx</b></code> form and the generated C++ files
+ will be placed into the <code><b>foo/</b></code> subdirectory:</p>
+
+ <p class="code"><code><b>%.*/foo/1.0.0/(.+)%foo/$1%</b></code></p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p></dd>
+
+ <dt><code><b>--schema-file-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ <code><b>--schema-file-regex</b></code> option. Use this option to find
+ out why your regular expressions don't do what you expected them to
+ do.</dd>
+
+ <dt><code><b>--fat-type-file</b></code></dt>
+ <dd>Generate code corresponding to global elements into type files instead
+ of schema files when the <code><b>--type-file-regex</b></code> option is
+ specified. This option is primarily useful when trying to minimize the
+ amount of object code that is linked to an executable by packaging
+ compiled generated code into a static (archive) library.</dd>
+
+ <dt><code><b>--file-list</b></code> <code><i>file</i></code></dt>
+ <dd>Write a list of generated C++ files to <code><i>file</i></code> or to
+ <code><b>stdout</b></code> if <code><i>file</i></code> is
+ <code><b>-</b></code>. This option is primarily useful in the
+ file-per-type compilation mode (<code><b>--file-per-type</b></code>) to
+ create a list of generated C++ files, for example, as a makefile
+ fragment.</dd>
+
+ <dt><code><b>--file-list-only</b></code></dt>
+ <dd>Only write the list of C++ files that would be generated without
+ actually generating them. This option only makes sense together with
+ <code><b>--file-list</b></code>.</dd>
+
+ <dt><code><b>--file-list-prologue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the beginning of the file list. As
+ a convenience, all occurrences of the <code><b>\n</b></code> character
+ sequence in <code><i>text</i></code> are replaced with new lines. This
+ option can, for example, be used to assign the generated file list to a
+ makefile variable.</dd>
+
+ <dt><code><b>--file-list-epilogue</b></code> <code><i>text</i></code></dt>
+ <dd>Insert <code><i>text</i></code> at the end of the file list. As a
+ convenience, all occurrences of the <code><b>\n</b></code> character
+ sequence in <code><i>text</i></code> are replaced with new lines.</dd>
+
+ <dt><code><b>--file-list-delim</b></code> <code><i>text</i></code></dt>
+ <dd>Delimit file names written to the file list with
+ <code><i>text</i></code> instead of new lines. As a convenience, all
+ occurrences of the <code><b>\n</b></code> character sequence in
+ <code><i>text</i></code> are replaced with new lines.</dd>
+ </dl>
+
+ <h2>CXX-TREE COMMAND OPTIONS</h2>
+ <dl class="options">
+ <dt><code><b>--generate-polymorphic</b></code></dt>
+ <dd>Generate polymorphism-aware code. Specify this option if you use
+ substitution groups or <code><b>xsi:type</b></code>. Use the
+ <code><b>--polymorphic-type</b></code> or
+ <code><b>--polymorphic-type-all</b></code> option to specify which type
+ hierarchies are polymorphic.</dd>
+
+ <dt><code><b>--polymorphic-type</b></code> <code><i>type</i></code></dt>
+ <dd>Indicate that <code><i>type</i></code> is a root of a polymorphic type
+ hierarchy. The compiler can often automatically determine which types are
+ polymorphic based on the substitution group declarations. However, you may
+ need to use this option if you are not using substitution groups or if
+ substitution groups are defined in another schema. You need to specify
+ this option when compiling every schema file that references
+ <code><i>type</i></code>. The <code><i>type</i></code> argument is an XML
+ Schema type name that can be optionally qualified with a namespace in the
+ <code><i>namespace</i><b>#</b><i>name</i></code> form.</dd>
+
+ <dt><code><b>--polymorphic-type-all</b></code></dt>
+ <dd>Indicate that all types should be treated as polymorphic.</dd>
+
+ <dt><code><b>--polymorphic-plate</b></code> <code><i>num</i></code></dt>
+ <dd>Specify the polymorphic map plate the generated code should register
+ on. This functionality is primarily useful to segregate multiple schemas
+ that define the same polymorphic types.</dd>
+
+ <dt><code><b>--ordered-type</b></code> <code><i>type</i></code></dt>
+ <dd>Indicate that element order in <code><i>type</i></code> is
+ significant. An example would be a complex type with unbounded choice as a
+ content model where the element order in XML has application-specific
+ semantics. For ordered types the compiler generates a special container
+ data member and a corresponding set of accessors and modifiers that are
+ used to capture the order of elements and, for mixed content, of text.
+
+ <p>The <code><i>type</i></code> argument is an XML Schema type name that
+ can be optionally qualified with a namespace in the
+ <code><i>namespace</i><b>#</b><i>name</i></code> form. Note also that you
+ will need to specify this option when compiling every schema file that has
+ other ordered types derived from this type.</p></dd>
+
+ <dt><code><b>--ordered-type-derived</b></code></dt>
+ <dd>Automatically treat types derived from ordered bases as also ordered.
+ This is primarily useful if you would like to be able to iterate over the
+ complete content using the content order container.</dd>
+
+ <dt><code><b>--ordered-type-mixed</b></code></dt>
+ <dd>Automatically treat complex types with mixed content as ordered.</dd>
+
+ <dt><code><b>--ordered-type-all</b></code></dt>
+ <dd>Indicate that element order in all types is significant.</dd>
+
+ <dt><code><b>--order-container</b></code> <code><i>type</i></code></dt>
+ <dd>Specify a custom class template that should be used as a container for
+ the content order in ordered types instead of the default
+ <code><b>std::vector</b></code>. See <code><b>--ordered-type</b></code>
+ for more information on ordered type. This option is primarily useful if
+ you need to perform more complex lookups in the content order container,
+ for example by element id. In this case, a container like Boost
+ multi-index may be more convenient. Note that if using a custom container,
+ you will also most likely need to include the relevant headers using the
+ <code><b>--hxx-prologue*</b></code> options.</dd>
+
+ <dt><code><b>--generate-serialization</b></code></dt>
+ <dd>Generate serialization functions. Serialization functions convert the
+ object model back to XML.</dd>
+
+ <dt><code><b>--generate-ostream</b></code></dt>
+ <dd>Generate ostream insertion operators
+ (<code><b>operator&lt;&lt;</b></code>) for generated types. This allows
+ one to easily print a fragment or the whole object model for debugging or
+ logging.</dd>
+
+ <dt><code><b>--generate-doxygen</b></code></dt>
+ <dd>Generate documentation comments suitable for extraction by the Doxygen
+ documentation system. Documentation from annotations is added to the
+ comments if present in the schema.</dd>
+
+ <dt><code><b>--generate-comparison</b></code></dt>
+ <dd>Generate comparison operators (<code><b>operator==</b></code> and
+ <code><b>operator!=</b></code>) for complex types. Comparison is performed
+ member-wise.</dd>
+
+ <dt><code><b>--generate-default-ctor</b></code></dt>
+ <dd>Generate default constructors even for types that have required
+ members. Required members of an instance constructed using such a
+ constructor are not initialized and accessing them results in undefined
+ behavior.</dd>
+
+ <dt><code><b>--generate-from-base-ctor</b></code></dt>
+ <dd>Generate constructors that expect an instance of a base type followed
+ by all required members.</dd>
+
+ <dt><code><b>--suppress-assignment</b></code></dt>
+ <dd>Suppress the generation of copy assignment operators for complex
+ types. If this option is specified, the copy assignment operators for such
+ types are declared private and left unimplemented.</dd>
+
+ <dt><code><b>--generate-detach</b></code></dt>
+ <dd>Generate detach functions for required elements and attributes. Detach
+ functions for optional and sequence cardinalities are provided by the
+ respective containers. These functions, for example, allow you to move
+ sub-trees in the object model either within the same tree or between
+ different trees.</dd>
+
+ <dt><code><b>--generate-wildcard</b></code></dt>
+ <dd>Generate accessors and modifiers as well as parsing and serialization
+ code for XML Schema wildcards (<code><b>any</b></code> and
+ <code><b>anyAttribute</b></code>). XML content matched by wildcards is
+ presented as DOM fragments. Note that you need to initialize the
+ Xerces-C++ runtime if you are using this option.</dd>
+
+ <dt><code><b>--generate-any-type</b></code></dt>
+ <dd>Extract and store content of the XML Schema
+ <code><b>anyType</b></code> type as a DOM fragment. Note that you need to
+ initialize the Xerces-C++ runtime if you are using this option.</dd>
+
+ <dt><code><b>--generate-insertion</b></code> <code><i>os</i></code></dt>
+ <dd>Generate data representation stream insertion operators for the
+ <code><i>os</i></code> output stream type. Repeat this option to specify
+ more than one stream type. The ACE CDR stream
+ (<code><b>ACE_OutputCDR</b></code>) and RPC XDR are recognized by the
+ compiler and the necessary <code><b>#include</b></code> directives are
+ automatically generated. For custom stream types use the
+ <code><b>--hxx-prologue*</b></code> options to provide the necessary
+ declarations.</dd>
+
+ <dt><code><b>--generate-extraction</b></code> <code><i>is</i></code></dt>
+ <dd>Generate data representation stream extraction constructors for the
+ <code><i>is</i></code> input stream type. Repeat this option to specify
+ more than one stream type. The ACE CDR stream
+ (<code><b>ACE_InputCDR</b></code>) and RPC XDR are recognized by the
+ compiler and the necessary <code><b>#include</b></code> directives are
+ automatically generated. For custom stream types use the
+ <code><b>--hxx-prologue*</b></code> options to provide the necessary
+ declarations.</dd>
+
+ <dt><code><b>--generate-forward</b></code></dt>
+ <dd>Generate a separate header file with forward declarations for the
+ types being generated.</dd>
+
+ <dt><code><b>--suppress-parsing</b></code></dt>
+ <dd>Suppress the generation of the parsing functions and constructors. Use
+ this option to reduce the generated code size when parsing from XML is not
+ needed.</dd>
+
+ <dt><code><b>--generate-element-type</b></code></dt>
+ <dd>Generate types instead of parsing and serialization functions for root
+ elements. This is primarily useful to distinguish object models with the
+ same root type but with different root elements.</dd>
+
+ <dt><code><b>--generate-element-map</b></code></dt>
+ <dd>Generate a root element map that allows uniform parsing and
+ serialization of multiple root elements. This option is only valid
+ together with <code><b>--generate-element-type</b></code>.</dd>
+
+ <dt><code><b>--generate-intellisense</b></code></dt>
+ <dd>Generate workarounds for IntelliSense bugs in Visual Studio 2005
+ (8.0). When this option is used, the resulting code is slightly more
+ verbose. IntelliSense in Visual Studio 2008 (9.0) and later does not
+ require these workarounds. Support for IntelliSense in Visual Studio 2003
+ (7.1) is improved with this option but is still incomplete.</dd>
+
+ <dt><code><b>--omit-default-attributes</b></code></dt>
+ <dd>Omit attributes with default and fixed values from serialized XML
+ documents.</dd>
+
+ <dt><code><b>--type-naming</b></code> <code><i>style</i></code></dt>
+ <dd>Specify the type naming convention that should be used in the
+ generated code. Valid styles are <code><b>knr</b></code> (default),
+ <code><b>ucc</b></code>, and <code><b>java</b></code>. See the NAMING
+ CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--function-naming</b></code> <code><i>style</i></code></dt>
+ <dd>Specify the function naming convention that should be used in the
+ generated code. Valid styles are <code><b>knr</b></code> (default),
+ <code><b>lcc</b></code>, <code><b>ucc</b></code>, and
+ <code><b>java</b></code>. See the NAMING CONVENTION section below for more
+ information.</dd>
+
+ <dt><code><b>--type-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema type names to C++ type names. See the NAMING
+ CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--accessor-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes to C++ accessor
+ function names. See the NAMING CONVENTION section below for more
+ information.</dd>
+
+ <dt><code><b>--one-accessor-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality one
+ to C++ accessor function names. See the NAMING CONVENTION section below
+ for more information.</dd>
+
+ <dt><code><b>--opt-accessor-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality
+ optional to C++ accessor function names. See the NAMING CONVENTION section
+ below for more information.</dd>
+
+ <dt><code><b>--seq-accessor-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality
+ sequence to C++ accessor function names. See the NAMING CONVENTION section
+ below for more information.</dd>
+
+ <dt><code><b>--modifier-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes to C++ modifier
+ function names. See the NAMING CONVENTION section below for more
+ information.</dd>
+
+ <dt><code><b>--one-modifier-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality one
+ to C++ modifier function names. See the NAMING CONVENTION section below
+ for more information.</dd>
+
+ <dt><code><b>--opt-modifier-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality
+ optional to C++ modifier function names. See the NAMING CONVENTION section
+ below for more information.</dd>
+
+ <dt><code><b>--seq-modifier-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema names of elements/attributes with cardinality
+ sequence to C++ modifier function names. See the NAMING CONVENTION section
+ below for more information.</dd>
+
+ <dt><code><b>--parser-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema element names to C++ parsing function names. See
+ the NAMING CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--serializer-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema element names to C++ serialization function names.
+ See the NAMING CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--const-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema-derived names to C++ constant names. See the
+ NAMING CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--enumerator-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema enumeration values to C++ enumerator names. See
+ the NAMING CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--element-type-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Add <code><i>regex</i></code> to the list of regular expressions used
+ to translate XML Schema element names to C++ element type names. See the
+ NAMING CONVENTION section below for more information.</dd>
+
+ <dt><code><b>--name-regex-trace</b></code></dt>
+ <dd>Trace the process of applying regular expressions specified with the
+ name transformation options. Use this option to find out why your regular
+ expressions don't do what you expected them to do.</dd>
+
+ <dt><code><b>--root-element-first</b></code></dt>
+ <dd>Treat only the first global element as a document root. By default all
+ global elements are considered document roots.</dd>
+
+ <dt><code><b>--root-element-last</b></code></dt>
+ <dd>Treat only the last global element as a document root. By default all
+ global elements are considered document roots.</dd>
+
+ <dt><code><b>--root-element-all</b></code></dt>
+ <dd>Treat all global elements as document roots. This is the default
+ behavior. By explicitly specifying this option you can suppress the
+ warning that is issued if more than one global element is defined.</dd>
+
+ <dt><code><b>--root-element-none</b></code></dt>
+ <dd>Do not treat any global elements as document roots. By default all
+ global elements are considered document roots.</dd>
+
+ <dt><code><b>--root-element</b></code> <code><i>element</i></code></dt>
+ <dd>Treat only <code><i>element</i></code> as a document root. Repeat this
+ option to specify more than one root element.</dd>
+
+ <dt><code><b>--custom-type</b></code> <code><i>map</i></code></dt>
+ <dd>Use a custom C++ type instead of the generated class. The
+ <code><i>map</i></code> argument is in the form
+ <code><i>name</i>[<b>=</b><i>type</i>[<b>/</b><i>base</i>]]</code>, where
+ <i>name</i> is a type name as defined in XML Schema and <i>type</i> is a
+ C++ type name that should be used instead. If <i>type</i> is not present
+ or empty then the custom type is assumed to have the same name and be
+ defined in the same namespace as the generated class would have. If
+ <i>base</i> is specified then the generated class is still generated but
+ with that name.</dd>
+
+ <dt><code><b>--custom-type-regex</b></code> <code><i>regex</i></code></dt>
+ <dd>Use custom C++ types instead of the generated classes. The
+ <code><i>regex</i></code> argument is in the form
+ <code><b>/</b><i>name-pat</i><b>/</b>[<i>type-sub</i><b>/</b>[<i>base-sub</i><b>/</b>]]</code>,
+ where <i>name-pat</i> is a regex pattern that will be matched against type
+ names as defined in XML Schema and <i>type-sub</i> is a C++ type name
+ substitution that should be used instead. If <i>type-sub</i> is not
+ present or its substitution results in an empty string then the custom
+ type is assumed to have the same name and be defined in the same namespace
+ as the generated class would have. If <i>base-sub</i> is present and its
+ substitution results in a non-empty string then the generated class is
+ still generated but with the result of this substitution as its name. The
+ pattern and substitutions are in the Perl regular expression format. See
+ also the REGEX AND SHELL QUOTING section below.</dd>
+
+ <dt><code><b>--parts</b></code> <code><i>num</i></code></dt>
+ <dd>Split generated source code into <code><i>num</i></code> parts. This
+ is useful when translating large, monolithic schemas and a C++ compiler is
+ not able to compile the resulting source code at once (usually due to
+ insufficient memory).</dd>
+
+ <dt><code><b>--parts-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use <code><i>suffix</i></code> instead of the default
+ '<code><b>-</b></code>' to separate the file name from the part
+ number.</dd>
+ </dl>
+
+ <h2>CXX-PARSER COMMAND OPTIONS</h2>
+ <dl class="options">
+ <dt><code><b>--type-map</b></code> <code><i>mapfile</i></code></dt>
+ <dd>Read XML Schema to C++ type mapping information from
+ <code><i>mapfile</i></code>. Repeat this option to specify several type
+ maps. Type maps are considered in order of appearance and the first match
+ is used. By default all user-defined types are mapped to
+ <code><b>void</b></code>. See the TYPE MAP section below for more
+ information.</dd>
+
+ <dt><code><b>--xml-parser</b></code> <code><i>parser</i></code></dt>
+ <dd>Use <code><i>parser</i></code> as the underlying XML parser. Valid
+ values are <code><b>xerces</b></code> for Xerces-C++ (default) and
+ <code><b>expat</b></code> for Expat.</dd>
+
+ <dt><code><b>--generate-validation</b></code></dt>
+ <dd>Generate validation code. The validation code ("perfect parser")
+ ensures that instance documents conform to the schema. Validation code is
+ generated by default when the selected underlying XML parser is
+ non-validating (<code><b>expat</b></code>).</dd>
+
+ <dt><code><b>--suppress-validation</b></code></dt>
+ <dd>Suppress the generation of validation code. Validation is suppressed
+ by default when the selected underlying XML parser is validating
+ (<code><b>xerces</b></code>).</dd>
+
+ <dt><code><b>--generate-polymorphic</b></code></dt>
+ <dd>Generate polymorphism-aware code. Specify this option if you use
+ substitution groups or <code><b>xsi:type</b></code>.</dd>
+
+ <dt><code><b>--generate-noop-impl</b></code></dt>
+ <dd>Generate a sample parser implementation that does nothing (no
+ operation). The sample implementation can then be filled with the
+ application-specific code. For an input file in the form
+ <code><b>name.xsd</b></code> this option triggers the generation of two
+ additional C++ files in the form: <code><b>name-pimpl.hxx</b></code>
+ (parser implementation header file) and <code><b>name-pimpl.cxx</b></code>
+ (parser implementation source file).</dd>
+
+ <dt><code><b>--generate-print-impl</b></code></dt>
+ <dd>Generate a sample parser implementation that prints the XML data to
+ <code>STDOUT</code>. For an input file in the form
+ <code><b>name.xsd</b></code> this option triggers the generation of two
+ additional C++ files in the form: <code><b>name-pimpl.hxx</b></code>
+ (parser implementation header file) and <code><b>name-pimpl.cxx</b></code>
+ (parser implementation source file).</dd>
+
+ <dt><code><b>--generate-test-driver</b></code></dt>
+ <dd>Generate a test driver for the sample parser implementation. For an
+ input file in the form <code><b>name.xsd</b></code> this option triggers
+ the generation of an additional C++ file in the form
+ <code><b>name-driver.cxx</b></code>.</dd>
+
+ <dt><code><b>--force-overwrite</b></code></dt>
+ <dd>Force overwriting of the existing implementation and test driver
+ files. Use this option only if you do not mind loosing the changes you
+ have made in the sample implementation or test driver files.</dd>
+
+ <dt><code><b>--root-element-first</b></code></dt>
+ <dd>Indicate that the first global element is the document root. This
+ information is used to generate the test driver for the sample
+ implementation.</dd>
+
+ <dt><code><b>--root-element-last</b></code></dt>
+ <dd>Indicate that the last global element is the document root. This
+ information is used to generate the test driver for the sample
+ implementation.</dd>
+
+ <dt><code><b>--root-element</b></code> <code><i>element</i></code></dt>
+ <dd>Indicate that <code><i>element</i></code> is the document root. This
+ information is used to generate the test driver for the sample
+ implementation.</dd>
+
+ <dt><code><b>--skel-type-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>_pskel</b></code> to construct the names of the generated parser
+ skeletons.</dd>
+
+ <dt><code><b>--skel-file-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>-pskel</b></code> to construct the names of the generated parser
+ skeleton files.</dd>
+
+ <dt><code><b>--impl-type-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>_pimpl</b></code> to construct the names of the parser
+ implementations for the built-in XML Schema types as well as sample parser
+ implementations.</dd>
+
+ <dt><code><b>--impl-file-suffix</b></code> <code><i>suffix</i></code></dt>
+ <dd>Use the provided <code><i>suffix</i></code> instead of the default
+ <code><b>-pimpl</b></code> to construct the names of the generated sample
+ parser implementation files.</dd>
+ </dl>
+
+ <h1>NAMING CONVENTION</h1>
+
+ <p>The compiler can be instructed to use a particular naming
+ convention in the generated code. A number of widely-used
+ conventions can be selected using the <code><b>--type-naming</b></code>
+ and <code><b>--function-naming</b></code> options. A custom
+ naming convention can be achieved using the
+ <code><b>--type-regex</b></code>,
+ <code><b>--accessor-regex</b></code>,
+ <code><b>--one-accessor-regex</b></code>,
+ <code><b>--opt-accessor-regex</b></code>,
+ <code><b>--seq-accessor-regex</b></code>,
+ <code><b>--modifier-regex</b></code>,
+ <code><b>--one-modifier-regex</b></code>,
+ <code><b>--opt-modifier-regex</b></code>,
+ <code><b>--seq-modifier-regex</b></code>,
+ <code><b>--parser-regex</b></code>,
+ <code><b>--serializer-regex</b></code>,
+ <code><b>--const-regex</b></code>,
+ <code><b>--enumerator-regex</b></code>, and
+ <code><b>--element-type-regex</b></code> options.
+ </p>
+
+ <p>The <code><b>--type-naming</b></code> option specifies the
+ convention that should be used for naming C++ types. Possible
+ values for this option are <code><b>knr</b></code> (default),
+ <code><b>ucc</b></code>, and <code><b>java</b></code>. The
+ <code><b>knr</b></code> value (stands for K&amp;R) signifies
+ the standard, lower-case naming convention with the underscore
+ used as a word delimiter, for example: <code>foo</code>,
+ <code>foo_bar</code>. The <code><b>ucc</b></code> (stands
+ for upper-camel-case) and
+ <code><b>java</b></code> values a synonyms for the same
+ naming convention where the first letter of each word in the
+ name is capitalized, for example: <code>Foo</code>,
+ <code>FooBar</code>.</p>
+
+ <p>Similarly, the <code><b>--function-naming</b></code> option
+ specifies the convention that should be used for naming C++
+ functions. Possible values for this option are <code><b>knr</b></code>
+ (default), <code><b>lcc</b></code>, <code><b>ucc</b></code>, and
+ <code><b>java</b></code>. The <code><b>knr</b></code> value (stands
+ for K&amp;R) signifies the standard, lower-case naming convention
+ with the underscore used as a word delimiter, for example:
+ <code>foo()</code>, <code>foo_bar()</code>. The <code><b>lcc</b></code>
+ value (stands for lower-camel-case) signifies a naming convention
+ where the first letter of each word except the first is capitalized,
+ for example: <code>foo()</code>, <code>fooBar()</code>. The
+ <code><b>ucc</b></code> value (stands for upper-camel-case) signifies
+ a naming convention where the first letter of each word is capitalized,
+ for example: <code>Foo()</code>, <code>FooBar()</code>.
+ The <code><b>java</b></code> naming convention is similar to
+ the lower-camel-case one except that accessor functions are prefixed
+ with <code>get</code>, modifier functions are prefixed
+ with <code>set</code>, parsing functions are prefixed
+ with <code>parse</code>, and serialization functions are
+ prefixed with <code>serialize</code>, for example:
+ <code>getFoo()</code>, <code>setFooBar()</code>,
+ <code>parseRoot()</code>, <code>serializeRoot()</code>.</p>
+
+ <p>Note that the naming conventions specified with the
+ <code><b>--type-naming</b></code> and
+ <code><b>--function-naming</b></code> options perform only limited
+ transformations on the names that come from the schema in the
+ form of type, attribute, and element names. In other words, to
+ get consistent results, your schemas should follow a similar
+ naming convention as the one you would like to have in the
+ generated code. Alternatively, you can use the
+ <code><b>--*-regex</b></code> options (discussed below)
+ to perform further transformations on the names that come from
+ the schema.</p>
+
+ <p>The
+ <code><b>--type-regex</b></code>,
+ <code><b>--accessor-regex</b></code>,
+ <code><b>--one-accessor-regex</b></code>,
+ <code><b>--opt-accessor-regex</b></code>,
+ <code><b>--seq-accessor-regex</b></code>,
+ <code><b>--modifier-regex</b></code>,
+ <code><b>--one-modifier-regex</b></code>,
+ <code><b>--opt-modifier-regex</b></code>,
+ <code><b>--seq-modifier-regex</b></code>,
+ <code><b>--parser-regex</b></code>,
+ <code><b>--serializer-regex</b></code>,
+ <code><b>--const-regex</b></code>,
+ <code><b>--enumerator-regex</b></code>, and
+ <code><b>--element-type-regex</b></code> options allow you to
+ specify extra regular expressions for each name category in
+ addition to the predefined set that is added depending on
+ the <code><b>--type-naming</b></code> and
+ <code><b>--function-naming</b></code> options. Expressions
+ that are provided with the <code><b>--*-regex</b></code>
+ options are evaluated prior to any predefined expressions.
+ This allows you to selectively override some or all of the
+ predefined transformations. When debugging your own expressions,
+ it is often useful to see which expressions match which names.
+ The <code><b>--name-regex-trace</b></code> option allows you
+ to trace the process of applying regular expressions to
+ names.</p>
+
+ <p>The value for the <code><b>--*-regex</b></code> options should be
+ a perl-like regular expression in the form
+ <code><b>/</b><i>pattern</i><b>/</b><i>replacement</i><b>/</b></code>.
+ Any character can be used as a delimiter instead of <code><b>/</b></code>.
+ Escaping of the delimiter character in <code><i>pattern</i></code> or
+ <code><i>replacement</i></code> is not supported.
+ All the regular expressions for each category are pushed into a
+ category-specific stack with the last specified expression
+ considered first. The first match that succeeds is used. For the
+ <code><b>--one-accessor-regex</b></code> (accessors with cardinality one),
+ <code><b>--opt-accessor-regex</b></code> (accessors with cardinality optional), and
+ <code><b>--seq-accessor-regex</b></code> (accessors with cardinality sequence)
+ categories the <code><b>--accessor-regex</b></code> expressions are
+ used as a fallback. For the
+ <code><b>--one-modifier-regex</b></code>,
+ <code><b>--opt-modifier-regex</b></code>, and
+ <code><b>--seq-modifier-regex</b></code>
+ categories the <code><b>--modifier-regex</b></code> expressions are
+ used as a fallback. For the <code><b>--element-type-regex</b></code>
+ category the <code><b>--type-regex</b></code> expressions are
+ used as a fallback.</p>
+
+ <p>The type name expressions (<code><b>--type-regex</b></code>)
+ are evaluated on the name string that has the following
+ format:</p>
+
+ <p><code>[<i>namespace</i> ]<i>name</i>[,<i>name</i>][,<i>name</i>][,<i>name</i>]</code></p>
+
+ <p>The element type name expressions
+ (<code><b>--element-type-regex</b></code>), effective only when
+ the <code><b>--generate-element-type</b></code> option is specified,
+ are evaluated on the name string that has the following
+ format:</p>
+
+ <p><code><i>namespace</i> <i>name</i></code></p>
+
+ <p>In the type name format the <code><i>namespace</i></code> part
+ followed by a space is only present for global type names. For
+ global types and elements defined in schemas without a target
+ namespace, the <code><i>namespace</i></code> part is empty but
+ the space is still present. In the type name format after the
+ initial <code><i>name</i></code> component, up to three additional
+ <code><i>name</i></code> components can be present, separated
+ by commas. For example:</p>
+
+ <p><code><b>http://example.com/hello type</b></code></p>
+ <p><code><b>foo</b></code></p>
+ <p><code><b>foo,iterator</b></code></p>
+ <p><code><b>foo,const,iterator</b></code></p>
+
+ <p>The following set of predefined regular expressions is used to
+ transform type names when the upper-camel-case naming convention
+ is selected:</p>
+
+ <p><code><b>/(?:[^ ]* )?([^,]+)/\u$1/</b></code></p>
+ <p><code><b>/(?:[^ ]* )?([^,]+),([^,]+)/\u$1\u$2/</b></code></p>
+ <p><code><b>/(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/\u$1\u$2\u$3/</b></code></p>
+ <p><code><b>/(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/\u$1\u$2\u$3\u$4/</b></code></p>
+
+ <p>The accessor and modifier expressions
+ (<code><b>--*accessor-regex</b></code> and
+ <code><b>--*modifier-regex</b></code>) are evaluated on the name string
+ that has the following format:</p>
+
+ <p><code><i>name</i>[,<i>name</i>][,<i>name</i>]</code></p>
+
+ <p>After the initial <code><i>name</i></code> component, up to two
+ additional <code><i>name</i></code> components can be present,
+ separated by commas. For example:</p>
+
+ <p><code><b>foo</b></code></p>
+ <p><code><b>dom,document</b></code></p>
+ <p><code><b>foo,default,value</b></code></p>
+
+ <p>The following set of predefined regular expressions is used to
+ transform accessor names when the <code><b>java</b></code> naming
+ convention is selected:</p>
+
+ <p><code><b>/([^,]+)/get\u$1/</b></code></p>
+ <p><code><b>/([^,]+),([^,]+)/get\u$1\u$2/</b></code></p>
+ <p><code><b>/([^,]+),([^,]+),([^,]+)/get\u$1\u$2\u$3/</b></code></p>
+
+ <p>For the parser, serializer, and enumerator categories, the
+ corresponding regular expressions are evaluated on local names of
+ elements and on enumeration values, respectively. For example, the
+ following predefined regular expression is used to transform parsing
+ function names when the <code><b>java</b></code> naming convention
+ is selected:</p>
+
+ <p><code><b>/(.+)/parse\u$1/</b></code></p>
+
+ <p>The const category is used to create C++ constant names for the
+ element/wildcard/text content ids in ordered types.</p>
+
+ <p>See also the REGEX AND SHELL QUOTING section below.</p>
+
+ <h1>TYPE MAP</h1>
+
+ <p>Type map files are used in C++/Parser to define a mapping between
+ XML Schema and C++ types. The compiler uses this information
+ to determine the return types of <code><b>post_*</b></code>
+ functions in parser skeletons corresponding to XML Schema
+ types as well as argument types for callbacks corresponding
+ to elements and attributes of these types.</p>
+
+ <p>The compiler has a set of predefined mapping rules that map
+ built-in XML Schema types to suitable C++ types (discussed
+ below) and all other types to <code><b>void</b></code>.
+ By providing your own type maps you can override these predefined
+ rules. The format of the type map file is presented below:
+ </p>
+
+ <pre>
+namespace &lt;schema-namespace> [&lt;cxx-namespace>]
+{
+ (include &lt;file-name>;)*
+ ([type] &lt;schema-type> &lt;cxx-ret-type> [&lt;cxx-arg-type>];)*
+}
+ </pre>
+
+ <p>Both <code><i>&lt;schema-namespace></i></code> and
+ <code><i>&lt;schema-type></i></code> are regex patterns while
+ <code><i>&lt;cxx-namespace></i></code>,
+ <code><i>&lt;cxx-ret-type></i></code>, and
+ <code><i>&lt;cxx-arg-type></i></code> are regex pattern
+ substitutions. All names can be optionally enclosed in
+ <code><b>" "</b></code>, for example, to include white-spaces.</p>
+
+ <p><code><i>&lt;schema-namespace></i></code> determines XML
+ Schema namespace. Optional <code><i>&lt;cxx-namespace></i></code>
+ is prefixed to every C++ type name in this namespace declaration.
+ <code><i>&lt;cxx-ret-type></i></code> is a C++ type name that is
+ used as a return type for the <code><b>post_*</b></code> functions.
+ Optional <code><i>&lt;cxx-arg-type></i></code> is an argument
+ type for callback functions corresponding to elements and attributes
+ of this type. If
+ <code><i>&lt;cxx-arg-type></i></code> is not specified, it defaults
+ to <code><i>&lt;cxx-ret-type></i></code> if <code><i>&lt;cxx-ret-type></i></code>
+ ends with <code><b>*</b></code> or <code><b>&amp;</b></code> (that is,
+ it is a pointer or a reference) and
+ <code><b>const</b>&nbsp;<i>&lt;cxx-ret-type></i><b>&amp;</b></code>
+ otherwise.
+ <code><i>&lt;file-name></i></code> is a file name either in the
+ <code><b>" "</b></code> or <code><b>&lt; ></b></code> format
+ and is added with the <code><b>#include</b></code> directive to
+ the generated code.</p>
+
+ <p>The <code><b>#</b></code> character starts a comment that ends
+ with a new line or end of file. To specify a name that contains
+ <code><b>#</b></code> enclose it in <code><b>" "</b></code>.
+ For example:</p>
+
+ <pre>
+namespace http://www.example.com/xmlns/my my
+{
+ include "my.hxx";
+
+ # Pass apples by value.
+ #
+ apple apple;
+
+ # Pass oranges as pointers.
+ #
+ orange orange_t*;
+}
+ </pre>
+
+ <p>In the example above, for the
+ <code><b>http://www.example.com/xmlns/my#orange</b></code>
+ XML Schema type, the <code><b>my::orange_t*</b></code> C++ type will
+ be used as both return and argument types.</p>
+
+ <p>Several namespace declarations can be specified in a single
+ file. The namespace declaration can also be completely
+ omitted to map types in a schema without a namespace. For
+ instance:</p>
+
+ <pre>
+include "my.hxx";
+apple apple;
+
+namespace http://www.example.com/xmlns/my
+{
+ orange "const orange_t*";
+}
+ </pre>
+
+ <p>The compiler has a number of predefined mapping rules that can be
+ presented as the following map files. The string-based XML Schema
+ built-in types are mapped to either <code><b>std::string</b></code>
+ or <code><b>std::wstring</b></code> depending on the character type
+ selected with the <code><b>--char-type</b></code> option
+ (<code><b>char</b></code> by default). The binary XML Schema types are
+ mapped to either <code>std::unique_ptr&lt;xml_schema::buffer></code>
+ or <code>std::auto_ptr&lt;xml_schema::buffer></code> depending on the C++
+ standard selected with the <code><b>--std</b></code> option
+ (<code><b>c++11</b></code> by default).</p>
+
+ <pre>
+namespace http://www.w3.org/2001/XMLSchema
+{
+ boolean bool bool;
+
+ byte "signed char" "signed char";
+ unsignedByte "unsigned char" "unsigned char";
+
+ short short short;
+ unsignedShort "unsigned short" "unsigned short";
+
+ int int int;
+ unsignedInt "unsigned int" "unsigned int";
+
+ long "long long" "long long";
+ unsignedLong "unsigned long long" "unsigned long long";
+
+ integer "long long" "long long";
+
+ negativeInteger "long long" "long long";
+ nonPositiveInteger "long long" "long long";
+
+ positiveInteger "unsigned long long" "unsigned long long";
+ nonNegativeInteger "unsigned long long" "unsigned long long";
+
+ float float float;
+ double double double;
+ decimal double double;
+
+ string std::string;
+ normalizedString std::string;
+ token std::string;
+ Name std::string;
+ NMTOKEN std::string;
+ NCName std::string;
+ ID std::string;
+ IDREF std::string;
+ language std::string;
+ anyURI std::string;
+
+ NMTOKENS xml_schema::string_sequence;
+ IDREFS xml_schema::string_sequence;
+
+ QName xml_schema::qname;
+
+ base64Binary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
+ hexBinary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
+
+ date xml_schema::date;
+ dateTime xml_schema::date_time;
+ duration xml_schema::duration;
+ gDay xml_schema::gday;
+ gMonth xml_schema::gmonth;
+ gMonthDay xml_schema::gmonth_day;
+ gYear xml_schema::gyear;
+ gYearMonth xml_schema::gyear_month;
+ time xml_schema::time;
+}
+ </pre>
+
+ <p>The last predefined rule maps anything that wasn't mapped by
+ previous rules to <code><b>void</b></code>:</p>
+
+ <pre>
+namespace .*
+{
+ .* void void;
+}
+ </pre>
+
+
+ <p>When you provide your own type maps with the
+ <code><b>--type-map</b></code> option, they are evaluated first.
+ This allows you to selectively override predefined rules.</p>
+
+ <h1>REGEX AND SHELL QUOTING</h1>
+
+ <p>When entering a regular expression argument in the shell
+ command line it is often necessary to use quoting (enclosing
+ the argument in <code><b>"&nbsp;"</b></code> or
+ <code><b>'&nbsp;'</b></code>) in order to prevent the shell
+ from interpreting certain characters, for example, spaces as
+ argument separators and <code><b>$</b></code> as variable
+ expansions.</p>
+
+ <p>Unfortunately it is hard to achieve this in a manner that is
+ portable across POSIX shells, such as those found on
+ GNU/Linux and UNIX, and Windows shell. For example, if you
+ use <code><b>"&nbsp;"</b></code> for quoting you will get a
+ wrong result with POSIX shells if your expression contains
+ <code><b>$</b></code>. The standard way of dealing with this
+ on POSIX systems is to use <code><b>'&nbsp;'</b></code> instead.
+ Unfortunately, Windows shell does not remove <code><b>'&nbsp;'</b></code>
+ from arguments when they are passed to applications. As a result you
+ may have to use <code><b>'&nbsp;'</b></code> for POSIX and
+ <code><b>"&nbsp;"</b></code> for Windows (<code><b>$</b></code> is
+ not treated as a special character on Windows).</p>
+
+ <p>Alternatively, you can save regular expression options into
+ a file, one option per line, and use this file with the
+ <code><b>--options-file</b></code> option. With this approach
+ you don't need to worry about shell quoting.</p>
+
+ <h1>DIAGNOSTICS</h1>
+
+ <p>If the input file is not a valid W3C XML Schema definition,
+ <code><b>xsd</b></code> will issue diagnostic messages to STDERR
+ and exit with non-zero exit code.</p>
+
+ <h1>BUGS</h1>
+
+ <p>Send bug reports to the
+ <a href="mailto:xsd-users@codesynthesis.com">xsd-users@codesynthesis.com</a> mailing list.</p>
+
+ </div>
+ <div id="footer">
+ Copyright &#169; 2005-2023 Code Synthesis.
+
+ <div id="terms">
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/xsd/doc/xsd-epilogue.1 b/xsd/doc/xsd-epilogue.1
index 192880c..9ab1952 100644
--- a/xsd/doc/xsd-epilogue.1
+++ b/xsd/doc/xsd-epilogue.1
@@ -65,6 +65,9 @@ The
value (stands for lower-camel-case) signifies a naming convention where the
first letter of each word except the first is capitalized, for example: foo(),
fooBar(). The
+.B ucc
+value (stands for upper-camel-case) signifies a naming convention where the
+first letter of each word is capitalized, for example: Foo(), FooBar(). The
.B java
naming convention is similar to the lower-camel-case one except that accessor
functions are prefixed with get, modifier functions are prefixed with set,
@@ -378,7 +381,6 @@ namespace http://www.example.com/xmlns/my
.br
.RE
-
The compiler has a number of predefined mapping rules that can be
presented as the following map files. The string-based XML Schema
built-in types are mapped to either
@@ -389,6 +391,14 @@ depending on the character type selected with the
.B --char-type
option
.RB ( char
+by default). The binary XML Schema types are mapped to either
+.B std::unique_ptr<xml_schema::buffer>
+or
+.B std::auto_ptr<xml_schema::buffer>
+depending on the C++ standard selected with the
+.B --std
+option
+.RB ( c++11
by default).
.RS
@@ -468,13 +478,13 @@ namespace http://www.w3.org/2001/XMLSchema
QName xml_schema::qname;
.br
- base64Binary std::auto_ptr<xml_schema::buffer>
+ base64Binary std::[unique|auto]_ptr<xml_schema::buffer>
.br
- std::auto_ptr<xml_schema::buffer>;
+ std::[unique|auto]_ptr<xml_schema::buffer>;
.br
- hexBinary std::auto_ptr<xml_schema::buffer>
+ hexBinary std::[unique|auto]_ptr<xml_schema::buffer>
.br
- std::auto_ptr<xml_schema::buffer>;
+ std::[unique|auto]_ptr<xml_schema::buffer>;
.br
date xml_schema::date;
diff --git a/xsd/doc/xsd-epilogue.xhtml b/xsd/doc/xsd-epilogue.xhtml
index aef0418..178cf8b 100644
--- a/xsd/doc/xsd-epilogue.xhtml
+++ b/xsd/doc/xsd-epilogue.xhtml
@@ -38,14 +38,17 @@
<p>Similarly, the <code><b>--function-naming</b></code> option
specifies the convention that should be used for naming C++
functions. Possible values for this option are <code><b>knr</b></code>
- (default), <code><b>lcc</b></code>, and <code><b>java</b></code>. The
- <code><b>knr</b></code> value (stands for K&amp;R) signifies
- the standard, lower-case naming convention with the underscore
- used as a word delimiter, for example: <code>foo()</code>,
- <code>foo_bar()</code>. The <code><b>lcc</b></code> value
- (stands for lower-camel-case) signifies a naming convention
- where the first letter of each word except the first is
- capitalized, for example: <code>foo()</code>, <code>fooBar()</code>.
+ (default), <code><b>lcc</b></code>, <code><b>ucc</b></code>, and
+ <code><b>java</b></code>. The <code><b>knr</b></code> value (stands
+ for K&amp;R) signifies the standard, lower-case naming convention
+ with the underscore used as a word delimiter, for example:
+ <code>foo()</code>, <code>foo_bar()</code>. The <code><b>lcc</b></code>
+ value (stands for lower-camel-case) signifies a naming convention
+ where the first letter of each word except the first is capitalized,
+ for example: <code>foo()</code>, <code>fooBar()</code>. The
+ <code><b>ucc</b></code> value (stands for upper-camel-case) signifies
+ a naming convention where the first letter of each word is capitalized,
+ for example: <code>Foo()</code>, <code>FooBar()</code>.
The <code><b>java</b></code> naming convention is similar to
the lower-camel-case one except that accessor functions are prefixed
with <code>get</code>, modifier functions are prefixed
@@ -287,7 +290,11 @@ namespace http://www.example.com/xmlns/my
built-in types are mapped to either <code><b>std::string</b></code>
or <code><b>std::wstring</b></code> depending on the character type
selected with the <code><b>--char-type</b></code> option
- (<code><b>char</b></code> by default).</p>
+ (<code><b>char</b></code> by default). The binary XML Schema types are
+ mapped to either <code>std::unique_ptr&lt;xml_schema::buffer></code>
+ or <code>std::auto_ptr&lt;xml_schema::buffer></code> depending on the C++
+ standard selected with the <code><b>--std</b></code> option
+ (<code><b>c++11</b></code> by default).</p>
<pre>
namespace http://www.w3.org/2001/XMLSchema
@@ -334,10 +341,10 @@ namespace http://www.w3.org/2001/XMLSchema
QName xml_schema::qname;
- base64Binary std::auto_ptr&lt;xml_schema::buffer>
- std::auto_ptr&lt;xml_schema::buffer>;
- hexBinary std::auto_ptr&lt;xml_schema::buffer>
- std::auto_ptr&lt;xml_schema::buffer>;
+ base64Binary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
+ hexBinary std::[unique|auto]_ptr&lt;xml_schema::buffer>
+ std::[unique|auto]_ptr&lt;xml_schema::buffer>;
date xml_schema::date;
dateTime xml_schema::date_time;
diff --git a/xsd/doc/xsd-prologue.xhtml b/xsd/doc/xsd-prologue.xhtml
index e52e1fc..6782a32 100644
--- a/xsd/doc/xsd-prologue.xhtml
+++ b/xsd/doc/xsd-prologue.xhtml
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$project$ $version$ Compiler Command Line Manual</title>
+ <meta charset="UTF-8"/>
<meta name="version" content="$version$"/>
<meta name="copyright" content="&#169; $copyright$"/>
<meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,code,generator,manual,man,page"/>
diff --git a/xsd/manifest b/xsd/manifest
index 52e789a..8ae3ef5 100644
--- a/xsd/manifest
+++ b/xsd/manifest
@@ -1,23 +1,162 @@
: 1
name: xsd
-version: 4.2.0-b.2.z
+version: 4.2.1-a.0.z
+language: c++
summary: XML Schema to C++ data binding compiler
license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
topics: C++, XML, XML Schema, XML parser, source code generation
-description-file: README
+description-file: README.md
+package-description-file: PACKAGE-README.md
changes-file: NEWS
-url: https://www.codesynthesis.com/projects/xsd/
-doc-url: https://www.codesynthesis.com/projects/xsd/
-src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd/
+url: https://www.codesynthesis.com/products/xsd/
+doc-url: https://www.codesynthesis.com/products/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/
email: xsd-users@codesynthesis.com ; Mailing list
build-warning-email: builds@codesynthesis.com
requires: host
requires: c++11
-depends: * build2 >= 0.14.0
-depends: * bpkg >= 0.14.0
-depends: libxsd-frontend ^2.1.0-
-depends: libcutl ^1.11.0-
+depends: * build2 >= 0.16.0
+depends: * bpkg >= 0.16.0
+depends: libxsd-frontend ^2.1.0
+depends: libcutl ^1.11.0
depends: libxerces-c ^3.0.0
-depends: * cli ^1.2.0-
+depends: * cli ^1.2.0- ? ($config.xsd.develop)
tests: * xsd-tests == $
examples: * xsd-examples == $
+
+# Binary distribution packages. Overall notes:
+#
+# - Link dependencies that don't come from system packages statically.
+#
+# - We suppress generating binary packages for dependecies (libcutl,
+# libxsd-frontend) with --recursive=auto since they are linked statically.
+#
+# - For archives we strip the default compiler name from metadata since
+# it's unimportant (we link the C++ runtime statically).
+#
+# - We disable warning emails for configurations that build Xerces-C++.
+
+# Note that the Xerces-C++ package is in the unsupported `universe` section on
+# Ubuntu so we have a separate configuration for it where we build Xerces-C++
+# ourselves.
+#
+bindist-debian-builds: bindist
+bindist-debian-build-include: linux_debian*-**
+bindist-debian-build-exclude: **
+bindist-debian-build-config:
+\
++bpkg.bindist.debian:
++bbot.bindist.upload:
+bpkg.bindist.debian:--recursive=auto
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+?sys:libxerces-c
+\
+
+bindist-ubuntu-builds: bindist
+bindist-ubuntu-build-include: linux_ubuntu*-**
+bindist-ubuntu-build-exclude: **
+bindist-ubuntu-build-config:
+\
++bpkg.bindist.debian:
++bbot.bindist.upload:
+bpkg.bindist.debian:--recursive=auto
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+?sys:libicuuc
+?sys:libicui18n
+\
+#bindist-ubuntu-build-error-email: builds@codesynthesis.com
+
+# Note that there is no Xerces-C++ package in RHEL (only in EPEL) so we
+# have a separate configuration for RHEL.
+#
+bindist-fedora-builds: bindist
+bindist-fedora-build-include: linux_fedora*-**
+bindist-fedora-build-exclude: **
+bindist-fedora-build-config:
+\
++bpkg.bindist.fedora:
++bbot.bindist.upload:
+bpkg.bindist.fedora:--recursive=auto
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+?sys:libxerces-c
+\
+
+bindist-rhel-builds: bindist
+bindist-rhel-build-include: linux_rhel*-**
+bindist-rhel-build-exclude: **
+bindist-rhel-build-config:
+\
++bpkg.bindist.fedora:
++bbot.bindist.upload:
+bpkg.bindist.fedora:--recursive=auto
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+?sys:libicuuc
+?sys:libicui18n
+\
+#bindist-rhel-build-error-email: builds@codesynthesis.com
+
+# Note: use static runtime since the DLL runtime is not universally
+# pre-installed.
+#
+bindist-windows-builds: bindist
+bindist-windows-build-include: windows*-**
+bindist-windows-build-exclude: **
+bindist-windows-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--recursive=auto
+bpkg.bindist.archive:--archive-lang-impl=cc=
+bpkg.bindist.archive:config.install.relocatable=true
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+bpkg.create:config.cc.coptions+="/MT"
+b.create:config.cc.coptions="/W2 /O2"
+\
+#bindist-windows-build-error-email: builds@codesynthesis.com
+
+# Note that /usr/lib/libc++.1.dylib is pre-installed and appears to be
+# reasonably compatible (even forward-compatible) so we don't bother
+# with linking it statically for now.
+#
+bindist-macos-builds: bindist
+bindist-macos-build-include: macos*-**
+bindist-macos-build-exclude: **
+bindist-macos-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--recursive=auto
+bpkg.bindist.archive:--archive-lang-impl=cc=
+bpkg.bindist.archive:config.install.relocatable=true
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+b.create:config.cc.coptions="-Wall -O3"
+\
+#bindist-macos-build-error-email: builds@codesynthesis.com
+
+# Generic linux package (built using oldest Debian we support).
+#
+# Note: update glibc version if changing build configuration.
+#
+bindist-linux-glibc2.31-builds: bindist
+bindist-linux-glibc2.31-build-include: linux_debian_11-gcc_10.2-bindist
+bindist-linux-glibc2.31-build-exclude: **
+bindist-linux-glibc2.31-build-config:
+\
++bpkg.bindist.archive:
++bbot.bindist.upload:
+bpkg.bindist.archive:--recursive=auto
+bpkg.bindist.archive:--archive-no-os
+bpkg.bindist.archive:--archive-lang-impl=cc=
+bpkg.bindist.archive:--archive-build-meta=+linux-glibc2.31
+bpkg.bindist.archive:config.install.relocatable=true
+bpkg.create:config.bin.lib=static
+bpkg.create:config.bin.liba.lib="shared static"
+config.cc.loptions+="-static-libstdc++ -static-libgcc"
+\
+#bindist-linux-glibc2.31-build-error-email: builds@codesynthesis.com
diff --git a/xsd/tests/.gitignore b/xsd/tests/.gitignore
new file mode 100644
index 0000000..35ec43f
--- /dev/null
+++ b/xsd/tests/.gitignore
@@ -0,0 +1,2 @@
+test/
+test-*/
diff --git a/xsd/tests/build/.gitignore b/xsd/tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/xsd/tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/xsd/tests/build/bootstrap.build b/xsd/tests/build/bootstrap.build
new file mode 100644
index 0000000..33c8d02
--- /dev/null
+++ b/xsd/tests/build/bootstrap.build
@@ -0,0 +1,8 @@
+# file : tests/build/bootstrap.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+project = # Unnamed subproject.
+
+using config
+using dist
+using test
diff --git a/xsd/tests/build/root.build b/xsd/tests/build/root.build
new file mode 100644
index 0000000..dd7abe5
--- /dev/null
+++ b/xsd/tests/build/root.build
@@ -0,0 +1,16 @@
+# file : tests/build/root.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# We need to configure C++ module to obtain the target information (see
+# below).
+#
+using cxx.config
+
+# Import the XSD compiler we will be testing.
+#
+import! [metadata] xsd = xsd%exe{xsd}
+testscript{*}: test = $xsd
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/xsd/tests/buildfile b/xsd/tests/buildfile
new file mode 100644
index 0000000..201b1d7
--- /dev/null
+++ b/xsd/tests/buildfile
@@ -0,0 +1,4 @@
+# file : tests/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+./: testscript $xsd
diff --git a/xsd/tests/testscript b/xsd/tests/testscript
new file mode 100644
index 0000000..7570d4d
--- /dev/null
+++ b/xsd/tests/testscript
@@ -0,0 +1,26 @@
+# file : tests/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: version
+:
+$* --version >>~/EOO/
+/CodeSynthesis XSD XML Schema to C\+\+ compiler .+/
+/.*/*
+EOO
+
+: basics
+:
+cat <<EOI >=test.xsd;
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:complexType name="hello_t">
+ <xsd:sequence>
+ <xsd:element name="greeting" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="hello" type="hello_t"/>
+</xsd:schema>
+EOI
+$* cxx-tree --generate-inline test.xsd &test.hxx &test.ixx &test.cxx;
+test -f test.hxx && test -f test.ixx && test -f test.cxx
diff --git a/xsd/xsd/.gitignore b/xsd/xsd/.gitignore
index 2d9360c..8c86c4a 100644
--- a/xsd/xsd/.gitignore
+++ b/xsd/xsd/.gitignore
@@ -1,3 +1,3 @@
-xsd
-options.?xx
-version.hxx
+/xsd
+/version.hxx
+/options.?xx
diff --git a/xsd/xsd/buildfile b/xsd/xsd/buildfile
index 1a58561..d4e7af5 100644
--- a/xsd/xsd/buildfile
+++ b/xsd/xsd/buildfile
@@ -5,13 +5,10 @@ import libs = libxsd-frontend%lib{xsd-frontend}
import libs += libcutl%lib{cutl}
import libs += libxerces-c%lib{xerces-c}
-import! [metadata] cli = cli%exe{cli}
-
ops = options cxx/options cxx/parser/options cxx/tree/options
-./: exe{xsd}: {hxx ixx txx cxx}{** -{$ops} -version} \
- {hxx ixx cxx}{$ops} \
- {hxx}{version} \
+./: exe{xsd}: {hxx ixx txx cxx}{** -version -{$ops} -pregenerated/**} \
+ {hxx}{version} \
$libs
# Target metadata, see also --build2-metadata in xsd.cxx.
@@ -28,50 +25,96 @@ exe{xsd}:
hxx{version}: in{version} $src_root/manifest
-# Generated options parser.
+## Consumption build ($develop == false).
#
-# Note: tracking .cli dependencies manually.
+
+# Use pregenerated versions in the consumption build.
#
-cli_options = --std c++11 -I $src_root --generate-specifier \
---generate-file-scanner --suppress-undocumented \
---ostream-type ::std::wostream --exclude-base \
---include-with-brackets --option-length 28 \
---cxx-prologue '#include <xsd/options-parser.hxx>'
+exe{xsd}: pregenerated/{hxx ixx cxx}{**}: include = (!$develop)
-<{hxx ixx cxx}{options}>: cli{options}
-{
- cli_options += --include-prefix xsd --guard-prefix XSD
-}
+if! $develop
+ cxx.poptions =+ "-I($src_base/pregenerated)" # Note: must come first.
-<cxx/{hxx ixx cxx}{options}>: cxx/cli{options} cli{options}
-{
- cli_options += --include-prefix xsd/cxx --guard-prefix XSD_CXX
-}
+# Distribute pregenerated versions only in the consumption build.
+#
+pregenerated/{hxx ixx cxx}{*}: dist = (!$develop)
-<cxx/parser/{hxx ixx cxx}{options}>: cxx/parser/cli{options} cxx/cli{options} \
- cli{options}
-{
- cli_options += --include-prefix xsd/cxx/parser --guard-prefix XSD_CXX_PARSER
-}
+#
+##
+
+## Development build ($develop == true).
+#
-<cxx/tree/{hxx ixx cxx}{options}>: cxx/tree/cli{options} cxx/cli{options} \
- cli{options}
+exe{xsd}: {hxx ixx cxx}{$ops}: include = $develop
+
+if $develop
+ import! [metadata] cli = cli%exe{cli}
+
+# In the development build distribute regenerated {hxx ixx cxx}{options},
+# remapping their locations to the paths of the pregenerated versions (which
+# are only distributed in the consumption build; see above). This way we make
+# sure that the distributed files are always up-to-date.
+#
+for f: $ops
{
- cli_options += --include-prefix xsd/cxx/tree --guard-prefix XSD_CXX_TREE
+ d = $directory($f) # empty, cxx/, etc.
+
+ <{hxx ixx cxx}{$f}>: cli{$f}
+ {
+ dist = ($develop ? $relative([dir_path] "pregenerated/xsd/$d", $d) : false)
+
+ # Symlink the generated code in src for convenience of development.
+ #
+ backlink = true
+ }
}
<hxx{~'/(.*)/'} ixx{~'/\1/'} cxx{~'/\1/'}>: cli{~'/\1/'} $cli
-{
- # Symlink the generated code in src for convenience of development.
- #
- backlink = true
-}
+%
+if $develop
{{
- $cli $cli_options -o $directory($path($>[0])) $path($<[0])
+ t = $path($>[0]).t
+
+ depdb dyndep --byproduct --file $t
+
+ h = $path($>[0])
+ i = $path($>[1])
+ c = $path($>[2])
+
+ d = $directory($h)
+ p = $string($leaf($d, $out_root)) # xsd, xsd/cxx, etc
+
+ options = --std c++11 -I $src_root --include-prefix $p \
+ --guard-prefix $regex.replace($ucase($p), '[/\\]', '_') \
+ --generate-specifier --generate-file-scanner \
+ --suppress-undocumented --ostream-type ::std::wostream \
+ --exclude-base --include-with-brackets --option-length 28 \
+ --cxx-prologue '#include <xsd/options-parser.hxx>'
+
+ $cli $options --generate-dep --dep-file $t -o $d $path($<[0])
+
+ # If the result differs from the pregenerated version, copy it over.
+ #
+ d = [dir_path] $src_base/pregenerated/$p
+
+ dh = $d/$leaf($h)
+ di = $d/$leaf($i)
+ dc = $d/$leaf($c)
+
+ if diff $dh $h >- && \
+ diff $di $i >- && \
+ diff $dc $c >-
+ exit
+ end
+
+ cp $h $dh
+ cp $i $di
+ cp $c $dc
}}
-# Build options.
#
+##
+
# Pass the copyright notice extracted from the LICENSE file.
#
obj{xsd cxx/parser/generator cxx/tree/generator}: \
diff --git a/xsd/xsd/cxx/.gitignore b/xsd/xsd/cxx/.gitignore
new file mode 100644
index 0000000..c6e608b
--- /dev/null
+++ b/xsd/xsd/cxx/.gitignore
@@ -0,0 +1 @@
+options.?xx
diff --git a/xsd/xsd/cxx/elements.cxx b/xsd/xsd/cxx/elements.cxx
index e914f9d..02a768e 100644
--- a/xsd/xsd/cxx/elements.cxx
+++ b/xsd/xsd/cxx/elements.cxx
@@ -102,6 +102,36 @@ namespace CXX
L"xor",
L"xor_eq"
};
+
+ // Note: excluding "identifiers with special meaning" in certain contexts
+ // ("final", "override") since they shouldn't cause any issues.
+ //
+ wchar_t const* keywords_cxx11[] = {
+ L"alignas",
+ L"alignof",
+ L"char16_t",
+ L"char32_t",
+ L"constexpr",
+ L"decltype",
+ L"noexcept",
+ L"nullptr",
+ L"static_assert",
+ L"thread_local"
+ };
+
+ // Note: excluding "identifiers with special meaning" in certain contexts
+ // ("import", "module") since they shouldn't cause any issues.
+ //
+ wchar_t const* keywords_cxx20[] = {
+ L"char8_t",
+ L"concept",
+ L"consteval",
+ L"constinit",
+ L"co_await",
+ L"co_return",
+ L"co_yield",
+ L"requires"
+ };
}
// Context
@@ -268,8 +298,21 @@ namespace CXX
// Populate the keyword set.
//
- for (size_t i (0); i < sizeof (keywords) / sizeof (char*); ++i)
+ for (size_t i (0); i < sizeof (keywords) / sizeof (wchar_t*); ++i)
keyword_set_.insert (keywords[i]);
+
+ if (std >= cxx_version::cxx11)
+ {
+ for (size_t i (0); i < sizeof (keywords_cxx11) / sizeof (wchar_t*); ++i)
+ keyword_set_.insert (keywords_cxx11[i]);
+ }
+
+ if (std >= cxx_version::cxx20)
+ {
+ for (size_t i (0); i < sizeof (keywords_cxx20) / sizeof (wchar_t*); ++i)
+ keyword_set_.insert (keywords_cxx20[i]);
+ }
+
}
String Context::
diff --git a/xsd/xsd/cxx/option-types.cxx b/xsd/xsd/cxx/option-types.cxx
index ad8a3c9..8744d7f 100644
--- a/xsd/xsd/cxx/option-types.cxx
+++ b/xsd/xsd/cxx/option-types.cxx
@@ -17,7 +17,11 @@ namespace CXX
static const char* cxx_version_[] =
{
"c++98",
- "c++11"
+ "c++11",
+ "c++14",
+ "c++17",
+ "c++20",
+ "c++23",
};
string cxx_version::
@@ -38,6 +42,14 @@ namespace CXX
v = cxx_version::cxx98;
else if (s == "c++11")
v = cxx_version::cxx11;
+ else if (s == "c++14")
+ v = cxx_version::cxx14;
+ else if (s == "c++17")
+ v = cxx_version::cxx17;
+ else if (s == "c++20")
+ v = cxx_version::cxx20;
+ else if (s == "c++23")
+ v = cxx_version::cxx23;
else
is.setstate (istream::failbit);
}
diff --git a/xsd/xsd/cxx/option-types.hxx b/xsd/xsd/cxx/option-types.hxx
index bbb15b3..98a493a 100644
--- a/xsd/xsd/cxx/option-types.hxx
+++ b/xsd/xsd/cxx/option-types.hxx
@@ -14,10 +14,14 @@ namespace CXX
enum value
{
cxx98,
- cxx11
+ cxx11,
+ cxx14,
+ cxx17,
+ cxx20,
+ cxx23
};
- cxx_version (value v = value (0)) : v_ (v) {}
+ cxx_version (value v) : v_ (v) {}
operator value () const {return v_;}
std::string
diff --git a/xsd/xsd/cxx/options.cli b/xsd/xsd/cxx/options.cli
index 2c50f19..1be7607 100644
--- a/xsd/xsd/cxx/options.cli
+++ b/xsd/xsd/cxx/options.cli
@@ -15,17 +15,19 @@ namespace CXX
{
// Language.
//
- cxx_version --std = cxx_version::cxx98
+ cxx_version --std = cxx_version::cxx11
{
"<version>",
"Specify the C++ standard that the generated code should conform to.
- Valid values are \cb{c++98} (default) and \cb{c++11}.
+ Valid values are \cb{c++98}, \cb{c++11} (default), \cb{c++14},
+ \cb{c++17}, \cb{c++20}, and \cb{c++23}.
The C++ standard affects various aspects of the generated code that
are discussed in more detail in various mapping-specific
documentation. Overall, when C++11 is selected, the generated
code relies on the move semantics and uses \cb{std::unique_ptr}
- instead of deprecated \cb{std::auto_ptr}.
+ instead of deprecated \cb{std::auto_ptr}. Currently, there is no
+ difference between the C++11 and the later standards modes.
When the C++11 mode is selected, you normally don't need to
perform any extra steps other than enable C++11 in your C++
@@ -498,7 +500,7 @@ namespace CXX
generated files on the main schema file as well as all the schema
files that it includes/imports, transitively. This dependency file
is then normally included into the main \cb{makefile} to implement
- automatic dependency tracking.
+ automatic dependency tracking. See also the \cb{--dep-*} options.
Note also that automatic dependency generation is not supported in
the file-per-type mode (\cb{--file-per-type}). In this case, all
@@ -534,8 +536,16 @@ namespace CXX
NarrowString --dep-suffix = ".d"
{
"<suffix>",
- "Use the provided <suffix> instead of the default \cb{.d} to
- construct the name of the dependency file."
+ "Use <suffix> instead of the default \cb{.d} to construct the name of
+ the dependency file. See also \cb{--dep-file}."
+ };
+
+ NarrowString --dep-file
+ {
+ "<path>",
+ "Use <path> as the generated dependency file path instead of deriving
+ it from the input file name. Write the dependency information to
+ \cb{stdout} if <path> is \cb{-}. See also \cb{--dep-regex}."
};
NarrowString --dep-regex
diff --git a/xsd/xsd/cxx/parser/generator.cxx b/xsd/xsd/cxx/parser/generator.cxx
index 91af898..b1acdbb 100644
--- a/xsd/xsd/cxx/parser/generator.cxx
+++ b/xsd/xsd/cxx/parser/generator.cxx
@@ -77,19 +77,19 @@ namespace CXX
"// along with this program; if not, write to the Free Software\n"
"// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
"//\n"
- "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
- "// permission to link this program with the Xerces-C++ library (or with\n"
- "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
- "// and distribute linked combinations including the two. You must obey\n"
- "// the GNU General Public License version 2 in all respects for all of\n"
- "// the code used other than Xerces-C++. If you modify this copy of the\n"
- "// program, you may extend this exception to your version of the program,\n"
- "// but you are not obligated to do so. If you do not wish to do so, delete\n"
- "// this exception statement from your version.\n"
+ "// In addition, as a special exception, Code Synthesis gives permission\n"
+ "// to link this program with the Xerces-C++ library (or with modified\n"
+ "// versions of Xerces-C++ that use the same license as Xerces-C++), and\n"
+ "// distribute linked combinations including the two. You must obey the GNU\n"
+ "// General Public License version 2 in all respects for all of the code\n"
+ "// used other than Xerces-C++. If you modify this copy of the program, you\n"
+ "// may extend this exception to your version of the program, but you are\n"
+ "// not obligated to do so. If you do not wish to do so, delete this\n"
+ "// exception statement from your version.\n"
"//\n"
- "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
- "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
- "// in the accompanying FLOSSE file.\n"
+ "// Furthermore, Code Synthesis makes a special exception for the Free/Libre\n"
+ "// and Open Source Software (FLOSS) which is described in the accompanying\n"
+ "// FLOSSE file.\n"
"//\n\n";
char const copyright_proprietary[] =
@@ -98,8 +98,7 @@ namespace CXX
"// This program was generated by CodeSynthesis XSD, an XML Schema\n"
"// to C++ data binding compiler, in the Proprietary License mode.\n"
"// You should have received a proprietary license from Code Synthesis\n"
- "// Tools CC prior to generating this code. See the license text for\n"
- "// conditions.\n"
+ "// prior to generating this code. See the license text for conditions.\n"
"//\n\n";
char const copyright_impl[] =
@@ -232,8 +231,11 @@ namespace CXX
throw Failed ();
}
+ bool gen_cxx (!ops.file_list_only ());
+
// Process names.
//
+ if (gen_cxx)
{
NameProcessor proc;
proc.process (ops, schema, file_path, string_literal_map);
@@ -245,7 +247,7 @@ namespace CXX
// Compute state machine info.
//
- if (validation)
+ if (gen_cxx && validation)
{
StateProcessor proc;
proc.process (schema, file_path);
@@ -254,6 +256,7 @@ namespace CXX
// Read-in type maps.
//
TypeMap::Namespaces type_map;
+ if (gen_cxx)
{
using namespace TypeMap;
@@ -376,6 +379,7 @@ namespace CXX
// Process types.
//
+ if (gen_cxx)
{
TypeProcessor proc;
proc.process (ops, schema, gen_driver, type_map);
@@ -559,135 +563,165 @@ namespace CXX
if (impl)
{
- if (!ops.force_overwrite ())
+ if (gen_cxx)
{
- WideInputFileStream tmp (
- hxx_impl_path.string ().c_str (), ios_base::in);
+ if (!ops.force_overwrite ())
+ {
+ WideInputFileStream tmp (
+ hxx_impl_path.string ().c_str (), ios_base::in);
- if (tmp.is_open ())
+ if (tmp.is_open ())
+ {
+ wcerr << hxx_impl_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
+
+ tmp.close ();
+ }
+
+ hxx_impl.open (hxx_impl_path.string ().c_str (), ios_base::out);
+
+ if (!hxx_impl.is_open ())
{
- wcerr << hxx_impl_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
+ wcerr << hxx_impl_path << ": error: unable to open in write mode"
+ << endl;
throw Failed ();
}
- tmp.close ();
+ unlinks.add (hxx_impl_path);
}
- hxx_impl.open (hxx_impl_path.string ().c_str (), ios_base::out);
+ file_list.push_back (hxx_impl_path.string ());
- if (!hxx_impl.is_open ())
+ if (gen_cxx)
{
- wcerr << hxx_impl_path << ": error: unable to open in write mode"
- << endl;
- throw Failed ();
- }
+ if (!ops.force_overwrite ())
+ {
+ WideInputFileStream tmp (
+ cxx_impl_path.string ().c_str (), ios_base::in);
- unlinks.add (hxx_impl_path);
- file_list.push_back (hxx_impl_path.string ());
+ if (tmp.is_open ())
+ {
+ wcerr << cxx_impl_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
- if (!ops.force_overwrite ())
- {
- WideInputFileStream tmp (
- cxx_impl_path.string ().c_str (), ios_base::in);
+ tmp.close ();
+ }
- if (tmp.is_open ())
+ cxx_impl.open (cxx_impl_path.string ().c_str (), ios_base::out);
+
+ if (!cxx_impl.is_open ())
{
- wcerr << cxx_impl_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
+ wcerr << cxx_impl_path << ": error: unable to open in write mode"
+ << endl;
throw Failed ();
}
- tmp.close ();
- }
-
- cxx_impl.open (cxx_impl_path.string ().c_str (), ios_base::out);
-
- if (!cxx_impl.is_open ())
- {
- wcerr << cxx_impl_path << ": error: unable to open in write mode"
- << endl;
- throw Failed ();
+ unlinks.add (cxx_impl_path);
}
- unlinks.add (cxx_impl_path);
file_list.push_back (cxx_impl_path.string ());
}
if (driver)
{
- if (!ops.force_overwrite ())
+ if (gen_cxx)
{
- WideInputFileStream tmp (
- cxx_driver_path.string ().c_str (), ios_base::in);
-
- if (tmp.is_open ())
+ if (!ops.force_overwrite ())
{
- wcerr << cxx_driver_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
- throw Failed ();
+ WideInputFileStream tmp (
+ cxx_driver_path.string ().c_str (), ios_base::in);
+
+ if (tmp.is_open ())
+ {
+ wcerr << cxx_driver_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
+
+ tmp.close ();
}
- tmp.close ();
- }
+ cxx_driver.open (cxx_driver_path.string ().c_str (), ios_base::out);
- cxx_driver.open (cxx_driver_path.string ().c_str (), ios_base::out);
+ if (!cxx_driver.is_open ())
+ {
+ wcerr << cxx_driver_path << ": error: unable to open in write " <<
+ "mode" << endl;
+ throw Failed ();
+ }
- if (!cxx_driver.is_open ())
- {
- wcerr << cxx_driver_path << ": error: unable to open in write " <<
- "mode" << endl;
- throw Failed ();
+ unlinks.add (cxx_driver_path);
}
- unlinks.add (cxx_driver_path);
file_list.push_back (cxx_driver_path.string ());
}
// Open the skel files.
//
- WideOutputFileStream hxx (hxx_path.string ().c_str (), ios_base::out);
+ WideOutputFileStream hxx;
WideOutputFileStream ixx;
WideOutputFileStream cxx;
- if (!hxx.is_open ())
+ if (gen_cxx)
{
- wcerr << hxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ hxx.open (hxx_path.string ().c_str (), ios_base::out);
+
+ if (!hxx.is_open ())
+ {
+ wcerr << hxx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (hxx_path);
}
- unlinks.add (hxx_path);
file_list.push_back (hxx_path.string ());
if (inline_)
{
- ixx.open (ixx_path.string ().c_str (), ios_base::out);
-
- if (!ixx.is_open ())
+ if (gen_cxx)
{
- wcerr << ixx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ ixx.open (ixx_path.string ().c_str (), ios_base::out);
+
+ if (!ixx.is_open ())
+ {
+ wcerr << ixx_path << ": error: unable to open in write mode"
+ << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (ixx_path);
}
- unlinks.add (ixx_path);
file_list.push_back (ixx_path.string ());
}
-
if (source)
{
- cxx.open (cxx_path.string ().c_str (), ios_base::out);
-
- if (!cxx.is_open ())
+ if (gen_cxx)
{
- wcerr << cxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ cxx.open (cxx_path.string ().c_str (), ios_base::out);
+
+ if (!cxx.is_open ())
+ {
+ wcerr << cxx_path << ": error: unable to open in write mode"
+ << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (cxx_path);
}
- unlinks.add (cxx_path);
file_list.push_back (cxx_path.string ());
}
+ if (!gen_cxx)
+ return 0;
+
// Print copyright and license.
//
char const* copyright (
diff --git a/xsd/xsd/cxx/tree/generator.cxx b/xsd/xsd/cxx/tree/generator.cxx
index 5601f4e..9782b4d 100644
--- a/xsd/xsd/cxx/tree/generator.cxx
+++ b/xsd/xsd/cxx/tree/generator.cxx
@@ -54,6 +54,8 @@ using namespace XSDFrontend::SemanticGraph;
//
//
+typedef std::wostream WideOutputStream;
+
typedef std::wifstream WideInputFileStream;
typedef std::wofstream WideOutputFileStream;
@@ -80,19 +82,19 @@ namespace CXX
"// along with this program; if not, write to the Free Software\n"
"// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
"//\n"
- "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
- "// permission to link this program with the Xerces-C++ library (or with\n"
- "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
- "// and distribute linked combinations including the two. You must obey\n"
- "// the GNU General Public License version 2 in all respects for all of\n"
- "// the code used other than Xerces-C++. If you modify this copy of the\n"
- "// program, you may extend this exception to your version of the program,\n"
- "// but you are not obligated to do so. If you do not wish to do so, delete\n"
- "// this exception statement from your version.\n"
+ "// In addition, as a special exception, Code Synthesis gives permission\n"
+ "// to link this program with the Xerces-C++ library (or with modified\n"
+ "// versions of Xerces-C++ that use the same license as Xerces-C++), and\n"
+ "// distribute linked combinations including the two. You must obey the GNU\n"
+ "// General Public License version 2 in all respects for all of the code\n"
+ "// used other than Xerces-C++. If you modify this copy of the program, you\n"
+ "// may extend this exception to your version of the program, but you are\n"
+ "// not obligated to do so. If you do not wish to do so, delete this\n"
+ "// exception statement from your version.\n"
"//\n"
- "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
- "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
- "// in the accompanying FLOSSE file.\n"
+ "// Furthermore, Code Synthesis makes a special exception for the Free/Libre\n"
+ "// and Open Source Software (FLOSS) which is described in the accompanying\n"
+ "// FLOSSE file.\n"
"//\n\n";
char const copyright_proprietary[] =
@@ -101,8 +103,7 @@ namespace CXX
"// This program was generated by CodeSynthesis XSD, an XML Schema\n"
"// to C++ data binding compiler, in the Proprietary License mode.\n"
"// You should have received a proprietary license from Code Synthesis\n"
- "// Tools CC prior to generating this code. See the license text for\n"
- "// conditions.\n"
+ "// prior to generating this code. See the license text for conditions.\n"
"//\n\n";
}
@@ -232,7 +233,7 @@ namespace CXX
throw Failed ();
}
- bool gen_cxx (!ops.generate_dep_only ());
+ bool gen_cxx (!ops.generate_dep_only () && !ops.file_list_only ());
// Process ordered types.
//
@@ -345,9 +346,13 @@ namespace CXX
? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + fwd_suffix + "#"
: ops.fwd_regex ());
- Regex dep_expr (ops.dep_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + dep_suffix + "#"
- : ops.dep_regex ());
+ // @@ This will blow up if --dep-file value contains backslashes (e.g.,
+ // it's a Windows path).
+ //
+ Regex dep_expr (
+ ops.dep_regex_specified () ? ops.dep_regex () :
+ ops.dep_file_specified () ? "#.+#" + ops.dep_file () + "#" :
+ "#^(.+?)(\\.[^./\\\\]+)?$#$1" + dep_suffix + "#");
if (header && !hxx_expr.match (name))
{
@@ -397,7 +402,7 @@ namespace CXX
Path hxx_path (hxx_name);
Path ixx_path (ixx_name);
Path fwd_path (fwd_name);
- Path dep_path (dep_name);
+ Path dep_path (dep_name != "-" ? dep_name : NarrowString ());
Paths cxx_paths;
if (source)
@@ -458,10 +463,11 @@ namespace CXX
if (!out_dir.empty ())
{
- hxx_path = out_dir / hxx_path;
- ixx_path = out_dir / ixx_path;
- fwd_path = out_dir / fwd_path;
- dep_path = out_dir / dep_path;
+ if (!hxx_path.empty ()) hxx_path = out_dir / hxx_path;
+ if (!ixx_path.empty ()) ixx_path = out_dir / ixx_path;
+ if (!fwd_path.empty ()) fwd_path = out_dir / fwd_path;
+ if (!dep_path.empty () &&
+ !dep_path.absolute ()) dep_path = out_dir / dep_path;
for (Paths::iterator i (cxx_paths.begin ());
i != cxx_paths.end (); ++i)
@@ -473,93 +479,116 @@ namespace CXX
WideOutputFileStream hxx;
WideOutputFileStream ixx;
WideOutputFileStream fwd;
- WideOutputFileStream dep;
+ WideOutputFileStream depf; // See dep below.
WideOutputFileStreams cxx;
// DEP
//
if (gen_dep)
{
- dep.open (dep_path.string ().c_str (), ios_base::out);
-
- if (!dep.is_open ())
+ if (!dep_path.empty ())
{
- wcerr << dep_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ depf.open (dep_path.string ().c_str (), ios_base::out);
+
+ if (!depf.is_open ())
+ {
+ wcerr << dep_path << ": error: unable to open in write mode"
+ << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (dep_path);
}
- unlinks.add (dep_path);
- file_list.push_back (dep_path.string ());
+ // Note: not adding to file_list.
}
+ WideOutputStream& dep (gen_dep && !dep_path.empty () ? depf : wcout);
+
// FWD
//
- if (gen_cxx && forward)
+ if (forward)
{
- fwd.open (fwd_path.string ().c_str (), ios_base::out);
-
- if (!fwd.is_open ())
+ if (gen_cxx)
{
- wcerr << fwd_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ fwd.open (fwd_path.string ().c_str (), ios_base::out);
+
+ if (!fwd.is_open ())
+ {
+ wcerr << fwd_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (fwd_path);
}
- unlinks.add (fwd_path);
file_list.push_back (fwd_path.string ());
}
// HXX
//
- if (gen_cxx && header)
+ if (header)
{
- hxx.open (hxx_path.string ().c_str (), ios_base::out);
-
- if (!hxx.is_open ())
+ if (gen_cxx)
{
- wcerr << hxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ hxx.open (hxx_path.string ().c_str (), ios_base::out);
+
+ if (!hxx.is_open ())
+ {
+ wcerr << hxx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (hxx_path);
}
- unlinks.add (hxx_path);
file_list.push_back (hxx_path.string ());
}
// IXX
//
- if (gen_cxx && inline_)
+ if (inline_)
{
- ixx.open (ixx_path.string ().c_str (), ios_base::out);
-
- if (!ixx.is_open ())
+ if (gen_cxx)
{
- wcerr << ixx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ ixx.open (ixx_path.string ().c_str (), ios_base::out);
+
+ if (!ixx.is_open ())
+ {
+ wcerr << ixx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (ixx_path);
}
- unlinks.add (ixx_path);
file_list.push_back (ixx_path.string ());
}
// CXX
//
- if (gen_cxx && source)
+ if (source)
{
for (Paths::iterator i (cxx_paths.begin ());
i != cxx_paths.end (); ++i)
{
- shared_ptr<WideOutputFileStream> s (
- new (shared) WideOutputFileStream (
- i->string ().c_str (), ios_base::out));
-
- if (!s->is_open ())
+ if (gen_cxx)
{
- wcerr << *i << ": error: unable to open in write mode" << endl;
- throw Failed ();
+ shared_ptr<WideOutputFileStream> s (
+ new (shared) WideOutputFileStream (
+ i->string ().c_str (), ios_base::out));
+
+ if (!s->is_open ())
+ {
+ wcerr << *i << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ cxx.push_back (s);
+ unlinks.add (*i);
}
- unlinks.add (*i);
file_list.push_back (i->string ());
- cxx.push_back (s);
}
}
@@ -668,7 +697,8 @@ namespace CXX
i != cxx_paths.end (); ++i)
target += " \\\n" + i->string ();
- target += " \\\n" + dep_path.string ();
+ if (!dep_path.empty ())
+ target += " \\\n" + dep_path.string ();
}
dep << target.c_str () << ':';
@@ -928,19 +958,16 @@ namespace CXX
}
}
- if (inline_)
- {
- hxx << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
- << "#include " << ctx.process_include_path (ixx_name) << endl
- << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
- }
-
hxx << "#include <xsd/cxx/post.hxx>" << endl
<< endl;
// Copy epilogue.
//
+ // Note that it goes before the inline file in case it defines
+ // something (such as a custom type) which is needed by this file.
+ // And if something in the epilogue needs something from the inline
+ // file, then it should be the inline rather than header epilogue.
+ //
hxx << "// Begin epilogue." << endl
<< "//" << endl;
@@ -951,6 +978,14 @@ namespace CXX
<< "// End epilogue." << endl
<< endl;
+ if (inline_)
+ {
+ hxx << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
+ << "#include " << ctx.process_include_path (ixx_name) << endl
+ << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+ }
+
hxx << "#endif // " << guard << endl;
if (show_sloc)
@@ -999,6 +1034,9 @@ namespace CXX
<< "// End prologue." << endl
<< endl;
+ ixx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
// Generate.
//
{
@@ -1006,6 +1044,9 @@ namespace CXX
generate_tree_inline (ctx, 1, 0);
}
+ ixx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
// Copy epilogue.
//
ixx << "// Begin epilogue." << endl
diff --git a/xsd/xsd/cxx/tree/name-processor.cxx b/xsd/xsd/cxx/tree/name-processor.cxx
index 6ca616e..325870a 100644
--- a/xsd/xsd/cxx/tree/name-processor.cxx
+++ b/xsd/xsd/cxx/tree/name-processor.cxx
@@ -129,6 +129,12 @@ namespace CXX
accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1\\u$2\\u$3/");
accessor_regex.push_back ("/([^,]+)/\\l$1/");
}
+ else if (fn == "ucc")
+ {
+ accessor_regex.push_back ("/([^,]+),([^,]+)/\\u$1\\u$2/");
+ accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3/");
+ accessor_regex.push_back ("/([^,]+)/\\u$1/");
+ }
else
{
// Java: add get.
@@ -169,6 +175,11 @@ namespace CXX
modifier_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
modifier_regex.push_back ("/([^,]+)/\\l$1/");
}
+ else if (fn == "ucc")
+ {
+ modifier_regex.push_back ("/([^,]+),([^,]+)/\\u$1\\u$2/");
+ modifier_regex.push_back ("/([^,]+)/\\u$1/");
+ }
else
{
// Java: add set.
@@ -202,6 +213,10 @@ namespace CXX
{
parser_regex.push_back ("/(.+)/\\l$1/");
}
+ else if (fn == "ucc")
+ {
+ parser_regex.push_back ("/(.+)/\\u$1/");
+ }
else if (fn == "java")
{
// Java: add parse.
@@ -219,6 +234,10 @@ namespace CXX
{
serializer_regex.push_back ("/(.+)/\\l$1/");
}
+ else if (fn == "ucc")
+ {
+ serializer_regex.push_back ("/(.+)/\\u$1/");
+ }
else if (fn == "java")
{
// Java: add serialize.
@@ -244,6 +263,11 @@ namespace CXX
const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1_\\u$2_\\u$3/");
const_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
}
+ else if (fn == "ucc")
+ {
+ const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\u$1_\\u$2_\\u$3/");
+ const_regex.push_back ("/([^,]+),([^,]+)/\\u$1\\u$2/");
+ }
else
{
// Java: all uppercase.
@@ -2173,6 +2197,8 @@ namespace CXX
if (fn == "knr")
n.context ().set ("tree-node-key", String ("tree_node_key"));
+ else if (fn == "ucc")
+ n.context ().set ("tree-node-key", String ("TreeNodeKey"));
else
n.context ().set ("tree-node-key", String ("treeNodeKey"));
diff --git a/xsd/xsd/cxx/tree/options.cli b/xsd/xsd/cxx/tree/options.cli
index 1f0b23f..0230429 100644
--- a/xsd/xsd/cxx/tree/options.cli
+++ b/xsd/xsd/cxx/tree/options.cli
@@ -257,9 +257,9 @@ namespace CXX
{
"<style>",
"Specify the function naming convention that should be used in the
- generated code. Valid styles are \cb{knr} (default), \cb{lcc}, and
- \cb{java}. See the NAMING CONVENTION section below for more
- information."
+ generated code. Valid styles are \cb{knr} (default), \cb{lcc},
+ \cb{ucc}, and \cb{java}. See the NAMING CONVENTION section below
+ for more information."
};
NarrowStrings --type-regex
diff --git a/xsd/xsd/cxx/tree/serialization-source.cxx b/xsd/xsd/cxx/tree/serialization-source.cxx
index 9be7499..08b81d6 100644
--- a/xsd/xsd/cxx/tree/serialization-source.cxx
+++ b/xsd/xsd/cxx/tree/serialization-source.cxx
@@ -999,8 +999,25 @@ namespace CXX
virtual void
traverse (Type& e)
{
+ // Similar to parsing, we cannot just omit this element if it's
+ // abstract because it may serve as a "link" between the root of the
+ // substitution group and a non-abstract element that uses this
+ // element as its root (see
+ // element_serializer_map::find_substitution() for details).
+ //
if (polymorphic && e.substitutes_p ())
{
+ SemanticGraph::Type& t (e.type ());
+
+ // Check if this element is abstract.
+ //
+ bool abst;
+ {
+ SemanticGraph::Complex* tc;
+ abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ();
+ }
+
Type& r (e.substitutes ().root ());
String const& name (ename (e));
@@ -1016,7 +1033,18 @@ namespace CXX
<< strlit (r.name ()) << "," << endl
<< strlit (r.namespace_ ().name ()) << "," << endl
<< strlit (e.name ()) << "," << endl
- << strlit (e.namespace_ ().name ()) << ");"
+ << strlit (e.namespace_ ().name ()) << "," << endl;
+
+ if (abst)
+ os << "0";
+ else
+ {
+ os << "&::xsd::cxx::tree::serializer_impl< ";
+ belongs (e, belongs_);
+ os << " >";
+ }
+
+ os << ");"
<< endl
<< endl;
}
diff --git a/xsd/xsd/cxx/tree/tree-inline.cxx b/xsd/xsd/cxx/tree/tree-inline.cxx
index 318ef66..aa8b726 100644
--- a/xsd/xsd/cxx/tree/tree-inline.cxx
+++ b/xsd/xsd/cxx/tree/tree-inline.cxx
@@ -291,7 +291,7 @@ namespace CXX
}
os << "// " << name << endl
- << "// " << endl
+ << "//" << endl
<< endl;
// default c-tor
@@ -902,7 +902,7 @@ namespace CXX
return;
os << "// " << name << endl
- << "// " << endl
+ << "//" << endl
<< endl;
// Generate accessors and modifiers.
@@ -1037,7 +1037,7 @@ namespace CXX
String const& name (ename (e));
os << "// " << name << endl
- << "// " << endl
+ << "//" << endl
<< endl;
// Accessors/modifiers.
diff --git a/xsd/xsd/cxx/tree/tree-source.cxx b/xsd/xsd/cxx/tree/tree-source.cxx
index 00e895b..89419af 100644
--- a/xsd/xsd/cxx/tree/tree-source.cxx
+++ b/xsd/xsd/cxx/tree/tree-source.cxx
@@ -3562,7 +3562,7 @@ namespace CXX
String const& member (emember (e));
os << "// " << name << endl
- << "// " << endl
+ << "//" << endl
<< endl;
// Virtual accessors.
@@ -3727,24 +3727,36 @@ namespace CXX
}
}
- if (!abst && polymorphic && e.substitutes_p () &&
- !options.suppress_parsing ())
+ // Note that we cannot just omit this element if it's abstract
+ // because it may serve as a "link" between the root of the
+ // substitution group and a non-abstract element that uses this
+ // element as its root (see element_factory_map::find_substitution()
+ // for details).
+ //
+ if (polymorphic && e.substitutes_p () && !options.suppress_parsing ())
{
String const& name (ename (e));
Type& r (e.substitutes ().root ());
os << "static" << endl
<< "const ::xsd::cxx::tree::element_factory_initializer< " <<
- poly_plate << ", " << char_type << ", ";
-
- belongs (e, belongs_);
-
- os << " >" << endl
+ poly_plate << ", " << char_type << " >" << endl
<< "_xsd_" << name << "_element_factory_init (" << endl
<< strlit (r.name ()) << "," << endl
<< strlit (r.namespace_ ().name ()) << "," << endl
<< strlit (e.name ()) << "," << endl
- << strlit (e.namespace_ ().name ()) << ");"
+ << strlit (e.namespace_ ().name ()) << "," << endl;
+
+ if (abst)
+ os << "0";
+ else
+ {
+ os << "&::xsd::cxx::tree::factory_impl< ";
+ belongs (e, belongs_);
+ os << " >";
+ }
+
+ os << ");"
<< endl
<< endl;
}
diff --git a/xsd/xsd/cxx/tree/validator.cxx b/xsd/xsd/cxx/tree/validator.cxx
index 46deb6c..9785560 100644
--- a/xsd/xsd/cxx/tree/validator.cxx
+++ b/xsd/xsd/cxx/tree/validator.cxx
@@ -587,7 +587,7 @@ namespace CXX
NarrowString fn (ops.function_naming ());
- if (fn != "knr" && fn != "lcc" && fn != "java")
+ if (fn != "knr" && fn != "lcc" && fn != "ucc" && fn != "java")
{
wcerr << "error: unknown function naming style specified: '" <<
fn.c_str () << "'" << endl;
diff --git a/xsd/xsd/options.cli b/xsd/xsd/options.cli
index 6c327a4..3153be9 100644
--- a/xsd/xsd/options.cli
+++ b/xsd/xsd/options.cli
@@ -277,12 +277,19 @@ class options = 0
NarrowString --file-list
{
"<file>",
- "Write a list of generated C++ files to <file>. This option is primarily
- useful in the file-per-type compilation mode (\cb{--file-per-type}) to
- create a list of generated C++ files, for example, as a makefile
- fragment."
+ "Write a list of generated C++ files to <file> or to \cb{stdout} if
+ <file> is \cb{-}. This option is primarily useful in the file-per-type
+ compilation mode (\cb{--file-per-type}) to create a list of generated
+ C++ files, for example, as a makefile fragment."
};
+ bool --file-list-only
+ {
+ "Only write the list of C++ files that would be generated without
+ actually generating them. This option only makes sense together with
+ \cb{--file-list}."
+ }
+
NarrowString --file-list-prologue
{
"<text>",
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/options.cxx
new file mode 100644
index 0000000..9eea3a9
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.cxx
@@ -0,0 +1,739 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+#include <xsd/options-parser.hxx>
+//
+// End prologue.
+
+#include <xsd/cxx/options.hxx>
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <utility>
+#include <ostream>
+#include <sstream>
+#include <cstring>
+
+namespace cli
+{
+ template <typename X>
+ struct parser
+ {
+ static void
+ parse (X& x, bool& xs, scanner& s)
+ {
+ using namespace std;
+
+ const char* o (s.next ());
+ if (s.more ())
+ {
+ string v (s.next ());
+ istringstream is (v);
+ if (!(is >> x && is.peek () == istringstream::traits_type::eof ()))
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<bool>
+ {
+ static void
+ parse (bool& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ const char* v (s.next ());
+
+ if (std::strcmp (v, "1") == 0 ||
+ std::strcmp (v, "true") == 0 ||
+ std::strcmp (v, "TRUE") == 0 ||
+ std::strcmp (v, "True") == 0)
+ x = true;
+ else if (std::strcmp (v, "0") == 0 ||
+ std::strcmp (v, "false") == 0 ||
+ std::strcmp (v, "FALSE") == 0 ||
+ std::strcmp (v, "False") == 0)
+ x = false;
+ else
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<std::string>
+ {
+ static void
+ parse (std::string& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X>
+ struct parser<std::pair<X, std::size_t> >
+ {
+ static void
+ parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s)
+ {
+ x.second = s.position ();
+ parser<X>::parse (x.first, xs, s);
+ }
+ };
+
+ template <typename X>
+ struct parser<std::vector<X> >
+ {
+ static void
+ parse (std::vector<X>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.push_back (x);
+ xs = true;
+ }
+ };
+
+ template <typename X, typename C>
+ struct parser<std::set<X, C> >
+ {
+ static void
+ parse (std::set<X, C>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.insert (x);
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::map<K, V, C> >
+ {
+ static void
+ parse (std::map<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m[k] = v;
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X, typename T, T X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, s);
+ }
+
+ template <typename X, bool X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ s.next ();
+ x.*M = true;
+ }
+
+ template <typename X, typename T, T X::*M, bool X::*S>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, x.*S, s);
+ }
+}
+
+#include <map>
+
+namespace CXX
+{
+ // options
+ //
+
+ options::
+ options ()
+ : std_ (cxx_version::cxx11),
+ std_specified_ (false),
+ char_type_ ("char"),
+ char_type_specified_ (false),
+ char_encoding_ (),
+ char_encoding_specified_ (false),
+ output_dir_ (),
+ output_dir_specified_ (false),
+ generate_inline_ (),
+ generate_xml_schema_ (),
+ extern_xml_schema_ (),
+ extern_xml_schema_specified_ (false),
+ namespace_map_ (),
+ namespace_map_specified_ (false),
+ namespace_regex_ (),
+ namespace_regex_specified_ (false),
+ namespace_regex_trace_ (),
+ reserved_name_ (),
+ reserved_name_specified_ (false),
+ include_with_brackets_ (),
+ include_prefix_ (),
+ include_prefix_specified_ (false),
+ include_regex_ (),
+ include_regex_specified_ (false),
+ include_regex_trace_ (),
+ guard_prefix_ (),
+ guard_prefix_specified_ (false),
+ hxx_suffix_ (".hxx"),
+ hxx_suffix_specified_ (false),
+ ixx_suffix_ (".ixx"),
+ ixx_suffix_specified_ (false),
+ cxx_suffix_ (".cxx"),
+ cxx_suffix_specified_ (false),
+ fwd_suffix_ ("-fwd.hxx"),
+ fwd_suffix_specified_ (false),
+ hxx_regex_ (),
+ hxx_regex_specified_ (false),
+ ixx_regex_ (),
+ ixx_regex_specified_ (false),
+ cxx_regex_ (),
+ cxx_regex_specified_ (false),
+ fwd_regex_ (),
+ fwd_regex_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ fwd_prologue_ (),
+ fwd_prologue_specified_ (false),
+ prologue_ (),
+ prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ fwd_epilogue_ (),
+ fwd_epilogue_specified_ (false),
+ epilogue_ (),
+ epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ fwd_prologue_file_ (),
+ fwd_prologue_file_specified_ (false),
+ prologue_file_ (),
+ prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ fwd_epilogue_file_ (),
+ fwd_epilogue_file_specified_ (false),
+ epilogue_file_ (),
+ epilogue_file_specified_ (false),
+ export_symbol_ (),
+ export_symbol_specified_ (false),
+ export_xml_schema_ (),
+ export_maps_ (),
+ import_maps_ (),
+ generate_dep_ (),
+ generate_dep_only_ (),
+ dep_phony_ (),
+ dep_target_ (),
+ dep_target_specified_ (false),
+ dep_suffix_ (".d"),
+ dep_suffix_specified_ (false),
+ dep_file_ (),
+ dep_file_specified_ (false),
+ dep_regex_ (),
+ dep_regex_specified_ (false)
+ {
+ }
+
+ ::cli::usage_para options::
+ print_usage (::std::wostream& os, ::cli::usage_para p)
+ {
+ CLI_POTENTIALLY_UNUSED (os);
+
+ if (p == ::cli::usage_para::text)
+ os << ::std::endl;
+
+ os << "--std <version> Specify the C++ standard that the generated code" << ::std::endl
+ << " should conform to." << ::std::endl;
+
+ os << "--char-type <type> Generate code using the provided character <type>" << ::std::endl
+ << " instead of the default char." << ::std::endl;
+
+ os << "--char-encoding <enc> Specify the character encoding that should be used" << ::std::endl
+ << " in the generated code." << ::std::endl;
+
+ os << "--output-dir <dir> Write generated files to <dir> instead of the" << ::std::endl
+ << " current directory." << ::std::endl;
+
+ os << "--generate-inline Generate simple functions inline." << ::std::endl;
+
+ os << "--generate-xml-schema Generate a C++ header file as if the schema being" << ::std::endl
+ << " compiled defines the XML Schema namespace." << ::std::endl;
+
+ os << "--extern-xml-schema <file> Include a header file derived from <file> instead" << ::std::endl
+ << " of generating the XML Schema namespace mapping" << ::std::endl
+ << " inline." << ::std::endl;
+
+ os << "--namespace-map <xns>=<cns> Map XML Schema namespace <xns> to C++ namespace" << ::std::endl
+ << " <cns>." << ::std::endl;
+
+ os << "--namespace-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema namespace names to" << ::std::endl
+ << " C++ namespace names." << ::std::endl;
+
+ os << "--namespace-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --namespace-regex option." << ::std::endl;
+
+ os << "--reserved-name <n>[=<r>] Add name <n> to the list of names that should not" << ::std::endl
+ << " be used as identifiers." << ::std::endl;
+
+ os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl
+ << " generated #include directives." << ::std::endl;
+
+ os << "--include-prefix <prefix> Add <prefix> to generated #include directive" << ::std::endl
+ << " paths." << ::std::endl;
+
+ os << "--include-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to transform #include directive paths." << ::std::endl;
+
+ os << "--include-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --include-regex option." << ::std::endl;
+
+ os << "--guard-prefix <prefix> Add <prefix> to generated header inclusion guards." << ::std::endl;
+
+ os << "--hxx-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " .hxx to construct the name of the header file." << ::std::endl;
+
+ os << "--ixx-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " .ixx to construct the name of the inline file." << ::std::endl;
+
+ os << "--cxx-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " .cxx to construct the name of the source file." << ::std::endl;
+
+ os << "--fwd-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " -fwd.hxx to construct the name of the forward" << ::std::endl
+ << " declaration file." << ::std::endl;
+
+ os << "--hxx-regex <regex> Use the provided expression to construct the name" << ::std::endl
+ << " of the header file." << ::std::endl;
+
+ os << "--ixx-regex <regex> Use the provided expression to construct the name" << ::std::endl
+ << " of the inline file." << ::std::endl;
+
+ os << "--cxx-regex <regex> Use the provided expression to construct the name" << ::std::endl
+ << " of the source file." << ::std::endl;
+
+ os << "--fwd-regex <regex> Use the provided expression to construct the name" << ::std::endl
+ << " of the forward declaration file." << ::std::endl;
+
+ os << "--hxx-prologue <text> Insert <text> at the beginning of the header file." << ::std::endl;
+
+ os << "--ixx-prologue <text> Insert <text> at the beginning of the inline file." << ::std::endl;
+
+ os << "--cxx-prologue <text> Insert <text> at the beginning of the source file." << ::std::endl;
+
+ os << "--fwd-prologue <text> Insert <text> at the beginning of the forward" << ::std::endl
+ << " declaration file." << ::std::endl;
+
+ os << "--prologue <text> Insert <text> at the beginning of each generated" << ::std::endl
+ << " file for which there is no file-specific prologue." << ::std::endl;
+
+ os << "--hxx-epilogue <text> Insert <text> at the end of the header file." << ::std::endl;
+
+ os << "--ixx-epilogue <text> Insert <text> at the end of the inline file." << ::std::endl;
+
+ os << "--cxx-epilogue <text> Insert <text> at the end of the source file." << ::std::endl;
+
+ os << "--fwd-epilogue <text> Insert <text> at the end of the forward" << ::std::endl
+ << " declaration file." << ::std::endl;
+
+ os << "--epilogue <text> Insert <text> at the end of each generated file" << ::std::endl
+ << " for which there is no file-specific epilogue." << ::std::endl;
+
+ os << "--hxx-prologue-file <file> Insert the content of the <file> at the beginning" << ::std::endl
+ << " of the header file." << ::std::endl;
+
+ os << "--ixx-prologue-file <file> Insert the content of the <file> at the beginning" << ::std::endl
+ << " of the inline file." << ::std::endl;
+
+ os << "--cxx-prologue-file <file> Insert the content of the <file> at the beginning" << ::std::endl
+ << " of the source file." << ::std::endl;
+
+ os << "--fwd-prologue-file <file> Insert the content of the <file> at the beginning" << ::std::endl
+ << " of the forward declaration file." << ::std::endl;
+
+ os << "--prologue-file <file> Insert the content of the <file> at the beginning" << ::std::endl
+ << " of each generated file for which there is no" << ::std::endl
+ << " file-specific prologue file." << ::std::endl;
+
+ os << "--hxx-epilogue-file <file> Insert the content of the <file> at the end of the" << ::std::endl
+ << " header file." << ::std::endl;
+
+ os << "--ixx-epilogue-file <file> Insert the content of the <file> at the end of the" << ::std::endl
+ << " inline file." << ::std::endl;
+
+ os << "--cxx-epilogue-file <file> Insert the content of the <file> at the end of the" << ::std::endl
+ << " source file." << ::std::endl;
+
+ os << "--fwd-epilogue-file <file> Insert the content of the <file> at the end of the" << ::std::endl
+ << " forward declaration file." << ::std::endl;
+
+ os << "--epilogue-file <file> Insert the content of the <file> at the end of" << ::std::endl
+ << " each generated file for which there is no" << ::std::endl
+ << " file-specific epilogue file." << ::std::endl;
+
+ os << "--export-symbol <symbol> Insert <symbol> in places where DLL export/import" << ::std::endl
+ << " control statements" << ::std::endl
+ << " (__declspec(dllexport/dllimport)) are necessary." << ::std::endl;
+
+ os << "--export-xml-schema Export/import types in the XML Schema namespace" << ::std::endl
+ << " using the export symbol provided with the" << ::std::endl
+ << " --export-symbol option." << ::std::endl;
+
+ os << "--export-maps Export polymorphism support maps from a Win32 DLL" << ::std::endl
+ << " into which this generated code is placed." << ::std::endl;
+
+ os << "--import-maps Import polymorphism support maps to a Win32 DLL or" << ::std::endl
+ << " executable into which this generated code is" << ::std::endl
+ << " linked." << ::std::endl;
+
+ os << "--generate-dep Generate make dependency information." << ::std::endl;
+
+ os << "--generate-dep-only Generate make dependency information only." << ::std::endl;
+
+ os << "--dep-phony Generate phony targets for included/imported" << ::std::endl
+ << " schema files, causing each to depend on nothing." << ::std::endl;
+
+ os << "--dep-target <target> Change the target of the dependency rule." << ::std::endl;
+
+ os << "--dep-suffix <suffix> Use <suffix> instead of the default .d to" << ::std::endl
+ << " construct the name of the dependency file." << ::std::endl;
+
+ os << "--dep-file <path> Use <path> as the generated dependency file path" << ::std::endl
+ << " instead of deriving it from the input file name." << ::std::endl;
+
+ os << "--dep-regex <regex> Use the provided expression to construct the name" << ::std::endl
+ << " of the dependency file." << ::std::endl;
+
+ p = ::cli::usage_para::option;
+
+ return p;
+ }
+
+ typedef
+ std::map<std::string, void (*) (options&, ::cli::scanner&)>
+ _cli_options_map;
+
+ static _cli_options_map _cli_options_map_;
+
+ struct _cli_options_map_init
+ {
+ _cli_options_map_init ()
+ {
+ _cli_options_map_["--std"] =
+ &::cli::thunk< options, cxx_version, &options::std_,
+ &options::std_specified_ >;
+ _cli_options_map_["--char-type"] =
+ &::cli::thunk< options, NarrowString, &options::char_type_,
+ &options::char_type_specified_ >;
+ _cli_options_map_["--char-encoding"] =
+ &::cli::thunk< options, NarrowString, &options::char_encoding_,
+ &options::char_encoding_specified_ >;
+ _cli_options_map_["--output-dir"] =
+ &::cli::thunk< options, NarrowString, &options::output_dir_,
+ &options::output_dir_specified_ >;
+ _cli_options_map_["--generate-inline"] =
+ &::cli::thunk< options, &options::generate_inline_ >;
+ _cli_options_map_["--generate-xml-schema"] =
+ &::cli::thunk< options, &options::generate_xml_schema_ >;
+ _cli_options_map_["--extern-xml-schema"] =
+ &::cli::thunk< options, NarrowString, &options::extern_xml_schema_,
+ &options::extern_xml_schema_specified_ >;
+ _cli_options_map_["--namespace-map"] =
+ &::cli::thunk< options, NarrowStrings, &options::namespace_map_,
+ &options::namespace_map_specified_ >;
+ _cli_options_map_["--namespace-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::namespace_regex_,
+ &options::namespace_regex_specified_ >;
+ _cli_options_map_["--namespace-regex-trace"] =
+ &::cli::thunk< options, &options::namespace_regex_trace_ >;
+ _cli_options_map_["--reserved-name"] =
+ &::cli::thunk< options, NarrowStrings, &options::reserved_name_,
+ &options::reserved_name_specified_ >;
+ _cli_options_map_["--include-with-brackets"] =
+ &::cli::thunk< options, &options::include_with_brackets_ >;
+ _cli_options_map_["--include-prefix"] =
+ &::cli::thunk< options, NarrowString, &options::include_prefix_,
+ &options::include_prefix_specified_ >;
+ _cli_options_map_["--include-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::include_regex_,
+ &options::include_regex_specified_ >;
+ _cli_options_map_["--include-regex-trace"] =
+ &::cli::thunk< options, &options::include_regex_trace_ >;
+ _cli_options_map_["--guard-prefix"] =
+ &::cli::thunk< options, NarrowString, &options::guard_prefix_,
+ &options::guard_prefix_specified_ >;
+ _cli_options_map_["--hxx-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::hxx_suffix_,
+ &options::hxx_suffix_specified_ >;
+ _cli_options_map_["--ixx-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::ixx_suffix_,
+ &options::ixx_suffix_specified_ >;
+ _cli_options_map_["--cxx-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::cxx_suffix_,
+ &options::cxx_suffix_specified_ >;
+ _cli_options_map_["--fwd-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::fwd_suffix_,
+ &options::fwd_suffix_specified_ >;
+ _cli_options_map_["--hxx-regex"] =
+ &::cli::thunk< options, NarrowString, &options::hxx_regex_,
+ &options::hxx_regex_specified_ >;
+ _cli_options_map_["--ixx-regex"] =
+ &::cli::thunk< options, NarrowString, &options::ixx_regex_,
+ &options::ixx_regex_specified_ >;
+ _cli_options_map_["--cxx-regex"] =
+ &::cli::thunk< options, NarrowString, &options::cxx_regex_,
+ &options::cxx_regex_specified_ >;
+ _cli_options_map_["--fwd-regex"] =
+ &::cli::thunk< options, NarrowString, &options::fwd_regex_,
+ &options::fwd_regex_specified_ >;
+ _cli_options_map_["--hxx-prologue"] =
+ &::cli::thunk< options, NarrowStrings, &options::hxx_prologue_,
+ &options::hxx_prologue_specified_ >;
+ _cli_options_map_["--ixx-prologue"] =
+ &::cli::thunk< options, NarrowStrings, &options::ixx_prologue_,
+ &options::ixx_prologue_specified_ >;
+ _cli_options_map_["--cxx-prologue"] =
+ &::cli::thunk< options, NarrowStrings, &options::cxx_prologue_,
+ &options::cxx_prologue_specified_ >;
+ _cli_options_map_["--fwd-prologue"] =
+ &::cli::thunk< options, NarrowStrings, &options::fwd_prologue_,
+ &options::fwd_prologue_specified_ >;
+ _cli_options_map_["--prologue"] =
+ &::cli::thunk< options, NarrowStrings, &options::prologue_,
+ &options::prologue_specified_ >;
+ _cli_options_map_["--hxx-epilogue"] =
+ &::cli::thunk< options, NarrowStrings, &options::hxx_epilogue_,
+ &options::hxx_epilogue_specified_ >;
+ _cli_options_map_["--ixx-epilogue"] =
+ &::cli::thunk< options, NarrowStrings, &options::ixx_epilogue_,
+ &options::ixx_epilogue_specified_ >;
+ _cli_options_map_["--cxx-epilogue"] =
+ &::cli::thunk< options, NarrowStrings, &options::cxx_epilogue_,
+ &options::cxx_epilogue_specified_ >;
+ _cli_options_map_["--fwd-epilogue"] =
+ &::cli::thunk< options, NarrowStrings, &options::fwd_epilogue_,
+ &options::fwd_epilogue_specified_ >;
+ _cli_options_map_["--epilogue"] =
+ &::cli::thunk< options, NarrowStrings, &options::epilogue_,
+ &options::epilogue_specified_ >;
+ _cli_options_map_["--hxx-prologue-file"] =
+ &::cli::thunk< options, NarrowString, &options::hxx_prologue_file_,
+ &options::hxx_prologue_file_specified_ >;
+ _cli_options_map_["--ixx-prologue-file"] =
+ &::cli::thunk< options, NarrowString, &options::ixx_prologue_file_,
+ &options::ixx_prologue_file_specified_ >;
+ _cli_options_map_["--cxx-prologue-file"] =
+ &::cli::thunk< options, NarrowString, &options::cxx_prologue_file_,
+ &options::cxx_prologue_file_specified_ >;
+ _cli_options_map_["--fwd-prologue-file"] =
+ &::cli::thunk< options, NarrowString, &options::fwd_prologue_file_,
+ &options::fwd_prologue_file_specified_ >;
+ _cli_options_map_["--prologue-file"] =
+ &::cli::thunk< options, NarrowString, &options::prologue_file_,
+ &options::prologue_file_specified_ >;
+ _cli_options_map_["--hxx-epilogue-file"] =
+ &::cli::thunk< options, NarrowString, &options::hxx_epilogue_file_,
+ &options::hxx_epilogue_file_specified_ >;
+ _cli_options_map_["--ixx-epilogue-file"] =
+ &::cli::thunk< options, NarrowString, &options::ixx_epilogue_file_,
+ &options::ixx_epilogue_file_specified_ >;
+ _cli_options_map_["--cxx-epilogue-file"] =
+ &::cli::thunk< options, NarrowString, &options::cxx_epilogue_file_,
+ &options::cxx_epilogue_file_specified_ >;
+ _cli_options_map_["--fwd-epilogue-file"] =
+ &::cli::thunk< options, NarrowString, &options::fwd_epilogue_file_,
+ &options::fwd_epilogue_file_specified_ >;
+ _cli_options_map_["--epilogue-file"] =
+ &::cli::thunk< options, NarrowString, &options::epilogue_file_,
+ &options::epilogue_file_specified_ >;
+ _cli_options_map_["--export-symbol"] =
+ &::cli::thunk< options, NarrowString, &options::export_symbol_,
+ &options::export_symbol_specified_ >;
+ _cli_options_map_["--export-xml-schema"] =
+ &::cli::thunk< options, &options::export_xml_schema_ >;
+ _cli_options_map_["--export-maps"] =
+ &::cli::thunk< options, &options::export_maps_ >;
+ _cli_options_map_["--import-maps"] =
+ &::cli::thunk< options, &options::import_maps_ >;
+ _cli_options_map_["--generate-dep"] =
+ &::cli::thunk< options, &options::generate_dep_ >;
+ _cli_options_map_["--generate-dep-only"] =
+ &::cli::thunk< options, &options::generate_dep_only_ >;
+ _cli_options_map_["--dep-phony"] =
+ &::cli::thunk< options, &options::dep_phony_ >;
+ _cli_options_map_["--dep-target"] =
+ &::cli::thunk< options, NarrowStrings, &options::dep_target_,
+ &options::dep_target_specified_ >;
+ _cli_options_map_["--dep-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::dep_suffix_,
+ &options::dep_suffix_specified_ >;
+ _cli_options_map_["--dep-file"] =
+ &::cli::thunk< options, NarrowString, &options::dep_file_,
+ &options::dep_file_specified_ >;
+ _cli_options_map_["--dep-regex"] =
+ &::cli::thunk< options, NarrowString, &options::dep_regex_,
+ &options::dep_regex_specified_ >;
+ }
+ };
+
+ static _cli_options_map_init _cli_options_map_init_;
+
+ bool options::
+ _parse (const char* o, ::cli::scanner& s)
+ {
+ _cli_options_map::const_iterator i (_cli_options_map_.find (o));
+
+ if (i != _cli_options_map_.end ())
+ {
+ (*(i->second)) (*this, s);
+ return true;
+ }
+
+ // options base
+ //
+ if (::options::_parse (o, s))
+ return true;
+
+ return false;
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.hxx b/xsd/xsd/pregenerated/xsd/cxx/options.hxx
new file mode 100644
index 0000000..085aa4c
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.hxx
@@ -0,0 +1,451 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef XSD_CXX_OPTIONS_HXX
+#define XSD_CXX_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <cstddef>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/option-types.hxx>
+
+#include <xsd/options.hxx>
+
+namespace CXX
+{
+ class options: public ::options
+ {
+ public:
+ // Option accessors.
+ //
+ const cxx_version&
+ std () const;
+
+ bool
+ std_specified () const;
+
+ const NarrowString&
+ char_type () const;
+
+ bool
+ char_type_specified () const;
+
+ const NarrowString&
+ char_encoding () const;
+
+ bool
+ char_encoding_specified () const;
+
+ const NarrowString&
+ output_dir () const;
+
+ bool
+ output_dir_specified () const;
+
+ const bool&
+ generate_inline () const;
+
+ const bool&
+ generate_xml_schema () const;
+
+ const NarrowString&
+ extern_xml_schema () const;
+
+ bool
+ extern_xml_schema_specified () const;
+
+ const NarrowStrings&
+ namespace_map () const;
+
+ bool
+ namespace_map_specified () const;
+
+ const NarrowStrings&
+ namespace_regex () const;
+
+ bool
+ namespace_regex_specified () const;
+
+ const bool&
+ namespace_regex_trace () const;
+
+ const NarrowStrings&
+ reserved_name () const;
+
+ bool
+ reserved_name_specified () const;
+
+ const bool&
+ include_with_brackets () const;
+
+ const NarrowString&
+ include_prefix () const;
+
+ bool
+ include_prefix_specified () const;
+
+ const NarrowStrings&
+ include_regex () const;
+
+ bool
+ include_regex_specified () const;
+
+ const bool&
+ include_regex_trace () const;
+
+ const NarrowString&
+ guard_prefix () const;
+
+ bool
+ guard_prefix_specified () const;
+
+ const NarrowString&
+ hxx_suffix () const;
+
+ bool
+ hxx_suffix_specified () const;
+
+ const NarrowString&
+ ixx_suffix () const;
+
+ bool
+ ixx_suffix_specified () const;
+
+ const NarrowString&
+ cxx_suffix () const;
+
+ bool
+ cxx_suffix_specified () const;
+
+ const NarrowString&
+ fwd_suffix () const;
+
+ bool
+ fwd_suffix_specified () const;
+
+ const NarrowString&
+ hxx_regex () const;
+
+ bool
+ hxx_regex_specified () const;
+
+ const NarrowString&
+ ixx_regex () const;
+
+ bool
+ ixx_regex_specified () const;
+
+ const NarrowString&
+ cxx_regex () const;
+
+ bool
+ cxx_regex_specified () const;
+
+ const NarrowString&
+ fwd_regex () const;
+
+ bool
+ fwd_regex_specified () const;
+
+ const NarrowStrings&
+ hxx_prologue () const;
+
+ bool
+ hxx_prologue_specified () const;
+
+ const NarrowStrings&
+ ixx_prologue () const;
+
+ bool
+ ixx_prologue_specified () const;
+
+ const NarrowStrings&
+ cxx_prologue () const;
+
+ bool
+ cxx_prologue_specified () const;
+
+ const NarrowStrings&
+ fwd_prologue () const;
+
+ bool
+ fwd_prologue_specified () const;
+
+ const NarrowStrings&
+ prologue () const;
+
+ bool
+ prologue_specified () const;
+
+ const NarrowStrings&
+ hxx_epilogue () const;
+
+ bool
+ hxx_epilogue_specified () const;
+
+ const NarrowStrings&
+ ixx_epilogue () const;
+
+ bool
+ ixx_epilogue_specified () const;
+
+ const NarrowStrings&
+ cxx_epilogue () const;
+
+ bool
+ cxx_epilogue_specified () const;
+
+ const NarrowStrings&
+ fwd_epilogue () const;
+
+ bool
+ fwd_epilogue_specified () const;
+
+ const NarrowStrings&
+ epilogue () const;
+
+ bool
+ epilogue_specified () const;
+
+ const NarrowString&
+ hxx_prologue_file () const;
+
+ bool
+ hxx_prologue_file_specified () const;
+
+ const NarrowString&
+ ixx_prologue_file () const;
+
+ bool
+ ixx_prologue_file_specified () const;
+
+ const NarrowString&
+ cxx_prologue_file () const;
+
+ bool
+ cxx_prologue_file_specified () const;
+
+ const NarrowString&
+ fwd_prologue_file () const;
+
+ bool
+ fwd_prologue_file_specified () const;
+
+ const NarrowString&
+ prologue_file () const;
+
+ bool
+ prologue_file_specified () const;
+
+ const NarrowString&
+ hxx_epilogue_file () const;
+
+ bool
+ hxx_epilogue_file_specified () const;
+
+ const NarrowString&
+ ixx_epilogue_file () const;
+
+ bool
+ ixx_epilogue_file_specified () const;
+
+ const NarrowString&
+ cxx_epilogue_file () const;
+
+ bool
+ cxx_epilogue_file_specified () const;
+
+ const NarrowString&
+ fwd_epilogue_file () const;
+
+ bool
+ fwd_epilogue_file_specified () const;
+
+ const NarrowString&
+ epilogue_file () const;
+
+ bool
+ epilogue_file_specified () const;
+
+ const NarrowString&
+ export_symbol () const;
+
+ bool
+ export_symbol_specified () const;
+
+ const bool&
+ export_xml_schema () const;
+
+ const bool&
+ export_maps () const;
+
+ const bool&
+ import_maps () const;
+
+ const bool&
+ generate_dep () const;
+
+ const bool&
+ generate_dep_only () const;
+
+ const bool&
+ dep_phony () const;
+
+ const NarrowStrings&
+ dep_target () const;
+
+ bool
+ dep_target_specified () const;
+
+ const NarrowString&
+ dep_suffix () const;
+
+ bool
+ dep_suffix_specified () const;
+
+ const NarrowString&
+ dep_file () const;
+
+ bool
+ dep_file_specified () const;
+
+ const NarrowString&
+ dep_regex () const;
+
+ bool
+ dep_regex_specified () const;
+
+ // Print usage information.
+ //
+ static ::cli::usage_para
+ print_usage (::std::wostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ options ();
+
+ bool
+ _parse (const char*, ::cli::scanner&);
+
+ public:
+ cxx_version std_;
+ bool std_specified_;
+ NarrowString char_type_;
+ bool char_type_specified_;
+ NarrowString char_encoding_;
+ bool char_encoding_specified_;
+ NarrowString output_dir_;
+ bool output_dir_specified_;
+ bool generate_inline_;
+ bool generate_xml_schema_;
+ NarrowString extern_xml_schema_;
+ bool extern_xml_schema_specified_;
+ NarrowStrings namespace_map_;
+ bool namespace_map_specified_;
+ NarrowStrings namespace_regex_;
+ bool namespace_regex_specified_;
+ bool namespace_regex_trace_;
+ NarrowStrings reserved_name_;
+ bool reserved_name_specified_;
+ bool include_with_brackets_;
+ NarrowString include_prefix_;
+ bool include_prefix_specified_;
+ NarrowStrings include_regex_;
+ bool include_regex_specified_;
+ bool include_regex_trace_;
+ NarrowString guard_prefix_;
+ bool guard_prefix_specified_;
+ NarrowString hxx_suffix_;
+ bool hxx_suffix_specified_;
+ NarrowString ixx_suffix_;
+ bool ixx_suffix_specified_;
+ NarrowString cxx_suffix_;
+ bool cxx_suffix_specified_;
+ NarrowString fwd_suffix_;
+ bool fwd_suffix_specified_;
+ NarrowString hxx_regex_;
+ bool hxx_regex_specified_;
+ NarrowString ixx_regex_;
+ bool ixx_regex_specified_;
+ NarrowString cxx_regex_;
+ bool cxx_regex_specified_;
+ NarrowString fwd_regex_;
+ bool fwd_regex_specified_;
+ NarrowStrings hxx_prologue_;
+ bool hxx_prologue_specified_;
+ NarrowStrings ixx_prologue_;
+ bool ixx_prologue_specified_;
+ NarrowStrings cxx_prologue_;
+ bool cxx_prologue_specified_;
+ NarrowStrings fwd_prologue_;
+ bool fwd_prologue_specified_;
+ NarrowStrings prologue_;
+ bool prologue_specified_;
+ NarrowStrings hxx_epilogue_;
+ bool hxx_epilogue_specified_;
+ NarrowStrings ixx_epilogue_;
+ bool ixx_epilogue_specified_;
+ NarrowStrings cxx_epilogue_;
+ bool cxx_epilogue_specified_;
+ NarrowStrings fwd_epilogue_;
+ bool fwd_epilogue_specified_;
+ NarrowStrings epilogue_;
+ bool epilogue_specified_;
+ NarrowString hxx_prologue_file_;
+ bool hxx_prologue_file_specified_;
+ NarrowString ixx_prologue_file_;
+ bool ixx_prologue_file_specified_;
+ NarrowString cxx_prologue_file_;
+ bool cxx_prologue_file_specified_;
+ NarrowString fwd_prologue_file_;
+ bool fwd_prologue_file_specified_;
+ NarrowString prologue_file_;
+ bool prologue_file_specified_;
+ NarrowString hxx_epilogue_file_;
+ bool hxx_epilogue_file_specified_;
+ NarrowString ixx_epilogue_file_;
+ bool ixx_epilogue_file_specified_;
+ NarrowString cxx_epilogue_file_;
+ bool cxx_epilogue_file_specified_;
+ NarrowString fwd_epilogue_file_;
+ bool fwd_epilogue_file_specified_;
+ NarrowString epilogue_file_;
+ bool epilogue_file_specified_;
+ NarrowString export_symbol_;
+ bool export_symbol_specified_;
+ bool export_xml_schema_;
+ bool export_maps_;
+ bool import_maps_;
+ bool generate_dep_;
+ bool generate_dep_only_;
+ bool dep_phony_;
+ NarrowStrings dep_target_;
+ bool dep_target_specified_;
+ NarrowString dep_suffix_;
+ bool dep_suffix_specified_;
+ NarrowString dep_file_;
+ bool dep_file_specified_;
+ NarrowString dep_regex_;
+ bool dep_regex_specified_;
+ };
+}
+
+#include <xsd/cxx/options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // XSD_CXX_OPTIONS_HXX
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.ixx b/xsd/xsd/pregenerated/xsd/cxx/options.ixx
new file mode 100644
index 0000000..8266e31
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.ixx
@@ -0,0 +1,615 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+namespace CXX
+{
+ // options
+ //
+
+ inline const cxx_version& options::
+ std () const
+ {
+ return this->std_;
+ }
+
+ inline bool options::
+ std_specified () const
+ {
+ return this->std_specified_;
+ }
+
+ inline const NarrowString& options::
+ char_type () const
+ {
+ return this->char_type_;
+ }
+
+ inline bool options::
+ char_type_specified () const
+ {
+ return this->char_type_specified_;
+ }
+
+ inline const NarrowString& options::
+ char_encoding () const
+ {
+ return this->char_encoding_;
+ }
+
+ inline bool options::
+ char_encoding_specified () const
+ {
+ return this->char_encoding_specified_;
+ }
+
+ inline const NarrowString& options::
+ output_dir () const
+ {
+ return this->output_dir_;
+ }
+
+ inline bool options::
+ output_dir_specified () const
+ {
+ return this->output_dir_specified_;
+ }
+
+ inline const bool& options::
+ generate_inline () const
+ {
+ return this->generate_inline_;
+ }
+
+ inline const bool& options::
+ generate_xml_schema () const
+ {
+ return this->generate_xml_schema_;
+ }
+
+ inline const NarrowString& options::
+ extern_xml_schema () const
+ {
+ return this->extern_xml_schema_;
+ }
+
+ inline bool options::
+ extern_xml_schema_specified () const
+ {
+ return this->extern_xml_schema_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ namespace_map () const
+ {
+ return this->namespace_map_;
+ }
+
+ inline bool options::
+ namespace_map_specified () const
+ {
+ return this->namespace_map_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ namespace_regex () const
+ {
+ return this->namespace_regex_;
+ }
+
+ inline bool options::
+ namespace_regex_specified () const
+ {
+ return this->namespace_regex_specified_;
+ }
+
+ inline const bool& options::
+ namespace_regex_trace () const
+ {
+ return this->namespace_regex_trace_;
+ }
+
+ inline const NarrowStrings& options::
+ reserved_name () const
+ {
+ return this->reserved_name_;
+ }
+
+ inline bool options::
+ reserved_name_specified () const
+ {
+ return this->reserved_name_specified_;
+ }
+
+ inline const bool& options::
+ include_with_brackets () const
+ {
+ return this->include_with_brackets_;
+ }
+
+ inline const NarrowString& options::
+ include_prefix () const
+ {
+ return this->include_prefix_;
+ }
+
+ inline bool options::
+ include_prefix_specified () const
+ {
+ return this->include_prefix_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ include_regex () const
+ {
+ return this->include_regex_;
+ }
+
+ inline bool options::
+ include_regex_specified () const
+ {
+ return this->include_regex_specified_;
+ }
+
+ inline const bool& options::
+ include_regex_trace () const
+ {
+ return this->include_regex_trace_;
+ }
+
+ inline const NarrowString& options::
+ guard_prefix () const
+ {
+ return this->guard_prefix_;
+ }
+
+ inline bool options::
+ guard_prefix_specified () const
+ {
+ return this->guard_prefix_specified_;
+ }
+
+ inline const NarrowString& options::
+ hxx_suffix () const
+ {
+ return this->hxx_suffix_;
+ }
+
+ inline bool options::
+ hxx_suffix_specified () const
+ {
+ return this->hxx_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ ixx_suffix () const
+ {
+ return this->ixx_suffix_;
+ }
+
+ inline bool options::
+ ixx_suffix_specified () const
+ {
+ return this->ixx_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ cxx_suffix () const
+ {
+ return this->cxx_suffix_;
+ }
+
+ inline bool options::
+ cxx_suffix_specified () const
+ {
+ return this->cxx_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ fwd_suffix () const
+ {
+ return this->fwd_suffix_;
+ }
+
+ inline bool options::
+ fwd_suffix_specified () const
+ {
+ return this->fwd_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ hxx_regex () const
+ {
+ return this->hxx_regex_;
+ }
+
+ inline bool options::
+ hxx_regex_specified () const
+ {
+ return this->hxx_regex_specified_;
+ }
+
+ inline const NarrowString& options::
+ ixx_regex () const
+ {
+ return this->ixx_regex_;
+ }
+
+ inline bool options::
+ ixx_regex_specified () const
+ {
+ return this->ixx_regex_specified_;
+ }
+
+ inline const NarrowString& options::
+ cxx_regex () const
+ {
+ return this->cxx_regex_;
+ }
+
+ inline bool options::
+ cxx_regex_specified () const
+ {
+ return this->cxx_regex_specified_;
+ }
+
+ inline const NarrowString& options::
+ fwd_regex () const
+ {
+ return this->fwd_regex_;
+ }
+
+ inline bool options::
+ fwd_regex_specified () const
+ {
+ return this->fwd_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ hxx_prologue () const
+ {
+ return this->hxx_prologue_;
+ }
+
+ inline bool options::
+ hxx_prologue_specified () const
+ {
+ return this->hxx_prologue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ ixx_prologue () const
+ {
+ return this->ixx_prologue_;
+ }
+
+ inline bool options::
+ ixx_prologue_specified () const
+ {
+ return this->ixx_prologue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ cxx_prologue () const
+ {
+ return this->cxx_prologue_;
+ }
+
+ inline bool options::
+ cxx_prologue_specified () const
+ {
+ return this->cxx_prologue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ fwd_prologue () const
+ {
+ return this->fwd_prologue_;
+ }
+
+ inline bool options::
+ fwd_prologue_specified () const
+ {
+ return this->fwd_prologue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ prologue () const
+ {
+ return this->prologue_;
+ }
+
+ inline bool options::
+ prologue_specified () const
+ {
+ return this->prologue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ hxx_epilogue () const
+ {
+ return this->hxx_epilogue_;
+ }
+
+ inline bool options::
+ hxx_epilogue_specified () const
+ {
+ return this->hxx_epilogue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ ixx_epilogue () const
+ {
+ return this->ixx_epilogue_;
+ }
+
+ inline bool options::
+ ixx_epilogue_specified () const
+ {
+ return this->ixx_epilogue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ cxx_epilogue () const
+ {
+ return this->cxx_epilogue_;
+ }
+
+ inline bool options::
+ cxx_epilogue_specified () const
+ {
+ return this->cxx_epilogue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ fwd_epilogue () const
+ {
+ return this->fwd_epilogue_;
+ }
+
+ inline bool options::
+ fwd_epilogue_specified () const
+ {
+ return this->fwd_epilogue_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ epilogue () const
+ {
+ return this->epilogue_;
+ }
+
+ inline bool options::
+ epilogue_specified () const
+ {
+ return this->epilogue_specified_;
+ }
+
+ inline const NarrowString& options::
+ hxx_prologue_file () const
+ {
+ return this->hxx_prologue_file_;
+ }
+
+ inline bool options::
+ hxx_prologue_file_specified () const
+ {
+ return this->hxx_prologue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ ixx_prologue_file () const
+ {
+ return this->ixx_prologue_file_;
+ }
+
+ inline bool options::
+ ixx_prologue_file_specified () const
+ {
+ return this->ixx_prologue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ cxx_prologue_file () const
+ {
+ return this->cxx_prologue_file_;
+ }
+
+ inline bool options::
+ cxx_prologue_file_specified () const
+ {
+ return this->cxx_prologue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ fwd_prologue_file () const
+ {
+ return this->fwd_prologue_file_;
+ }
+
+ inline bool options::
+ fwd_prologue_file_specified () const
+ {
+ return this->fwd_prologue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ prologue_file () const
+ {
+ return this->prologue_file_;
+ }
+
+ inline bool options::
+ prologue_file_specified () const
+ {
+ return this->prologue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ hxx_epilogue_file () const
+ {
+ return this->hxx_epilogue_file_;
+ }
+
+ inline bool options::
+ hxx_epilogue_file_specified () const
+ {
+ return this->hxx_epilogue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ ixx_epilogue_file () const
+ {
+ return this->ixx_epilogue_file_;
+ }
+
+ inline bool options::
+ ixx_epilogue_file_specified () const
+ {
+ return this->ixx_epilogue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ cxx_epilogue_file () const
+ {
+ return this->cxx_epilogue_file_;
+ }
+
+ inline bool options::
+ cxx_epilogue_file_specified () const
+ {
+ return this->cxx_epilogue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ fwd_epilogue_file () const
+ {
+ return this->fwd_epilogue_file_;
+ }
+
+ inline bool options::
+ fwd_epilogue_file_specified () const
+ {
+ return this->fwd_epilogue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ epilogue_file () const
+ {
+ return this->epilogue_file_;
+ }
+
+ inline bool options::
+ epilogue_file_specified () const
+ {
+ return this->epilogue_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ export_symbol () const
+ {
+ return this->export_symbol_;
+ }
+
+ inline bool options::
+ export_symbol_specified () const
+ {
+ return this->export_symbol_specified_;
+ }
+
+ inline const bool& options::
+ export_xml_schema () const
+ {
+ return this->export_xml_schema_;
+ }
+
+ inline const bool& options::
+ export_maps () const
+ {
+ return this->export_maps_;
+ }
+
+ inline const bool& options::
+ import_maps () const
+ {
+ return this->import_maps_;
+ }
+
+ inline const bool& options::
+ generate_dep () const
+ {
+ return this->generate_dep_;
+ }
+
+ inline const bool& options::
+ generate_dep_only () const
+ {
+ return this->generate_dep_only_;
+ }
+
+ inline const bool& options::
+ dep_phony () const
+ {
+ return this->dep_phony_;
+ }
+
+ inline const NarrowStrings& options::
+ dep_target () const
+ {
+ return this->dep_target_;
+ }
+
+ inline bool options::
+ dep_target_specified () const
+ {
+ return this->dep_target_specified_;
+ }
+
+ inline const NarrowString& options::
+ dep_suffix () const
+ {
+ return this->dep_suffix_;
+ }
+
+ inline bool options::
+ dep_suffix_specified () const
+ {
+ return this->dep_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ dep_file () const
+ {
+ return this->dep_file_;
+ }
+
+ inline bool options::
+ dep_file_specified () const
+ {
+ return this->dep_file_specified_;
+ }
+
+ inline const NarrowString& options::
+ dep_regex () const
+ {
+ return this->dep_regex_;
+ }
+
+ inline bool options::
+ dep_regex_specified () const
+ {
+ return this->dep_regex_specified_;
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
diff --git a/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx
new file mode 100644
index 0000000..60667ac
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx
@@ -0,0 +1,776 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+#include <xsd/options-parser.hxx>
+//
+// End prologue.
+
+#include <xsd/cxx/parser/options.hxx>
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <utility>
+#include <ostream>
+#include <sstream>
+#include <cstring>
+
+namespace cli
+{
+ template <typename X>
+ struct parser
+ {
+ static void
+ parse (X& x, bool& xs, scanner& s)
+ {
+ using namespace std;
+
+ const char* o (s.next ());
+ if (s.more ())
+ {
+ string v (s.next ());
+ istringstream is (v);
+ if (!(is >> x && is.peek () == istringstream::traits_type::eof ()))
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<bool>
+ {
+ static void
+ parse (bool& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ const char* v (s.next ());
+
+ if (std::strcmp (v, "1") == 0 ||
+ std::strcmp (v, "true") == 0 ||
+ std::strcmp (v, "TRUE") == 0 ||
+ std::strcmp (v, "True") == 0)
+ x = true;
+ else if (std::strcmp (v, "0") == 0 ||
+ std::strcmp (v, "false") == 0 ||
+ std::strcmp (v, "FALSE") == 0 ||
+ std::strcmp (v, "False") == 0)
+ x = false;
+ else
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<std::string>
+ {
+ static void
+ parse (std::string& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X>
+ struct parser<std::pair<X, std::size_t> >
+ {
+ static void
+ parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s)
+ {
+ x.second = s.position ();
+ parser<X>::parse (x.first, xs, s);
+ }
+ };
+
+ template <typename X>
+ struct parser<std::vector<X> >
+ {
+ static void
+ parse (std::vector<X>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.push_back (x);
+ xs = true;
+ }
+ };
+
+ template <typename X, typename C>
+ struct parser<std::set<X, C> >
+ {
+ static void
+ parse (std::set<X, C>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.insert (x);
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::map<K, V, C> >
+ {
+ static void
+ parse (std::map<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m[k] = v;
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X, typename T, T X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, s);
+ }
+
+ template <typename X, bool X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ s.next ();
+ x.*M = true;
+ }
+
+ template <typename X, typename T, T X::*M, bool X::*S>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, x.*S, s);
+ }
+}
+
+#include <map>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ // options
+ //
+
+ options::
+ options ()
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ }
+
+ options::
+ options (int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+ }
+
+ options::
+ options (int start,
+ int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+ }
+
+ options::
+ options (int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+ }
+
+ options::
+ options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+ }
+
+ options::
+ options (::cli::scanner& s,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : type_map_ (),
+ type_map_specified_ (false),
+ xml_parser_ ("xerces"),
+ xml_parser_specified_ (false),
+ generate_validation_ (),
+ suppress_validation_ (),
+ generate_polymorphic_ (),
+ generate_noop_impl_ (),
+ generate_print_impl_ (),
+ generate_test_driver_ (),
+ force_overwrite_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ skel_type_suffix_ ("_pskel"),
+ skel_type_suffix_specified_ (false),
+ skel_file_suffix_ ("-pskel"),
+ skel_file_suffix_specified_ (false),
+ impl_type_suffix_ ("_pimpl"),
+ impl_type_suffix_specified_ (false),
+ impl_file_suffix_ ("-pimpl"),
+ impl_file_suffix_specified_ (false)
+ {
+ _parse (s, opt, arg);
+ }
+
+ ::cli::usage_para options::
+ print_usage (::std::wostream& os, ::cli::usage_para p)
+ {
+ CLI_POTENTIALLY_UNUSED (os);
+
+ if (p == ::cli::usage_para::text)
+ os << ::std::endl;
+
+ os << "--type-map <mapfile> Read XML Schema to C++ type mapping information" << ::std::endl
+ << " from <mapfile>." << ::std::endl;
+
+ os << "--xml-parser <parser> Use <parser> as the underlying XML parser." << ::std::endl;
+
+ os << "--generate-validation Generate validation code." << ::std::endl;
+
+ os << "--suppress-validation Suppress the generation of validation code." << ::std::endl;
+
+ os << "--generate-polymorphic Generate polymorphism-aware code." << ::std::endl;
+
+ os << "--generate-noop-impl Generate a sample parser implementation that does" << ::std::endl
+ << " nothing (no operation)." << ::std::endl;
+
+ os << "--generate-print-impl Generate a sample parser implementation that" << ::std::endl
+ << " prints the XML data to STDOUT." << ::std::endl;
+
+ os << "--generate-test-driver Generate a test driver for the sample parser" << ::std::endl
+ << " implementation." << ::std::endl;
+
+ os << "--force-overwrite Force overwriting of the existing implementation" << ::std::endl
+ << " and test driver files." << ::std::endl;
+
+ os << "--root-element-first Indicate that the first global element is the" << ::std::endl
+ << " document root." << ::std::endl;
+
+ os << "--root-element-last Indicate that the last global element is the" << ::std::endl
+ << " document root." << ::std::endl;
+
+ os << "--root-element <element> Indicate that <element> is the document root." << ::std::endl;
+
+ os << "--skel-type-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " _pskel to construct the names of the generated" << ::std::endl
+ << " parser skeletons." << ::std::endl;
+
+ os << "--skel-file-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " -pskel to construct the names of the generated" << ::std::endl
+ << " parser skeleton files." << ::std::endl;
+
+ os << "--impl-type-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " _pimpl to construct the names of the parser" << ::std::endl
+ << " implementations for the built-in XML Schema types" << ::std::endl
+ << " as well as sample parser implementations." << ::std::endl;
+
+ os << "--impl-file-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
+ << " -pimpl to construct the names of the generated" << ::std::endl
+ << " sample parser implementation files." << ::std::endl;
+
+ p = ::cli::usage_para::option;
+
+ return p;
+ }
+
+ typedef
+ std::map<std::string, void (*) (options&, ::cli::scanner&)>
+ _cli_options_map;
+
+ static _cli_options_map _cli_options_map_;
+
+ struct _cli_options_map_init
+ {
+ _cli_options_map_init ()
+ {
+ _cli_options_map_["--type-map"] =
+ &::cli::thunk< options, NarrowStrings, &options::type_map_,
+ &options::type_map_specified_ >;
+ _cli_options_map_["--xml-parser"] =
+ &::cli::thunk< options, NarrowString, &options::xml_parser_,
+ &options::xml_parser_specified_ >;
+ _cli_options_map_["--generate-validation"] =
+ &::cli::thunk< options, &options::generate_validation_ >;
+ _cli_options_map_["--suppress-validation"] =
+ &::cli::thunk< options, &options::suppress_validation_ >;
+ _cli_options_map_["--generate-polymorphic"] =
+ &::cli::thunk< options, &options::generate_polymorphic_ >;
+ _cli_options_map_["--generate-noop-impl"] =
+ &::cli::thunk< options, &options::generate_noop_impl_ >;
+ _cli_options_map_["--generate-print-impl"] =
+ &::cli::thunk< options, &options::generate_print_impl_ >;
+ _cli_options_map_["--generate-test-driver"] =
+ &::cli::thunk< options, &options::generate_test_driver_ >;
+ _cli_options_map_["--force-overwrite"] =
+ &::cli::thunk< options, &options::force_overwrite_ >;
+ _cli_options_map_["--root-element-first"] =
+ &::cli::thunk< options, &options::root_element_first_ >;
+ _cli_options_map_["--root-element-last"] =
+ &::cli::thunk< options, &options::root_element_last_ >;
+ _cli_options_map_["--root-element"] =
+ &::cli::thunk< options, NarrowString, &options::root_element_,
+ &options::root_element_specified_ >;
+ _cli_options_map_["--skel-type-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::skel_type_suffix_,
+ &options::skel_type_suffix_specified_ >;
+ _cli_options_map_["--skel-file-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::skel_file_suffix_,
+ &options::skel_file_suffix_specified_ >;
+ _cli_options_map_["--impl-type-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::impl_type_suffix_,
+ &options::impl_type_suffix_specified_ >;
+ _cli_options_map_["--impl-file-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::impl_file_suffix_,
+ &options::impl_file_suffix_specified_ >;
+ }
+ };
+
+ static _cli_options_map_init _cli_options_map_init_;
+
+ bool options::
+ _parse (const char* o, ::cli::scanner& s)
+ {
+ _cli_options_map::const_iterator i (_cli_options_map_.find (o));
+
+ if (i != _cli_options_map_.end ())
+ {
+ (*(i->second)) (*this, s);
+ return true;
+ }
+
+ // options base
+ //
+ if (::CXX::options::_parse (o, s))
+ return true;
+
+ return false;
+ }
+
+ bool options::
+ _parse (::cli::scanner& s,
+ ::cli::unknown_mode opt_mode,
+ ::cli::unknown_mode arg_mode)
+ {
+ // Can't skip combined flags (--no-combined-flags).
+ //
+ assert (opt_mode != ::cli::unknown_mode::skip);
+
+ bool r = false;
+ bool opt = true;
+
+ while (s.more ())
+ {
+ const char* o = s.peek ();
+
+ if (std::strcmp (o, "--") == 0)
+ {
+ opt = false;
+ s.skip ();
+ r = true;
+ continue;
+ }
+
+ if (opt)
+ {
+ if (_parse (o, s))
+ {
+ r = true;
+ continue;
+ }
+
+ if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0')
+ {
+ // Handle combined option values.
+ //
+ std::string co;
+ if (const char* v = std::strchr (o, '='))
+ {
+ co.assign (o, 0, v - o);
+ ++v;
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (co.c_str ()),
+ const_cast<char*> (v)
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (_parse (co.c_str (), ns))
+ {
+ // Parsed the option but not its value?
+ //
+ if (ns.end () != 2)
+ throw ::cli::invalid_value (co, v);
+
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = co.c_str ();
+ }
+ }
+
+ // Handle combined flags.
+ //
+ char cf[3];
+ {
+ const char* p = o + 1;
+ for (; *p != '\0'; ++p)
+ {
+ if (!((*p >= 'a' && *p <= 'z') ||
+ (*p >= 'A' && *p <= 'Z') ||
+ (*p >= '0' && *p <= '9')))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ for (p = o + 1; *p != '\0'; ++p)
+ {
+ std::strcpy (cf, "-");
+ cf[1] = *p;
+ cf[2] = '\0';
+
+ int ac (1);
+ char* av[] =
+ {
+ cf
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (!_parse (cf, ns))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ // All handled.
+ //
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = cf;
+ }
+ }
+ }
+
+ switch (opt_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_option (o);
+ }
+ }
+
+ break;
+ }
+ }
+
+ switch (arg_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_argument (o);
+ }
+ }
+
+ break;
+ }
+
+ return r;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
diff --git a/xsd/xsd/pregenerated/xsd/cxx/parser/options.hxx b/xsd/xsd/pregenerated/xsd/cxx/parser/options.hxx
new file mode 100644
index 0000000..03b67fd
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/parser/options.hxx
@@ -0,0 +1,186 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef XSD_CXX_PARSER_OPTIONS_HXX
+#define XSD_CXX_PARSER_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <cstddef>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class options: public ::CXX::options
+ {
+ public:
+ options ();
+
+ options (int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (::cli::scanner&,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ // Option accessors.
+ //
+ const NarrowStrings&
+ type_map () const;
+
+ bool
+ type_map_specified () const;
+
+ const NarrowString&
+ xml_parser () const;
+
+ bool
+ xml_parser_specified () const;
+
+ const bool&
+ generate_validation () const;
+
+ const bool&
+ suppress_validation () const;
+
+ const bool&
+ generate_polymorphic () const;
+
+ const bool&
+ generate_noop_impl () const;
+
+ const bool&
+ generate_print_impl () const;
+
+ const bool&
+ generate_test_driver () const;
+
+ const bool&
+ force_overwrite () const;
+
+ const bool&
+ root_element_first () const;
+
+ const bool&
+ root_element_last () const;
+
+ const NarrowString&
+ root_element () const;
+
+ bool
+ root_element_specified () const;
+
+ const NarrowString&
+ skel_type_suffix () const;
+
+ bool
+ skel_type_suffix_specified () const;
+
+ const NarrowString&
+ skel_file_suffix () const;
+
+ bool
+ skel_file_suffix_specified () const;
+
+ const NarrowString&
+ impl_type_suffix () const;
+
+ bool
+ impl_type_suffix_specified () const;
+
+ const NarrowString&
+ impl_file_suffix () const;
+
+ bool
+ impl_file_suffix_specified () const;
+
+ // Print usage information.
+ //
+ static ::cli::usage_para
+ print_usage (::std::wostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::cli::scanner&);
+
+ private:
+ bool
+ _parse (::cli::scanner&,
+ ::cli::unknown_mode option,
+ ::cli::unknown_mode argument);
+
+ public:
+ NarrowStrings type_map_;
+ bool type_map_specified_;
+ NarrowString xml_parser_;
+ bool xml_parser_specified_;
+ bool generate_validation_;
+ bool suppress_validation_;
+ bool generate_polymorphic_;
+ bool generate_noop_impl_;
+ bool generate_print_impl_;
+ bool generate_test_driver_;
+ bool force_overwrite_;
+ bool root_element_first_;
+ bool root_element_last_;
+ NarrowString root_element_;
+ bool root_element_specified_;
+ NarrowString skel_type_suffix_;
+ bool skel_type_suffix_specified_;
+ NarrowString skel_file_suffix_;
+ bool skel_file_suffix_specified_;
+ NarrowString impl_type_suffix_;
+ bool impl_type_suffix_specified_;
+ NarrowString impl_file_suffix_;
+ bool impl_file_suffix_specified_;
+ };
+ }
+}
+
+#include <xsd/cxx/parser/options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // XSD_CXX_PARSER_OPTIONS_HXX
diff --git a/xsd/xsd/pregenerated/xsd/cxx/parser/options.ixx b/xsd/xsd/pregenerated/xsd/cxx/parser/options.ixx
new file mode 100644
index 0000000..64c00c5
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/parser/options.ixx
@@ -0,0 +1,162 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+namespace CXX
+{
+ namespace Parser
+ {
+ // options
+ //
+
+ inline const NarrowStrings& options::
+ type_map () const
+ {
+ return this->type_map_;
+ }
+
+ inline bool options::
+ type_map_specified () const
+ {
+ return this->type_map_specified_;
+ }
+
+ inline const NarrowString& options::
+ xml_parser () const
+ {
+ return this->xml_parser_;
+ }
+
+ inline bool options::
+ xml_parser_specified () const
+ {
+ return this->xml_parser_specified_;
+ }
+
+ inline const bool& options::
+ generate_validation () const
+ {
+ return this->generate_validation_;
+ }
+
+ inline const bool& options::
+ suppress_validation () const
+ {
+ return this->suppress_validation_;
+ }
+
+ inline const bool& options::
+ generate_polymorphic () const
+ {
+ return this->generate_polymorphic_;
+ }
+
+ inline const bool& options::
+ generate_noop_impl () const
+ {
+ return this->generate_noop_impl_;
+ }
+
+ inline const bool& options::
+ generate_print_impl () const
+ {
+ return this->generate_print_impl_;
+ }
+
+ inline const bool& options::
+ generate_test_driver () const
+ {
+ return this->generate_test_driver_;
+ }
+
+ inline const bool& options::
+ force_overwrite () const
+ {
+ return this->force_overwrite_;
+ }
+
+ inline const bool& options::
+ root_element_first () const
+ {
+ return this->root_element_first_;
+ }
+
+ inline const bool& options::
+ root_element_last () const
+ {
+ return this->root_element_last_;
+ }
+
+ inline const NarrowString& options::
+ root_element () const
+ {
+ return this->root_element_;
+ }
+
+ inline bool options::
+ root_element_specified () const
+ {
+ return this->root_element_specified_;
+ }
+
+ inline const NarrowString& options::
+ skel_type_suffix () const
+ {
+ return this->skel_type_suffix_;
+ }
+
+ inline bool options::
+ skel_type_suffix_specified () const
+ {
+ return this->skel_type_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ skel_file_suffix () const
+ {
+ return this->skel_file_suffix_;
+ }
+
+ inline bool options::
+ skel_file_suffix_specified () const
+ {
+ return this->skel_file_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ impl_type_suffix () const
+ {
+ return this->impl_type_suffix_;
+ }
+
+ inline bool options::
+ impl_type_suffix_specified () const
+ {
+ return this->impl_type_suffix_specified_;
+ }
+
+ inline const NarrowString& options::
+ impl_file_suffix () const
+ {
+ return this->impl_file_suffix_;
+ }
+
+ inline bool options::
+ impl_file_suffix_specified () const
+ {
+ return this->impl_file_suffix_specified_;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
diff --git a/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx
new file mode 100644
index 0000000..17214c1
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx
@@ -0,0 +1,1343 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+#include <xsd/options-parser.hxx>
+//
+// End prologue.
+
+#include <xsd/cxx/tree/options.hxx>
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <utility>
+#include <ostream>
+#include <sstream>
+#include <cstring>
+
+namespace cli
+{
+ template <typename X>
+ struct parser
+ {
+ static void
+ parse (X& x, bool& xs, scanner& s)
+ {
+ using namespace std;
+
+ const char* o (s.next ());
+ if (s.more ())
+ {
+ string v (s.next ());
+ istringstream is (v);
+ if (!(is >> x && is.peek () == istringstream::traits_type::eof ()))
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<bool>
+ {
+ static void
+ parse (bool& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ const char* v (s.next ());
+
+ if (std::strcmp (v, "1") == 0 ||
+ std::strcmp (v, "true") == 0 ||
+ std::strcmp (v, "TRUE") == 0 ||
+ std::strcmp (v, "True") == 0)
+ x = true;
+ else if (std::strcmp (v, "0") == 0 ||
+ std::strcmp (v, "false") == 0 ||
+ std::strcmp (v, "FALSE") == 0 ||
+ std::strcmp (v, "False") == 0)
+ x = false;
+ else
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<std::string>
+ {
+ static void
+ parse (std::string& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X>
+ struct parser<std::pair<X, std::size_t> >
+ {
+ static void
+ parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s)
+ {
+ x.second = s.position ();
+ parser<X>::parse (x.first, xs, s);
+ }
+ };
+
+ template <typename X>
+ struct parser<std::vector<X> >
+ {
+ static void
+ parse (std::vector<X>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.push_back (x);
+ xs = true;
+ }
+ };
+
+ template <typename X, typename C>
+ struct parser<std::set<X, C> >
+ {
+ static void
+ parse (std::set<X, C>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.insert (x);
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::map<K, V, C> >
+ {
+ static void
+ parse (std::map<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m[k] = v;
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X, typename T, T X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, s);
+ }
+
+ template <typename X, bool X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ s.next ();
+ x.*M = true;
+ }
+
+ template <typename X, typename T, T X::*M, bool X::*S>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, x.*S, s);
+ }
+}
+
+#include <map>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ // options
+ //
+
+ options::
+ options ()
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ }
+
+ options::
+ options (int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+ }
+
+ options::
+ options (int start,
+ int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+ }
+
+ options::
+ options (int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+ }
+
+ options::
+ options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+ }
+
+ options::
+ options (::cli::scanner& s,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+ : generate_polymorphic_ (),
+ polymorphic_type_ (),
+ polymorphic_type_specified_ (false),
+ polymorphic_type_all_ (),
+ polymorphic_plate_ (0),
+ polymorphic_plate_specified_ (false),
+ ordered_type_ (),
+ ordered_type_specified_ (false),
+ ordered_type_derived_ (),
+ ordered_type_mixed_ (),
+ ordered_type_all_ (),
+ order_container_ (),
+ order_container_specified_ (false),
+ generate_serialization_ (),
+ generate_ostream_ (),
+ generate_doxygen_ (),
+ generate_comparison_ (),
+ generate_default_ctor_ (),
+ generate_from_base_ctor_ (),
+ suppress_assignment_ (),
+ generate_detach_ (),
+ generate_wildcard_ (),
+ generate_any_type_ (),
+ generate_insertion_ (),
+ generate_insertion_specified_ (false),
+ generate_extraction_ (),
+ generate_extraction_specified_ (false),
+ generate_forward_ (),
+ suppress_parsing_ (),
+ generate_element_type_ (),
+ generate_element_map_ (),
+ generate_intellisense_ (),
+ omit_default_attributes_ (),
+ type_naming_ ("knr"),
+ type_naming_specified_ (false),
+ function_naming_ ("knr"),
+ function_naming_specified_ (false),
+ type_regex_ (),
+ type_regex_specified_ (false),
+ accessor_regex_ (),
+ accessor_regex_specified_ (false),
+ one_accessor_regex_ (),
+ one_accessor_regex_specified_ (false),
+ opt_accessor_regex_ (),
+ opt_accessor_regex_specified_ (false),
+ seq_accessor_regex_ (),
+ seq_accessor_regex_specified_ (false),
+ modifier_regex_ (),
+ modifier_regex_specified_ (false),
+ one_modifier_regex_ (),
+ one_modifier_regex_specified_ (false),
+ opt_modifier_regex_ (),
+ opt_modifier_regex_specified_ (false),
+ seq_modifier_regex_ (),
+ seq_modifier_regex_specified_ (false),
+ parser_regex_ (),
+ parser_regex_specified_ (false),
+ serializer_regex_ (),
+ serializer_regex_specified_ (false),
+ const_regex_ (),
+ const_regex_specified_ (false),
+ enumerator_regex_ (),
+ enumerator_regex_specified_ (false),
+ element_type_regex_ (),
+ element_type_regex_specified_ (false),
+ name_regex_trace_ (),
+ root_element_first_ (),
+ root_element_last_ (),
+ root_element_all_ (),
+ root_element_none_ (),
+ root_element_ (),
+ root_element_specified_ (false),
+ custom_type_ (),
+ custom_type_specified_ (false),
+ custom_type_regex_ (),
+ custom_type_regex_specified_ (false),
+ parts_ (1),
+ parts_specified_ (false),
+ parts_suffix_ ("-"),
+ parts_suffix_specified_ (false)
+ {
+ _parse (s, opt, arg);
+ }
+
+ ::cli::usage_para options::
+ print_usage (::std::wostream& os, ::cli::usage_para p)
+ {
+ CLI_POTENTIALLY_UNUSED (os);
+
+ if (p == ::cli::usage_para::text)
+ os << ::std::endl;
+
+ os << "--generate-polymorphic Generate polymorphism-aware code." << ::std::endl;
+
+ os << "--polymorphic-type <type> Indicate that <type> is a root of a polymorphic" << ::std::endl
+ << " type hierarchy." << ::std::endl;
+
+ os << "--polymorphic-type-all Indicate that all types should be treated as" << ::std::endl
+ << " polymorphic." << ::std::endl;
+
+ os << "--polymorphic-plate <num> Specify the polymorphic map plate the generated" << ::std::endl
+ << " code should register on." << ::std::endl;
+
+ os << "--ordered-type <type> Indicate that element order in <type> is" << ::std::endl
+ << " significant." << ::std::endl;
+
+ os << "--ordered-type-derived Automatically treat types derived from ordered" << ::std::endl
+ << " bases as also ordered." << ::std::endl;
+
+ os << "--ordered-type-mixed Automatically treat complex types with mixed" << ::std::endl
+ << " content as ordered." << ::std::endl;
+
+ os << "--ordered-type-all Indicate that element order in all types is" << ::std::endl
+ << " significant." << ::std::endl;
+
+ os << "--order-container <type> Specify a custom class template that should be" << ::std::endl
+ << " used as a container for the content order in" << ::std::endl
+ << " ordered types instead of the default std::vector." << ::std::endl;
+
+ os << "--generate-serialization Generate serialization functions." << ::std::endl;
+
+ os << "--generate-ostream Generate ostream insertion operators (operator<<)" << ::std::endl
+ << " for generated types." << ::std::endl;
+
+ os << "--generate-doxygen Generate documentation comments suitable for" << ::std::endl
+ << " extraction by the Doxygen documentation system." << ::std::endl;
+
+ os << "--generate-comparison Generate comparison operators (operator== and" << ::std::endl
+ << " operator!=) for complex types." << ::std::endl;
+
+ os << "--generate-default-ctor Generate default constructors even for types that" << ::std::endl
+ << " have required members." << ::std::endl;
+
+ os << "--generate-from-base-ctor Generate constructors that expect an instance of a" << ::std::endl
+ << " base type followed by all required members." << ::std::endl;
+
+ os << "--suppress-assignment Suppress the generation of copy assignment" << ::std::endl
+ << " operators for complex types." << ::std::endl;
+
+ os << "--generate-detach Generate detach functions for required elements" << ::std::endl
+ << " and attributes." << ::std::endl;
+
+ os << "--generate-wildcard Generate accessors and modifiers as well as" << ::std::endl
+ << " parsing and serialization code for XML Schema" << ::std::endl
+ << " wildcards (any and anyAttribute)." << ::std::endl;
+
+ os << "--generate-any-type Extract and store content of the XML Schema" << ::std::endl
+ << " anyType type as a DOM fragment." << ::std::endl;
+
+ os << "--generate-insertion <os> Generate data representation stream insertion" << ::std::endl
+ << " operators for the <os> output stream type." << ::std::endl;
+
+ os << "--generate-extraction <is> Generate data representation stream extraction" << ::std::endl
+ << " constructors for the <is> input stream type." << ::std::endl;
+
+ os << "--generate-forward Generate a separate header file with forward" << ::std::endl
+ << " declarations for the types being generated." << ::std::endl;
+
+ os << "--suppress-parsing Suppress the generation of the parsing functions" << ::std::endl
+ << " and constructors." << ::std::endl;
+
+ os << "--generate-element-type Generate types instead of parsing and" << ::std::endl
+ << " serialization functions for root elements." << ::std::endl;
+
+ os << "--generate-element-map Generate a root element map that allows uniform" << ::std::endl
+ << " parsing and serialization of multiple root" << ::std::endl
+ << " elements." << ::std::endl;
+
+ os << "--generate-intellisense Generate workarounds for IntelliSense bugs in" << ::std::endl
+ << " Visual Studio 2005 (8.0)." << ::std::endl;
+
+ os << "--omit-default-attributes Omit attributes with default and fixed values from" << ::std::endl
+ << " serialized XML documents." << ::std::endl;
+
+ os << "--type-naming <style> Specify the type naming convention that should be" << ::std::endl
+ << " used in the generated code." << ::std::endl;
+
+ os << "--function-naming <style> Specify the function naming convention that should" << ::std::endl
+ << " be used in the generated code." << ::std::endl;
+
+ os << "--type-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema type names to C++" << ::std::endl
+ << " type names." << ::std::endl;
+
+ os << "--accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes to C++ accessor function" << ::std::endl
+ << " names." << ::std::endl;
+
+ os << "--one-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality one to C++" << ::std::endl
+ << " accessor function names." << ::std::endl;
+
+ os << "--opt-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality optional to" << ::std::endl
+ << " C++ accessor function names." << ::std::endl;
+
+ os << "--seq-accessor-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality sequence to" << ::std::endl
+ << " C++ accessor function names." << ::std::endl;
+
+ os << "--modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes to C++ modifier function" << ::std::endl
+ << " names." << ::std::endl;
+
+ os << "--one-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality one to C++" << ::std::endl
+ << " modifier function names." << ::std::endl;
+
+ os << "--opt-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality optional to" << ::std::endl
+ << " C++ modifier function names." << ::std::endl;
+
+ os << "--seq-modifier-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema names of" << ::std::endl
+ << " elements/attributes with cardinality sequence to" << ::std::endl
+ << " C++ modifier function names." << ::std::endl;
+
+ os << "--parser-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " parsing function names." << ::std::endl;
+
+ os << "--serializer-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " serialization function names." << ::std::endl;
+
+ os << "--const-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema-derived names to C++" << ::std::endl
+ << " constant names." << ::std::endl;
+
+ os << "--enumerator-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema enumeration values to" << ::std::endl
+ << " C++ enumerator names." << ::std::endl;
+
+ os << "--element-type-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate XML Schema element names to C++" << ::std::endl
+ << " element type names." << ::std::endl;
+
+ os << "--name-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the name transformation options." << ::std::endl;
+
+ os << "--root-element-first Treat only the first global element as a document" << ::std::endl
+ << " root." << ::std::endl;
+
+ os << "--root-element-last Treat only the last global element as a document" << ::std::endl
+ << " root." << ::std::endl;
+
+ os << "--root-element-all Treat all global elements as document roots." << ::std::endl;
+
+ os << "--root-element-none Do not treat any global elements as document" << ::std::endl
+ << " roots." << ::std::endl;
+
+ os << "--root-element <element> Treat only <element> as a document root." << ::std::endl;
+
+ os << "--custom-type <map> Use a custom C++ type instead of the generated" << ::std::endl
+ << " class." << ::std::endl;
+
+ os << "--custom-type-regex <regex> Use custom C++ types instead of the generated" << ::std::endl
+ << " classes." << ::std::endl;
+
+ os << "--parts <num> Split generated source code into <num> parts." << ::std::endl;
+
+ os << "--parts-suffix <suffix> Use <suffix> instead of the default '-' to" << ::std::endl
+ << " separate the file name from the part number." << ::std::endl;
+
+ p = ::cli::usage_para::option;
+
+ return p;
+ }
+
+ typedef
+ std::map<std::string, void (*) (options&, ::cli::scanner&)>
+ _cli_options_map;
+
+ static _cli_options_map _cli_options_map_;
+
+ struct _cli_options_map_init
+ {
+ _cli_options_map_init ()
+ {
+ _cli_options_map_["--generate-polymorphic"] =
+ &::cli::thunk< options, &options::generate_polymorphic_ >;
+ _cli_options_map_["--polymorphic-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::polymorphic_type_,
+ &options::polymorphic_type_specified_ >;
+ _cli_options_map_["--polymorphic-type-all"] =
+ &::cli::thunk< options, &options::polymorphic_type_all_ >;
+ _cli_options_map_["--polymorphic-plate"] =
+ &::cli::thunk< options, unsigned long, &options::polymorphic_plate_,
+ &options::polymorphic_plate_specified_ >;
+ _cli_options_map_["--ordered-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::ordered_type_,
+ &options::ordered_type_specified_ >;
+ _cli_options_map_["--ordered-type-derived"] =
+ &::cli::thunk< options, &options::ordered_type_derived_ >;
+ _cli_options_map_["--ordered-type-mixed"] =
+ &::cli::thunk< options, &options::ordered_type_mixed_ >;
+ _cli_options_map_["--ordered-type-all"] =
+ &::cli::thunk< options, &options::ordered_type_all_ >;
+ _cli_options_map_["--order-container"] =
+ &::cli::thunk< options, NarrowString, &options::order_container_,
+ &options::order_container_specified_ >;
+ _cli_options_map_["--generate-serialization"] =
+ &::cli::thunk< options, &options::generate_serialization_ >;
+ _cli_options_map_["--generate-ostream"] =
+ &::cli::thunk< options, &options::generate_ostream_ >;
+ _cli_options_map_["--generate-doxygen"] =
+ &::cli::thunk< options, &options::generate_doxygen_ >;
+ _cli_options_map_["--generate-comparison"] =
+ &::cli::thunk< options, &options::generate_comparison_ >;
+ _cli_options_map_["--generate-default-ctor"] =
+ &::cli::thunk< options, &options::generate_default_ctor_ >;
+ _cli_options_map_["--generate-from-base-ctor"] =
+ &::cli::thunk< options, &options::generate_from_base_ctor_ >;
+ _cli_options_map_["--suppress-assignment"] =
+ &::cli::thunk< options, &options::suppress_assignment_ >;
+ _cli_options_map_["--generate-detach"] =
+ &::cli::thunk< options, &options::generate_detach_ >;
+ _cli_options_map_["--generate-wildcard"] =
+ &::cli::thunk< options, &options::generate_wildcard_ >;
+ _cli_options_map_["--generate-any-type"] =
+ &::cli::thunk< options, &options::generate_any_type_ >;
+ _cli_options_map_["--generate-insertion"] =
+ &::cli::thunk< options, NarrowStrings, &options::generate_insertion_,
+ &options::generate_insertion_specified_ >;
+ _cli_options_map_["--generate-extraction"] =
+ &::cli::thunk< options, NarrowStrings, &options::generate_extraction_,
+ &options::generate_extraction_specified_ >;
+ _cli_options_map_["--generate-forward"] =
+ &::cli::thunk< options, &options::generate_forward_ >;
+ _cli_options_map_["--suppress-parsing"] =
+ &::cli::thunk< options, &options::suppress_parsing_ >;
+ _cli_options_map_["--generate-element-type"] =
+ &::cli::thunk< options, &options::generate_element_type_ >;
+ _cli_options_map_["--generate-element-map"] =
+ &::cli::thunk< options, &options::generate_element_map_ >;
+ _cli_options_map_["--generate-intellisense"] =
+ &::cli::thunk< options, &options::generate_intellisense_ >;
+ _cli_options_map_["--omit-default-attributes"] =
+ &::cli::thunk< options, &options::omit_default_attributes_ >;
+ _cli_options_map_["--type-naming"] =
+ &::cli::thunk< options, NarrowString, &options::type_naming_,
+ &options::type_naming_specified_ >;
+ _cli_options_map_["--function-naming"] =
+ &::cli::thunk< options, NarrowString, &options::function_naming_,
+ &options::function_naming_specified_ >;
+ _cli_options_map_["--type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::type_regex_,
+ &options::type_regex_specified_ >;
+ _cli_options_map_["--accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::accessor_regex_,
+ &options::accessor_regex_specified_ >;
+ _cli_options_map_["--one-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::one_accessor_regex_,
+ &options::one_accessor_regex_specified_ >;
+ _cli_options_map_["--opt-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::opt_accessor_regex_,
+ &options::opt_accessor_regex_specified_ >;
+ _cli_options_map_["--seq-accessor-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::seq_accessor_regex_,
+ &options::seq_accessor_regex_specified_ >;
+ _cli_options_map_["--modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::modifier_regex_,
+ &options::modifier_regex_specified_ >;
+ _cli_options_map_["--one-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::one_modifier_regex_,
+ &options::one_modifier_regex_specified_ >;
+ _cli_options_map_["--opt-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::opt_modifier_regex_,
+ &options::opt_modifier_regex_specified_ >;
+ _cli_options_map_["--seq-modifier-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::seq_modifier_regex_,
+ &options::seq_modifier_regex_specified_ >;
+ _cli_options_map_["--parser-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::parser_regex_,
+ &options::parser_regex_specified_ >;
+ _cli_options_map_["--serializer-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::serializer_regex_,
+ &options::serializer_regex_specified_ >;
+ _cli_options_map_["--const-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::const_regex_,
+ &options::const_regex_specified_ >;
+ _cli_options_map_["--enumerator-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::enumerator_regex_,
+ &options::enumerator_regex_specified_ >;
+ _cli_options_map_["--element-type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::element_type_regex_,
+ &options::element_type_regex_specified_ >;
+ _cli_options_map_["--name-regex-trace"] =
+ &::cli::thunk< options, &options::name_regex_trace_ >;
+ _cli_options_map_["--root-element-first"] =
+ &::cli::thunk< options, &options::root_element_first_ >;
+ _cli_options_map_["--root-element-last"] =
+ &::cli::thunk< options, &options::root_element_last_ >;
+ _cli_options_map_["--root-element-all"] =
+ &::cli::thunk< options, &options::root_element_all_ >;
+ _cli_options_map_["--root-element-none"] =
+ &::cli::thunk< options, &options::root_element_none_ >;
+ _cli_options_map_["--root-element"] =
+ &::cli::thunk< options, NarrowStrings, &options::root_element_,
+ &options::root_element_specified_ >;
+ _cli_options_map_["--custom-type"] =
+ &::cli::thunk< options, NarrowStrings, &options::custom_type_,
+ &options::custom_type_specified_ >;
+ _cli_options_map_["--custom-type-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::custom_type_regex_,
+ &options::custom_type_regex_specified_ >;
+ _cli_options_map_["--parts"] =
+ &::cli::thunk< options, std::size_t, &options::parts_,
+ &options::parts_specified_ >;
+ _cli_options_map_["--parts-suffix"] =
+ &::cli::thunk< options, NarrowString, &options::parts_suffix_,
+ &options::parts_suffix_specified_ >;
+ }
+ };
+
+ static _cli_options_map_init _cli_options_map_init_;
+
+ bool options::
+ _parse (const char* o, ::cli::scanner& s)
+ {
+ _cli_options_map::const_iterator i (_cli_options_map_.find (o));
+
+ if (i != _cli_options_map_.end ())
+ {
+ (*(i->second)) (*this, s);
+ return true;
+ }
+
+ // options base
+ //
+ if (::CXX::options::_parse (o, s))
+ return true;
+
+ return false;
+ }
+
+ bool options::
+ _parse (::cli::scanner& s,
+ ::cli::unknown_mode opt_mode,
+ ::cli::unknown_mode arg_mode)
+ {
+ // Can't skip combined flags (--no-combined-flags).
+ //
+ assert (opt_mode != ::cli::unknown_mode::skip);
+
+ bool r = false;
+ bool opt = true;
+
+ while (s.more ())
+ {
+ const char* o = s.peek ();
+
+ if (std::strcmp (o, "--") == 0)
+ {
+ opt = false;
+ s.skip ();
+ r = true;
+ continue;
+ }
+
+ if (opt)
+ {
+ if (_parse (o, s))
+ {
+ r = true;
+ continue;
+ }
+
+ if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0')
+ {
+ // Handle combined option values.
+ //
+ std::string co;
+ if (const char* v = std::strchr (o, '='))
+ {
+ co.assign (o, 0, v - o);
+ ++v;
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (co.c_str ()),
+ const_cast<char*> (v)
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (_parse (co.c_str (), ns))
+ {
+ // Parsed the option but not its value?
+ //
+ if (ns.end () != 2)
+ throw ::cli::invalid_value (co, v);
+
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = co.c_str ();
+ }
+ }
+
+ // Handle combined flags.
+ //
+ char cf[3];
+ {
+ const char* p = o + 1;
+ for (; *p != '\0'; ++p)
+ {
+ if (!((*p >= 'a' && *p <= 'z') ||
+ (*p >= 'A' && *p <= 'Z') ||
+ (*p >= '0' && *p <= '9')))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ for (p = o + 1; *p != '\0'; ++p)
+ {
+ std::strcpy (cf, "-");
+ cf[1] = *p;
+ cf[2] = '\0';
+
+ int ac (1);
+ char* av[] =
+ {
+ cf
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (!_parse (cf, ns))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ // All handled.
+ //
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = cf;
+ }
+ }
+ }
+
+ switch (opt_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_option (o);
+ }
+ }
+
+ break;
+ }
+ }
+
+ switch (arg_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_argument (o);
+ }
+ }
+
+ break;
+ }
+
+ return r;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
diff --git a/xsd/xsd/pregenerated/xsd/cxx/tree/options.hxx b/xsd/xsd/pregenerated/xsd/cxx/tree/options.hxx
new file mode 100644
index 0000000..f5a808c
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/tree/options.hxx
@@ -0,0 +1,414 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef XSD_CXX_TREE_OPTIONS_HXX
+#define XSD_CXX_TREE_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <cstddef>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class options: public ::CXX::options
+ {
+ public:
+ options ();
+
+ options (int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ options (::cli::scanner&,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ // Option accessors.
+ //
+ const bool&
+ generate_polymorphic () const;
+
+ const NarrowStrings&
+ polymorphic_type () const;
+
+ bool
+ polymorphic_type_specified () const;
+
+ const bool&
+ polymorphic_type_all () const;
+
+ const unsigned long&
+ polymorphic_plate () const;
+
+ bool
+ polymorphic_plate_specified () const;
+
+ const NarrowStrings&
+ ordered_type () const;
+
+ bool
+ ordered_type_specified () const;
+
+ const bool&
+ ordered_type_derived () const;
+
+ const bool&
+ ordered_type_mixed () const;
+
+ const bool&
+ ordered_type_all () const;
+
+ const NarrowString&
+ order_container () const;
+
+ bool
+ order_container_specified () const;
+
+ const bool&
+ generate_serialization () const;
+
+ const bool&
+ generate_ostream () const;
+
+ const bool&
+ generate_doxygen () const;
+
+ const bool&
+ generate_comparison () const;
+
+ const bool&
+ generate_default_ctor () const;
+
+ const bool&
+ generate_from_base_ctor () const;
+
+ const bool&
+ suppress_assignment () const;
+
+ const bool&
+ generate_detach () const;
+
+ const bool&
+ generate_wildcard () const;
+
+ const bool&
+ generate_any_type () const;
+
+ const NarrowStrings&
+ generate_insertion () const;
+
+ bool
+ generate_insertion_specified () const;
+
+ const NarrowStrings&
+ generate_extraction () const;
+
+ bool
+ generate_extraction_specified () const;
+
+ const bool&
+ generate_forward () const;
+
+ const bool&
+ suppress_parsing () const;
+
+ const bool&
+ generate_element_type () const;
+
+ const bool&
+ generate_element_map () const;
+
+ const bool&
+ generate_intellisense () const;
+
+ const bool&
+ omit_default_attributes () const;
+
+ const NarrowString&
+ type_naming () const;
+
+ bool
+ type_naming_specified () const;
+
+ const NarrowString&
+ function_naming () const;
+
+ bool
+ function_naming_specified () const;
+
+ const NarrowStrings&
+ type_regex () const;
+
+ bool
+ type_regex_specified () const;
+
+ const NarrowStrings&
+ accessor_regex () const;
+
+ bool
+ accessor_regex_specified () const;
+
+ const NarrowStrings&
+ one_accessor_regex () const;
+
+ bool
+ one_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ opt_accessor_regex () const;
+
+ bool
+ opt_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ seq_accessor_regex () const;
+
+ bool
+ seq_accessor_regex_specified () const;
+
+ const NarrowStrings&
+ modifier_regex () const;
+
+ bool
+ modifier_regex_specified () const;
+
+ const NarrowStrings&
+ one_modifier_regex () const;
+
+ bool
+ one_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ opt_modifier_regex () const;
+
+ bool
+ opt_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ seq_modifier_regex () const;
+
+ bool
+ seq_modifier_regex_specified () const;
+
+ const NarrowStrings&
+ parser_regex () const;
+
+ bool
+ parser_regex_specified () const;
+
+ const NarrowStrings&
+ serializer_regex () const;
+
+ bool
+ serializer_regex_specified () const;
+
+ const NarrowStrings&
+ const_regex () const;
+
+ bool
+ const_regex_specified () const;
+
+ const NarrowStrings&
+ enumerator_regex () const;
+
+ bool
+ enumerator_regex_specified () const;
+
+ const NarrowStrings&
+ element_type_regex () const;
+
+ bool
+ element_type_regex_specified () const;
+
+ const bool&
+ name_regex_trace () const;
+
+ const bool&
+ root_element_first () const;
+
+ const bool&
+ root_element_last () const;
+
+ const bool&
+ root_element_all () const;
+
+ const bool&
+ root_element_none () const;
+
+ const NarrowStrings&
+ root_element () const;
+
+ bool
+ root_element_specified () const;
+
+ const NarrowStrings&
+ custom_type () const;
+
+ bool
+ custom_type_specified () const;
+
+ const NarrowStrings&
+ custom_type_regex () const;
+
+ bool
+ custom_type_regex_specified () const;
+
+ const std::size_t&
+ parts () const;
+
+ bool
+ parts_specified () const;
+
+ const NarrowString&
+ parts_suffix () const;
+
+ bool
+ parts_suffix_specified () const;
+
+ // Print usage information.
+ //
+ static ::cli::usage_para
+ print_usage (::std::wostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::cli::scanner&);
+
+ private:
+ bool
+ _parse (::cli::scanner&,
+ ::cli::unknown_mode option,
+ ::cli::unknown_mode argument);
+
+ public:
+ bool generate_polymorphic_;
+ NarrowStrings polymorphic_type_;
+ bool polymorphic_type_specified_;
+ bool polymorphic_type_all_;
+ unsigned long polymorphic_plate_;
+ bool polymorphic_plate_specified_;
+ NarrowStrings ordered_type_;
+ bool ordered_type_specified_;
+ bool ordered_type_derived_;
+ bool ordered_type_mixed_;
+ bool ordered_type_all_;
+ NarrowString order_container_;
+ bool order_container_specified_;
+ bool generate_serialization_;
+ bool generate_ostream_;
+ bool generate_doxygen_;
+ bool generate_comparison_;
+ bool generate_default_ctor_;
+ bool generate_from_base_ctor_;
+ bool suppress_assignment_;
+ bool generate_detach_;
+ bool generate_wildcard_;
+ bool generate_any_type_;
+ NarrowStrings generate_insertion_;
+ bool generate_insertion_specified_;
+ NarrowStrings generate_extraction_;
+ bool generate_extraction_specified_;
+ bool generate_forward_;
+ bool suppress_parsing_;
+ bool generate_element_type_;
+ bool generate_element_map_;
+ bool generate_intellisense_;
+ bool omit_default_attributes_;
+ NarrowString type_naming_;
+ bool type_naming_specified_;
+ NarrowString function_naming_;
+ bool function_naming_specified_;
+ NarrowStrings type_regex_;
+ bool type_regex_specified_;
+ NarrowStrings accessor_regex_;
+ bool accessor_regex_specified_;
+ NarrowStrings one_accessor_regex_;
+ bool one_accessor_regex_specified_;
+ NarrowStrings opt_accessor_regex_;
+ bool opt_accessor_regex_specified_;
+ NarrowStrings seq_accessor_regex_;
+ bool seq_accessor_regex_specified_;
+ NarrowStrings modifier_regex_;
+ bool modifier_regex_specified_;
+ NarrowStrings one_modifier_regex_;
+ bool one_modifier_regex_specified_;
+ NarrowStrings opt_modifier_regex_;
+ bool opt_modifier_regex_specified_;
+ NarrowStrings seq_modifier_regex_;
+ bool seq_modifier_regex_specified_;
+ NarrowStrings parser_regex_;
+ bool parser_regex_specified_;
+ NarrowStrings serializer_regex_;
+ bool serializer_regex_specified_;
+ NarrowStrings const_regex_;
+ bool const_regex_specified_;
+ NarrowStrings enumerator_regex_;
+ bool enumerator_regex_specified_;
+ NarrowStrings element_type_regex_;
+ bool element_type_regex_specified_;
+ bool name_regex_trace_;
+ bool root_element_first_;
+ bool root_element_last_;
+ bool root_element_all_;
+ bool root_element_none_;
+ NarrowStrings root_element_;
+ bool root_element_specified_;
+ NarrowStrings custom_type_;
+ bool custom_type_specified_;
+ NarrowStrings custom_type_regex_;
+ bool custom_type_regex_specified_;
+ std::size_t parts_;
+ bool parts_specified_;
+ NarrowString parts_suffix_;
+ bool parts_suffix_specified_;
+ };
+ }
+}
+
+#include <xsd/cxx/tree/options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // XSD_CXX_TREE_OPTIONS_HXX
diff --git a/xsd/xsd/pregenerated/xsd/cxx/tree/options.ixx b/xsd/xsd/pregenerated/xsd/cxx/tree/options.ixx
new file mode 100644
index 0000000..4d34fd9
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/cxx/tree/options.ixx
@@ -0,0 +1,504 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+namespace CXX
+{
+ namespace Tree
+ {
+ // options
+ //
+
+ inline const bool& options::
+ generate_polymorphic () const
+ {
+ return this->generate_polymorphic_;
+ }
+
+ inline const NarrowStrings& options::
+ polymorphic_type () const
+ {
+ return this->polymorphic_type_;
+ }
+
+ inline bool options::
+ polymorphic_type_specified () const
+ {
+ return this->polymorphic_type_specified_;
+ }
+
+ inline const bool& options::
+ polymorphic_type_all () const
+ {
+ return this->polymorphic_type_all_;
+ }
+
+ inline const unsigned long& options::
+ polymorphic_plate () const
+ {
+ return this->polymorphic_plate_;
+ }
+
+ inline bool options::
+ polymorphic_plate_specified () const
+ {
+ return this->polymorphic_plate_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ ordered_type () const
+ {
+ return this->ordered_type_;
+ }
+
+ inline bool options::
+ ordered_type_specified () const
+ {
+ return this->ordered_type_specified_;
+ }
+
+ inline const bool& options::
+ ordered_type_derived () const
+ {
+ return this->ordered_type_derived_;
+ }
+
+ inline const bool& options::
+ ordered_type_mixed () const
+ {
+ return this->ordered_type_mixed_;
+ }
+
+ inline const bool& options::
+ ordered_type_all () const
+ {
+ return this->ordered_type_all_;
+ }
+
+ inline const NarrowString& options::
+ order_container () const
+ {
+ return this->order_container_;
+ }
+
+ inline bool options::
+ order_container_specified () const
+ {
+ return this->order_container_specified_;
+ }
+
+ inline const bool& options::
+ generate_serialization () const
+ {
+ return this->generate_serialization_;
+ }
+
+ inline const bool& options::
+ generate_ostream () const
+ {
+ return this->generate_ostream_;
+ }
+
+ inline const bool& options::
+ generate_doxygen () const
+ {
+ return this->generate_doxygen_;
+ }
+
+ inline const bool& options::
+ generate_comparison () const
+ {
+ return this->generate_comparison_;
+ }
+
+ inline const bool& options::
+ generate_default_ctor () const
+ {
+ return this->generate_default_ctor_;
+ }
+
+ inline const bool& options::
+ generate_from_base_ctor () const
+ {
+ return this->generate_from_base_ctor_;
+ }
+
+ inline const bool& options::
+ suppress_assignment () const
+ {
+ return this->suppress_assignment_;
+ }
+
+ inline const bool& options::
+ generate_detach () const
+ {
+ return this->generate_detach_;
+ }
+
+ inline const bool& options::
+ generate_wildcard () const
+ {
+ return this->generate_wildcard_;
+ }
+
+ inline const bool& options::
+ generate_any_type () const
+ {
+ return this->generate_any_type_;
+ }
+
+ inline const NarrowStrings& options::
+ generate_insertion () const
+ {
+ return this->generate_insertion_;
+ }
+
+ inline bool options::
+ generate_insertion_specified () const
+ {
+ return this->generate_insertion_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ generate_extraction () const
+ {
+ return this->generate_extraction_;
+ }
+
+ inline bool options::
+ generate_extraction_specified () const
+ {
+ return this->generate_extraction_specified_;
+ }
+
+ inline const bool& options::
+ generate_forward () const
+ {
+ return this->generate_forward_;
+ }
+
+ inline const bool& options::
+ suppress_parsing () const
+ {
+ return this->suppress_parsing_;
+ }
+
+ inline const bool& options::
+ generate_element_type () const
+ {
+ return this->generate_element_type_;
+ }
+
+ inline const bool& options::
+ generate_element_map () const
+ {
+ return this->generate_element_map_;
+ }
+
+ inline const bool& options::
+ generate_intellisense () const
+ {
+ return this->generate_intellisense_;
+ }
+
+ inline const bool& options::
+ omit_default_attributes () const
+ {
+ return this->omit_default_attributes_;
+ }
+
+ inline const NarrowString& options::
+ type_naming () const
+ {
+ return this->type_naming_;
+ }
+
+ inline bool options::
+ type_naming_specified () const
+ {
+ return this->type_naming_specified_;
+ }
+
+ inline const NarrowString& options::
+ function_naming () const
+ {
+ return this->function_naming_;
+ }
+
+ inline bool options::
+ function_naming_specified () const
+ {
+ return this->function_naming_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ type_regex () const
+ {
+ return this->type_regex_;
+ }
+
+ inline bool options::
+ type_regex_specified () const
+ {
+ return this->type_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ accessor_regex () const
+ {
+ return this->accessor_regex_;
+ }
+
+ inline bool options::
+ accessor_regex_specified () const
+ {
+ return this->accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ one_accessor_regex () const
+ {
+ return this->one_accessor_regex_;
+ }
+
+ inline bool options::
+ one_accessor_regex_specified () const
+ {
+ return this->one_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ opt_accessor_regex () const
+ {
+ return this->opt_accessor_regex_;
+ }
+
+ inline bool options::
+ opt_accessor_regex_specified () const
+ {
+ return this->opt_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ seq_accessor_regex () const
+ {
+ return this->seq_accessor_regex_;
+ }
+
+ inline bool options::
+ seq_accessor_regex_specified () const
+ {
+ return this->seq_accessor_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ modifier_regex () const
+ {
+ return this->modifier_regex_;
+ }
+
+ inline bool options::
+ modifier_regex_specified () const
+ {
+ return this->modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ one_modifier_regex () const
+ {
+ return this->one_modifier_regex_;
+ }
+
+ inline bool options::
+ one_modifier_regex_specified () const
+ {
+ return this->one_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ opt_modifier_regex () const
+ {
+ return this->opt_modifier_regex_;
+ }
+
+ inline bool options::
+ opt_modifier_regex_specified () const
+ {
+ return this->opt_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ seq_modifier_regex () const
+ {
+ return this->seq_modifier_regex_;
+ }
+
+ inline bool options::
+ seq_modifier_regex_specified () const
+ {
+ return this->seq_modifier_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ parser_regex () const
+ {
+ return this->parser_regex_;
+ }
+
+ inline bool options::
+ parser_regex_specified () const
+ {
+ return this->parser_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ serializer_regex () const
+ {
+ return this->serializer_regex_;
+ }
+
+ inline bool options::
+ serializer_regex_specified () const
+ {
+ return this->serializer_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ const_regex () const
+ {
+ return this->const_regex_;
+ }
+
+ inline bool options::
+ const_regex_specified () const
+ {
+ return this->const_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ enumerator_regex () const
+ {
+ return this->enumerator_regex_;
+ }
+
+ inline bool options::
+ enumerator_regex_specified () const
+ {
+ return this->enumerator_regex_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ element_type_regex () const
+ {
+ return this->element_type_regex_;
+ }
+
+ inline bool options::
+ element_type_regex_specified () const
+ {
+ return this->element_type_regex_specified_;
+ }
+
+ inline const bool& options::
+ name_regex_trace () const
+ {
+ return this->name_regex_trace_;
+ }
+
+ inline const bool& options::
+ root_element_first () const
+ {
+ return this->root_element_first_;
+ }
+
+ inline const bool& options::
+ root_element_last () const
+ {
+ return this->root_element_last_;
+ }
+
+ inline const bool& options::
+ root_element_all () const
+ {
+ return this->root_element_all_;
+ }
+
+ inline const bool& options::
+ root_element_none () const
+ {
+ return this->root_element_none_;
+ }
+
+ inline const NarrowStrings& options::
+ root_element () const
+ {
+ return this->root_element_;
+ }
+
+ inline bool options::
+ root_element_specified () const
+ {
+ return this->root_element_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ custom_type () const
+ {
+ return this->custom_type_;
+ }
+
+ inline bool options::
+ custom_type_specified () const
+ {
+ return this->custom_type_specified_;
+ }
+
+ inline const NarrowStrings& options::
+ custom_type_regex () const
+ {
+ return this->custom_type_regex_;
+ }
+
+ inline bool options::
+ custom_type_regex_specified () const
+ {
+ return this->custom_type_regex_specified_;
+ }
+
+ inline const std::size_t& options::
+ parts () const
+ {
+ return this->parts_;
+ }
+
+ inline bool options::
+ parts_specified () const
+ {
+ return this->parts_specified_;
+ }
+
+ inline const NarrowString& options::
+ parts_suffix () const
+ {
+ return this->parts_suffix_;
+ }
+
+ inline bool options::
+ parts_suffix_specified () const
+ {
+ return this->parts_suffix_specified_;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
diff --git a/xsd/xsd/pregenerated/xsd/options.cxx b/xsd/xsd/pregenerated/xsd/options.cxx
new file mode 100644
index 0000000..3022ec4
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/options.cxx
@@ -0,0 +1,1297 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+#include <xsd/options-parser.hxx>
+//
+// End prologue.
+
+#include <xsd/options.hxx>
+
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+#include <utility>
+#include <ostream>
+#include <sstream>
+#include <cstring>
+#include <fstream>
+
+namespace cli
+{
+ // unknown_option
+ //
+ unknown_option::
+ ~unknown_option () noexcept
+ {
+ }
+
+ void unknown_option::
+ print (::std::wostream& os) const
+ {
+ os << "unknown option '" << option ().c_str () << "'";
+ }
+
+ const char* unknown_option::
+ what () const noexcept
+ {
+ return "unknown option";
+ }
+
+ // unknown_argument
+ //
+ unknown_argument::
+ ~unknown_argument () noexcept
+ {
+ }
+
+ void unknown_argument::
+ print (::std::wostream& os) const
+ {
+ os << "unknown argument '" << argument ().c_str () << "'";
+ }
+
+ const char* unknown_argument::
+ what () const noexcept
+ {
+ return "unknown argument";
+ }
+
+ // missing_value
+ //
+ missing_value::
+ ~missing_value () noexcept
+ {
+ }
+
+ void missing_value::
+ print (::std::wostream& os) const
+ {
+ os << "missing value for option '" << option ().c_str () << "'";
+ }
+
+ const char* missing_value::
+ what () const noexcept
+ {
+ return "missing option value";
+ }
+
+ // invalid_value
+ //
+ invalid_value::
+ ~invalid_value () noexcept
+ {
+ }
+
+ void invalid_value::
+ print (::std::wostream& os) const
+ {
+ os << "invalid value '" << value ().c_str () << "' for option '"
+ << option ().c_str () << "'";
+
+ if (!message ().empty ())
+ os << ": " << message ().c_str ();
+ }
+
+ const char* invalid_value::
+ what () const noexcept
+ {
+ return "invalid option value";
+ }
+
+ // eos_reached
+ //
+ void eos_reached::
+ print (::std::wostream& os) const
+ {
+ os << what ();
+ }
+
+ const char* eos_reached::
+ what () const noexcept
+ {
+ return "end of argument stream reached";
+ }
+
+ // file_io_failure
+ //
+ file_io_failure::
+ ~file_io_failure () noexcept
+ {
+ }
+
+ void file_io_failure::
+ print (::std::wostream& os) const
+ {
+ os << "unable to open file '" << file ().c_str () << "' or read failure";
+ }
+
+ const char* file_io_failure::
+ what () const noexcept
+ {
+ return "unable to open file or read failure";
+ }
+
+ // unmatched_quote
+ //
+ unmatched_quote::
+ ~unmatched_quote () noexcept
+ {
+ }
+
+ void unmatched_quote::
+ print (::std::wostream& os) const
+ {
+ os << "unmatched quote in argument '" << argument ().c_str () << "'";
+ }
+
+ const char* unmatched_quote::
+ what () const noexcept
+ {
+ return "unmatched quote";
+ }
+
+ // scanner
+ //
+ scanner::
+ ~scanner ()
+ {
+ }
+
+ // argv_scanner
+ //
+ bool argv_scanner::
+ more ()
+ {
+ return i_ < argc_;
+ }
+
+ const char* argv_scanner::
+ peek ()
+ {
+ if (i_ < argc_)
+ return argv_[i_];
+ else
+ throw eos_reached ();
+ }
+
+ const char* argv_scanner::
+ next ()
+ {
+ if (i_ < argc_)
+ {
+ const char* r (argv_[i_]);
+
+ if (erase_)
+ {
+ for (int i (i_ + 1); i < argc_; ++i)
+ argv_[i - 1] = argv_[i];
+
+ --argc_;
+ argv_[argc_] = 0;
+ }
+ else
+ ++i_;
+
+ ++start_position_;
+ return r;
+ }
+ else
+ throw eos_reached ();
+ }
+
+ void argv_scanner::
+ skip ()
+ {
+ if (i_ < argc_)
+ {
+ ++i_;
+ ++start_position_;
+ }
+ else
+ throw eos_reached ();
+ }
+
+ std::size_t argv_scanner::
+ position ()
+ {
+ return start_position_;
+ }
+
+ // argv_file_scanner
+ //
+ int argv_file_scanner::zero_argc_ = 0;
+ std::string argv_file_scanner::empty_string_;
+
+ bool argv_file_scanner::
+ more ()
+ {
+ if (!args_.empty ())
+ return true;
+
+ while (base::more ())
+ {
+ // See if the next argument is the file option.
+ //
+ const char* a (base::peek ());
+ const option_info* oi = 0;
+ const char* ov = 0;
+
+ if (!skip_)
+ {
+ if ((oi = find (a)) != 0)
+ {
+ base::next ();
+
+ if (!base::more ())
+ throw missing_value (a);
+
+ ov = base::next ();
+ }
+ else if (std::strncmp (a, "-", 1) == 0)
+ {
+ if ((ov = std::strchr (a, '=')) != 0)
+ {
+ std::string o (a, 0, ov - a);
+ if ((oi = find (o.c_str ())) != 0)
+ {
+ base::next ();
+ ++ov;
+ }
+ }
+ }
+ }
+
+ if (oi != 0)
+ {
+ if (oi->search_func != 0)
+ {
+ std::string f (oi->search_func (ov, oi->arg));
+
+ if (!f.empty ())
+ load (f);
+ }
+ else
+ load (ov);
+
+ if (!args_.empty ())
+ return true;
+ }
+ else
+ {
+ if (!skip_)
+ skip_ = (std::strcmp (a, "--") == 0);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ const char* argv_file_scanner::
+ peek ()
+ {
+ if (!more ())
+ throw eos_reached ();
+
+ return args_.empty () ? base::peek () : args_.front ().value.c_str ();
+ }
+
+ const std::string& argv_file_scanner::
+ peek_file ()
+ {
+ if (!more ())
+ throw eos_reached ();
+
+ return args_.empty () ? empty_string_ : *args_.front ().file;
+ }
+
+ std::size_t argv_file_scanner::
+ peek_line ()
+ {
+ if (!more ())
+ throw eos_reached ();
+
+ return args_.empty () ? 0 : args_.front ().line;
+ }
+
+ const char* argv_file_scanner::
+ next ()
+ {
+ if (!more ())
+ throw eos_reached ();
+
+ if (args_.empty ())
+ return base::next ();
+ else
+ {
+ hold_[i_ == 0 ? ++i_ : --i_].swap (args_.front ().value);
+ args_.pop_front ();
+ ++start_position_;
+ return hold_[i_].c_str ();
+ }
+ }
+
+ void argv_file_scanner::
+ skip ()
+ {
+ if (!more ())
+ throw eos_reached ();
+
+ if (args_.empty ())
+ return base::skip ();
+ else
+ {
+ args_.pop_front ();
+ ++start_position_;
+ }
+ }
+
+ const argv_file_scanner::option_info* argv_file_scanner::
+ find (const char* a) const
+ {
+ for (std::size_t i (0); i < options_count_; ++i)
+ if (std::strcmp (a, options_[i].option) == 0)
+ return &options_[i];
+
+ return 0;
+ }
+
+ std::size_t argv_file_scanner::
+ position ()
+ {
+ return start_position_;
+ }
+
+ void argv_file_scanner::
+ load (const std::string& file)
+ {
+ using namespace std;
+
+ ifstream is (file.c_str ());
+
+ if (!is.is_open ())
+ throw file_io_failure (file);
+
+ files_.push_back (file);
+
+ arg a;
+ a.file = &*files_.rbegin ();
+
+ for (a.line = 1; !is.eof (); ++a.line)
+ {
+ string line;
+ getline (is, line);
+
+ if (is.fail () && !is.eof ())
+ throw file_io_failure (file);
+
+ string::size_type n (line.size ());
+
+ // Trim the line from leading and trailing whitespaces.
+ //
+ if (n != 0)
+ {
+ const char* f (line.c_str ());
+ const char* l (f + n);
+
+ const char* of (f);
+ while (f < l && (*f == ' ' || *f == '\t' || *f == '\r'))
+ ++f;
+
+ --l;
+
+ const char* ol (l);
+ while (l > f && (*l == ' ' || *l == '\t' || *l == '\r'))
+ --l;
+
+ if (f != of || l != ol)
+ line = f <= l ? string (f, l - f + 1) : string ();
+ }
+
+ // Ignore empty lines, those that start with #.
+ //
+ if (line.empty () || line[0] == '#')
+ continue;
+
+ string::size_type p (string::npos);
+ if (line.compare (0, 1, "-") == 0)
+ {
+ p = line.find (' ');
+
+ string::size_type q (line.find ('='));
+ if (q != string::npos && q < p)
+ p = q;
+ }
+
+ string s1;
+ if (p != string::npos)
+ {
+ s1.assign (line, 0, p);
+
+ // Skip leading whitespaces in the argument.
+ //
+ if (line[p] == '=')
+ ++p;
+ else
+ {
+ n = line.size ();
+ for (++p; p < n; ++p)
+ {
+ char c (line[p]);
+ if (c != ' ' && c != '\t' && c != '\r')
+ break;
+ }
+ }
+ }
+ else if (!skip_)
+ skip_ = (line == "--");
+
+ string s2 (line, p != string::npos ? p : 0);
+
+ // If the string (which is an option value or argument) is
+ // wrapped in quotes, remove them.
+ //
+ n = s2.size ();
+ char cf (s2[0]), cl (s2[n - 1]);
+
+ if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'')
+ {
+ if (n == 1 || cf != cl)
+ throw unmatched_quote (s2);
+
+ s2 = string (s2, 1, n - 2);
+ }
+
+ if (!s1.empty ())
+ {
+ // See if this is another file option.
+ //
+ const option_info* oi;
+ if (!skip_ && (oi = find (s1.c_str ())))
+ {
+ if (s2.empty ())
+ throw missing_value (oi->option);
+
+ if (oi->search_func != 0)
+ {
+ string f (oi->search_func (s2.c_str (), oi->arg));
+ if (!f.empty ())
+ load (f);
+ }
+ else
+ {
+ // If the path of the file being parsed is not simple and the
+ // path of the file that needs to be loaded is relative, then
+ // complete the latter using the former as a base.
+ //
+#ifndef _WIN32
+ string::size_type p (file.find_last_of ('/'));
+ bool c (p != string::npos && s2[0] != '/');
+#else
+ string::size_type p (file.find_last_of ("/\\"));
+ bool c (p != string::npos && s2[1] != ':');
+#endif
+ if (c)
+ s2.insert (0, file, 0, p + 1);
+
+ load (s2);
+ }
+
+ continue;
+ }
+
+ a.value = s1;
+ args_.push_back (a);
+ }
+
+ a.value = s2;
+ args_.push_back (a);
+ }
+ }
+
+ template <typename X>
+ struct parser
+ {
+ static void
+ parse (X& x, bool& xs, scanner& s)
+ {
+ using namespace std;
+
+ const char* o (s.next ());
+ if (s.more ())
+ {
+ string v (s.next ());
+ istringstream is (v);
+ if (!(is >> x && is.peek () == istringstream::traits_type::eof ()))
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<bool>
+ {
+ static void
+ parse (bool& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ const char* v (s.next ());
+
+ if (std::strcmp (v, "1") == 0 ||
+ std::strcmp (v, "true") == 0 ||
+ std::strcmp (v, "TRUE") == 0 ||
+ std::strcmp (v, "True") == 0)
+ x = true;
+ else if (std::strcmp (v, "0") == 0 ||
+ std::strcmp (v, "false") == 0 ||
+ std::strcmp (v, "FALSE") == 0 ||
+ std::strcmp (v, "False") == 0)
+ x = false;
+ else
+ throw invalid_value (o, v);
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <>
+ struct parser<std::string>
+ {
+ static void
+ parse (std::string& x, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X>
+ struct parser<std::pair<X, std::size_t> >
+ {
+ static void
+ parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s)
+ {
+ x.second = s.position ();
+ parser<X>::parse (x.first, xs, s);
+ }
+ };
+
+ template <typename X>
+ struct parser<std::vector<X> >
+ {
+ static void
+ parse (std::vector<X>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.push_back (x);
+ xs = true;
+ }
+ };
+
+ template <typename X, typename C>
+ struct parser<std::set<X, C> >
+ {
+ static void
+ parse (std::set<X, C>& c, bool& xs, scanner& s)
+ {
+ X x;
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
+ c.insert (x);
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::map<K, V, C> >
+ {
+ static void
+ parse (std::map<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m[k] = v;
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
+ template <typename X, typename T, T X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, s);
+ }
+
+ template <typename X, bool X::*M>
+ void
+ thunk (X& x, scanner& s)
+ {
+ s.next ();
+ x.*M = true;
+ }
+
+ template <typename X, typename T, T X::*M, bool X::*S>
+ void
+ thunk (X& x, scanner& s)
+ {
+ parser<T>::parse (x.*M, x.*S, s);
+ }
+}
+
+#include <map>
+
+// help_options
+//
+
+help_options::
+help_options ()
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+}
+
+help_options::
+help_options (int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+}
+
+help_options::
+help_options (int start,
+ int& argc,
+ char** argv,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+}
+
+help_options::
+help_options (int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+ ::cli::argv_scanner s (argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+}
+
+help_options::
+help_options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+ ::cli::argv_scanner s (start, argc, argv, erase);
+ _parse (s, opt, arg);
+ end = s.end ();
+}
+
+help_options::
+help_options (::cli::scanner& s,
+ ::cli::unknown_mode opt,
+ ::cli::unknown_mode arg)
+: build2_metadata_ (),
+ build2_metadata_specified_ (false),
+ help_ (),
+ version_ (),
+ proprietary_license_ ()
+{
+ _parse (s, opt, arg);
+}
+
+::cli::usage_para help_options::
+print_usage (::std::wostream& os, ::cli::usage_para p)
+{
+ CLI_POTENTIALLY_UNUSED (os);
+
+ return p;
+}
+
+typedef
+std::map<std::string, void (*) (help_options&, ::cli::scanner&)>
+_cli_help_options_map;
+
+static _cli_help_options_map _cli_help_options_map_;
+
+struct _cli_help_options_map_init
+{
+ _cli_help_options_map_init ()
+ {
+ _cli_help_options_map_["--build2-metadata"] =
+ &::cli::thunk< help_options, std::uint64_t, &help_options::build2_metadata_,
+ &help_options::build2_metadata_specified_ >;
+ _cli_help_options_map_["--help"] =
+ &::cli::thunk< help_options, &help_options::help_ >;
+ _cli_help_options_map_["--version"] =
+ &::cli::thunk< help_options, &help_options::version_ >;
+ _cli_help_options_map_["--proprietary-license"] =
+ &::cli::thunk< help_options, &help_options::proprietary_license_ >;
+ }
+};
+
+static _cli_help_options_map_init _cli_help_options_map_init_;
+
+bool help_options::
+_parse (const char* o, ::cli::scanner& s)
+{
+ _cli_help_options_map::const_iterator i (_cli_help_options_map_.find (o));
+
+ if (i != _cli_help_options_map_.end ())
+ {
+ (*(i->second)) (*this, s);
+ return true;
+ }
+
+ return false;
+}
+
+bool help_options::
+_parse (::cli::scanner& s,
+ ::cli::unknown_mode opt_mode,
+ ::cli::unknown_mode arg_mode)
+{
+ // Can't skip combined flags (--no-combined-flags).
+ //
+ assert (opt_mode != ::cli::unknown_mode::skip);
+
+ bool r = false;
+ bool opt = true;
+
+ while (s.more ())
+ {
+ const char* o = s.peek ();
+
+ if (std::strcmp (o, "--") == 0)
+ {
+ opt = false;
+ s.skip ();
+ r = true;
+ continue;
+ }
+
+ if (opt)
+ {
+ if (_parse (o, s))
+ {
+ r = true;
+ continue;
+ }
+
+ if (std::strncmp (o, "-", 1) == 0 && o[1] != '\0')
+ {
+ // Handle combined option values.
+ //
+ std::string co;
+ if (const char* v = std::strchr (o, '='))
+ {
+ co.assign (o, 0, v - o);
+ ++v;
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (co.c_str ()),
+ const_cast<char*> (v)
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (_parse (co.c_str (), ns))
+ {
+ // Parsed the option but not its value?
+ //
+ if (ns.end () != 2)
+ throw ::cli::invalid_value (co, v);
+
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = co.c_str ();
+ }
+ }
+
+ // Handle combined flags.
+ //
+ char cf[3];
+ {
+ const char* p = o + 1;
+ for (; *p != '\0'; ++p)
+ {
+ if (!((*p >= 'a' && *p <= 'z') ||
+ (*p >= 'A' && *p <= 'Z') ||
+ (*p >= '0' && *p <= '9')))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ for (p = o + 1; *p != '\0'; ++p)
+ {
+ std::strcpy (cf, "-");
+ cf[1] = *p;
+ cf[2] = '\0';
+
+ int ac (1);
+ char* av[] =
+ {
+ cf
+ };
+
+ ::cli::argv_scanner ns (0, ac, av);
+
+ if (!_parse (cf, ns))
+ break;
+ }
+
+ if (*p == '\0')
+ {
+ // All handled.
+ //
+ s.next ();
+ r = true;
+ continue;
+ }
+ else
+ {
+ // Set the unknown option and fall through.
+ //
+ o = cf;
+ }
+ }
+ }
+
+ switch (opt_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_option (o);
+ }
+ }
+
+ break;
+ }
+ }
+
+ switch (arg_mode)
+ {
+ case ::cli::unknown_mode::skip:
+ {
+ s.skip ();
+ r = true;
+ continue;
+ }
+ case ::cli::unknown_mode::stop:
+ {
+ break;
+ }
+ case ::cli::unknown_mode::fail:
+ {
+ throw ::cli::unknown_argument (o);
+ }
+ }
+
+ break;
+ }
+
+ return r;
+}
+
+// options
+//
+
+options::
+options ()
+: disable_warning_ (),
+ disable_warning_specified_ (false),
+ options_file_ (),
+ options_file_specified_ (false),
+ show_sloc_ (),
+ sloc_limit_ (),
+ sloc_limit_specified_ (false),
+ proprietary_license_ (),
+ custom_literals_ (),
+ custom_literals_specified_ (false),
+ preserve_anonymous_ (),
+ show_anonymous_ (),
+ anonymous_regex_ (),
+ anonymous_regex_specified_ (false),
+ anonymous_regex_trace_ (),
+ morph_anonymous_ (),
+ location_map_ (),
+ location_map_specified_ (false),
+ location_regex_ (),
+ location_regex_specified_ (false),
+ location_regex_trace_ (),
+ file_per_type_ (),
+ type_file_regex_ (),
+ type_file_regex_specified_ (false),
+ type_file_regex_trace_ (),
+ schema_file_regex_ (),
+ schema_file_regex_specified_ (false),
+ schema_file_regex_trace_ (),
+ fat_type_file_ (),
+ file_list_ (),
+ file_list_specified_ (false),
+ file_list_only_ (),
+ file_list_prologue_ (),
+ file_list_prologue_specified_ (false),
+ file_list_epilogue_ (),
+ file_list_epilogue_specified_ (false),
+ file_list_delim_ ("\n"),
+ file_list_delim_specified_ (false),
+ disable_multi_import_ (),
+ disable_full_check_ ()
+{
+}
+
+::cli::usage_para options::
+print_usage (::std::wostream& os, ::cli::usage_para p)
+{
+ CLI_POTENTIALLY_UNUSED (os);
+
+ if (p == ::cli::usage_para::text)
+ os << ::std::endl;
+
+ os << "--disable-warning <warn> Disable printing warning with id <warn>." << ::std::endl;
+
+ os << "--options-file <file> Read additional options from <file>." << ::std::endl;
+
+ os << "--show-sloc Show the number of generated physical source lines" << ::std::endl
+ << " of code (SLOC)." << ::std::endl;
+
+ os << "--sloc-limit <num> Check that the number of generated physical source" << ::std::endl
+ << " lines of code (SLOC) does not exceed <num>." << ::std::endl;
+
+ os << "--proprietary-license Indicate that the generated code is licensed under" << ::std::endl
+ << " a proprietary license instead of the GPL." << ::std::endl;
+
+ os << "--custom-literals <file> Load custom XML string to C++ literal mappings" << ::std::endl
+ << " from <file>." << ::std::endl;
+
+ os << "--preserve-anonymous Preserve anonymous types." << ::std::endl;
+
+ os << "--show-anonymous Show elements and attributes that are of anonymous" << ::std::endl
+ << " types." << ::std::endl;
+
+ os << "--anonymous-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to derive names for anonymous types from the" << ::std::endl
+ << " enclosing attributes/elements." << ::std::endl;
+
+ os << "--anonymous-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --anonymous-regex option." << ::std::endl;
+
+ os << "--location-map <ol>=<nl> Map the original schema location <ol> that is" << ::std::endl
+ << " specified in the XML Schema include or import" << ::std::endl
+ << " elements to new schema location <nl>." << ::std::endl;
+
+ os << "--location-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to map schema locations that are specified in" << ::std::endl
+ << " the XML Schema include or import elements." << ::std::endl;
+
+ os << "--location-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --location-regex option." << ::std::endl;
+
+ os << "--file-per-type Generate a separate set of C++ files for each type" << ::std::endl
+ << " defined in XML Schema." << ::std::endl;
+
+ os << "--type-file-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate type names to file names when" << ::std::endl
+ << " the --file-per-type option is specified." << ::std::endl;
+
+ os << "--type-file-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --type-file-regex option." << ::std::endl;
+
+ os << "--schema-file-regex <regex> Add <regex> to the list of regular expressions" << ::std::endl
+ << " used to translate schema file names when the" << ::std::endl
+ << " --file-per-type option is specified." << ::std::endl;
+
+ os << "--schema-file-regex-trace Trace the process of applying regular expressions" << ::std::endl
+ << " specified with the --schema-file-regex option." << ::std::endl;
+
+ os << "--fat-type-file Generate code corresponding to global elements" << ::std::endl
+ << " into type files instead of schema files when the" << ::std::endl
+ << " --type-file-regex option is specified." << ::std::endl;
+
+ os << "--file-list <file> Write a list of generated C++ files to <file> or" << ::std::endl
+ << " to stdout if <file> is -." << ::std::endl;
+
+ os << "--file-list-only Only write the list of C++ files that would be" << ::std::endl
+ << " generated without actually generating them." << ::std::endl;
+
+ os << "--file-list-prologue <text> Insert <text> at the beginning of the file list." << ::std::endl;
+
+ os << "--file-list-epilogue <text> Insert <text> at the end of the file list." << ::std::endl;
+
+ os << "--file-list-delim <text> Delimit file names written to the file list with" << ::std::endl
+ << " <text> instead of new lines." << ::std::endl;
+
+ p = ::cli::usage_para::option;
+
+ return p;
+}
+
+typedef
+std::map<std::string, void (*) (options&, ::cli::scanner&)>
+_cli_options_map;
+
+static _cli_options_map _cli_options_map_;
+
+struct _cli_options_map_init
+{
+ _cli_options_map_init ()
+ {
+ _cli_options_map_["--disable-warning"] =
+ &::cli::thunk< options, NarrowStrings, &options::disable_warning_,
+ &options::disable_warning_specified_ >;
+ _cli_options_map_["--options-file"] =
+ &::cli::thunk< options, std::string, &options::options_file_,
+ &options::options_file_specified_ >;
+ _cli_options_map_["--show-sloc"] =
+ &::cli::thunk< options, &options::show_sloc_ >;
+ _cli_options_map_["--sloc-limit"] =
+ &::cli::thunk< options, std::size_t, &options::sloc_limit_,
+ &options::sloc_limit_specified_ >;
+ _cli_options_map_["--proprietary-license"] =
+ &::cli::thunk< options, &options::proprietary_license_ >;
+ _cli_options_map_["--custom-literals"] =
+ &::cli::thunk< options, NarrowString, &options::custom_literals_,
+ &options::custom_literals_specified_ >;
+ _cli_options_map_["--preserve-anonymous"] =
+ &::cli::thunk< options, &options::preserve_anonymous_ >;
+ _cli_options_map_["--show-anonymous"] =
+ &::cli::thunk< options, &options::show_anonymous_ >;
+ _cli_options_map_["--anonymous-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::anonymous_regex_,
+ &options::anonymous_regex_specified_ >;
+ _cli_options_map_["--anonymous-regex-trace"] =
+ &::cli::thunk< options, &options::anonymous_regex_trace_ >;
+ _cli_options_map_["--morph-anonymous"] =
+ &::cli::thunk< options, &options::morph_anonymous_ >;
+ _cli_options_map_["--location-map"] =
+ &::cli::thunk< options, NarrowStrings, &options::location_map_,
+ &options::location_map_specified_ >;
+ _cli_options_map_["--location-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::location_regex_,
+ &options::location_regex_specified_ >;
+ _cli_options_map_["--location-regex-trace"] =
+ &::cli::thunk< options, &options::location_regex_trace_ >;
+ _cli_options_map_["--file-per-type"] =
+ &::cli::thunk< options, &options::file_per_type_ >;
+ _cli_options_map_["--type-file-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::type_file_regex_,
+ &options::type_file_regex_specified_ >;
+ _cli_options_map_["--type-file-regex-trace"] =
+ &::cli::thunk< options, &options::type_file_regex_trace_ >;
+ _cli_options_map_["--schema-file-regex"] =
+ &::cli::thunk< options, NarrowStrings, &options::schema_file_regex_,
+ &options::schema_file_regex_specified_ >;
+ _cli_options_map_["--schema-file-regex-trace"] =
+ &::cli::thunk< options, &options::schema_file_regex_trace_ >;
+ _cli_options_map_["--fat-type-file"] =
+ &::cli::thunk< options, &options::fat_type_file_ >;
+ _cli_options_map_["--file-list"] =
+ &::cli::thunk< options, NarrowString, &options::file_list_,
+ &options::file_list_specified_ >;
+ _cli_options_map_["--file-list-only"] =
+ &::cli::thunk< options, &options::file_list_only_ >;
+ _cli_options_map_["--file-list-prologue"] =
+ &::cli::thunk< options, NarrowString, &options::file_list_prologue_,
+ &options::file_list_prologue_specified_ >;
+ _cli_options_map_["--file-list-epilogue"] =
+ &::cli::thunk< options, NarrowString, &options::file_list_epilogue_,
+ &options::file_list_epilogue_specified_ >;
+ _cli_options_map_["--file-list-delim"] =
+ &::cli::thunk< options, NarrowString, &options::file_list_delim_,
+ &options::file_list_delim_specified_ >;
+ _cli_options_map_["--disable-multi-import"] =
+ &::cli::thunk< options, &options::disable_multi_import_ >;
+ _cli_options_map_["--disable-full-check"] =
+ &::cli::thunk< options, &options::disable_full_check_ >;
+ }
+};
+
+static _cli_options_map_init _cli_options_map_init_;
+
+bool options::
+_parse (const char* o, ::cli::scanner& s)
+{
+ _cli_options_map::const_iterator i (_cli_options_map_.find (o));
+
+ if (i != _cli_options_map_.end ())
+ {
+ (*(i->second)) (*this, s);
+ return true;
+ }
+
+ return false;
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
diff --git a/xsd/xsd/pregenerated/xsd/options.hxx b/xsd/xsd/pregenerated/xsd/options.hxx
new file mode 100644
index 0000000..0f4383c
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/options.hxx
@@ -0,0 +1,702 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef XSD_OPTIONS_HXX
+#define XSD_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <list>
+#include <deque>
+#include <iosfwd>
+#include <string>
+#include <cstddef>
+#include <exception>
+
+#ifndef CLI_POTENTIALLY_UNUSED
+# if defined(_MSC_VER) || defined(__xlC__)
+# define CLI_POTENTIALLY_UNUSED(x) (void*)&x
+# else
+# define CLI_POTENTIALLY_UNUSED(x) (void)x
+# endif
+#endif
+
+namespace cli
+{
+ class usage_para
+ {
+ public:
+ enum value
+ {
+ none,
+ text,
+ option
+ };
+
+ usage_para (value);
+
+ operator value () const
+ {
+ return v_;
+ }
+
+ private:
+ value v_;
+ };
+
+ class unknown_mode
+ {
+ public:
+ enum value
+ {
+ skip,
+ stop,
+ fail
+ };
+
+ unknown_mode (value);
+
+ operator value () const
+ {
+ return v_;
+ }
+
+ private:
+ value v_;
+ };
+
+ // Exceptions.
+ //
+
+ class exception: public std::exception
+ {
+ public:
+ virtual void
+ print (::std::wostream&) const = 0;
+ };
+
+ ::std::wostream&
+ operator<< (::std::wostream&, const exception&);
+
+ class unknown_option: public exception
+ {
+ public:
+ virtual
+ ~unknown_option () noexcept;
+
+ unknown_option (const std::string& option);
+
+ const std::string&
+ option () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string option_;
+ };
+
+ class unknown_argument: public exception
+ {
+ public:
+ virtual
+ ~unknown_argument () noexcept;
+
+ unknown_argument (const std::string& argument);
+
+ const std::string&
+ argument () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string argument_;
+ };
+
+ class missing_value: public exception
+ {
+ public:
+ virtual
+ ~missing_value () noexcept;
+
+ missing_value (const std::string& option);
+
+ const std::string&
+ option () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string option_;
+ };
+
+ class invalid_value: public exception
+ {
+ public:
+ virtual
+ ~invalid_value () noexcept;
+
+ invalid_value (const std::string& option,
+ const std::string& value,
+ const std::string& message = std::string ());
+
+ const std::string&
+ option () const;
+
+ const std::string&
+ value () const;
+
+ const std::string&
+ message () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string option_;
+ std::string value_;
+ std::string message_;
+ };
+
+ class eos_reached: public exception
+ {
+ public:
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+ };
+
+ class file_io_failure: public exception
+ {
+ public:
+ virtual
+ ~file_io_failure () noexcept;
+
+ file_io_failure (const std::string& file);
+
+ const std::string&
+ file () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string file_;
+ };
+
+ class unmatched_quote: public exception
+ {
+ public:
+ virtual
+ ~unmatched_quote () noexcept;
+
+ unmatched_quote (const std::string& argument);
+
+ const std::string&
+ argument () const;
+
+ virtual void
+ print (::std::wostream&) const;
+
+ virtual const char*
+ what () const noexcept;
+
+ private:
+ std::string argument_;
+ };
+
+ // Command line argument scanner interface.
+ //
+ // The values returned by next() are guaranteed to be valid
+ // for the two previous arguments up until a call to a third
+ // peek() or next().
+ //
+ // The position() function returns a monotonically-increasing
+ // number which, if stored, can later be used to determine the
+ // relative position of the argument returned by the following
+ // call to next(). Note that if multiple scanners are used to
+ // extract arguments from multiple sources, then the end
+ // position of the previous scanner should be used as the
+ // start position of the next.
+ //
+ class scanner
+ {
+ public:
+ virtual
+ ~scanner ();
+
+ virtual bool
+ more () = 0;
+
+ virtual const char*
+ peek () = 0;
+
+ virtual const char*
+ next () = 0;
+
+ virtual void
+ skip () = 0;
+
+ virtual std::size_t
+ position () = 0;
+ };
+
+ class argv_scanner: public scanner
+ {
+ public:
+ argv_scanner (int& argc,
+ char** argv,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ argv_scanner (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ int
+ end () const;
+
+ virtual bool
+ more ();
+
+ virtual const char*
+ peek ();
+
+ virtual const char*
+ next ();
+
+ virtual void
+ skip ();
+
+ virtual std::size_t
+ position ();
+
+ protected:
+ std::size_t start_position_;
+ int i_;
+ int& argc_;
+ char** argv_;
+ bool erase_;
+ };
+
+ class argv_file_scanner: public argv_scanner
+ {
+ public:
+ argv_file_scanner (int& argc,
+ char** argv,
+ const std::string& option,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ argv_file_scanner (int start,
+ int& argc,
+ char** argv,
+ const std::string& option,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ argv_file_scanner (const std::string& file,
+ const std::string& option,
+ std::size_t start_position = 0);
+
+ struct option_info
+ {
+ // If search_func is not NULL, it is called, with the arg
+ // value as the second argument, to locate the options file.
+ // If it returns an empty string, then the file is ignored.
+ //
+ const char* option;
+ std::string (*search_func) (const char*, void* arg);
+ void* arg;
+ };
+
+ argv_file_scanner (int& argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ argv_file_scanner (int start,
+ int& argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
+ bool erase = false,
+ std::size_t start_position = 0);
+
+ argv_file_scanner (const std::string& file,
+ const option_info* options = 0,
+ std::size_t options_count = 0,
+ std::size_t start_position = 0);
+
+ virtual bool
+ more ();
+
+ virtual const char*
+ peek ();
+
+ virtual const char*
+ next ();
+
+ virtual void
+ skip ();
+
+ virtual std::size_t
+ position ();
+
+ // Return the file path if the peeked at argument came from a file and
+ // the empty string otherwise. The reference is guaranteed to be valid
+ // till the end of the scanner lifetime.
+ //
+ const std::string&
+ peek_file ();
+
+ // Return the 1-based line number if the peeked at argument came from
+ // a file and zero otherwise.
+ //
+ std::size_t
+ peek_line ();
+
+ private:
+ const option_info*
+ find (const char*) const;
+
+ void
+ load (const std::string& file);
+
+ typedef argv_scanner base;
+
+ const std::string option_;
+ option_info option_info_;
+ const option_info* options_;
+ std::size_t options_count_;
+
+ struct arg
+ {
+ std::string value;
+ const std::string* file;
+ std::size_t line;
+ };
+
+ std::deque<arg> args_;
+ std::list<std::string> files_;
+
+ // Circular buffer of two arguments.
+ //
+ std::string hold_[2];
+ std::size_t i_;
+
+ bool skip_;
+
+ static int zero_argc_;
+ static std::string empty_string_;
+ };
+
+ template <typename X>
+ struct parser;
+}
+
+#include <cstddef>
+
+#include <cstdint>
+
+#include <xsd/types.hxx>
+
+class help_options
+{
+ public:
+ help_options ();
+
+ help_options (int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ help_options (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ help_options (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ help_options (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ help_options (::cli::scanner&,
+ ::cli::unknown_mode option = ::cli::unknown_mode::fail,
+ ::cli::unknown_mode argument = ::cli::unknown_mode::stop);
+
+ // Option accessors.
+ //
+ const std::uint64_t&
+ build2_metadata () const;
+
+ bool
+ build2_metadata_specified () const;
+
+ const bool&
+ help () const;
+
+ const bool&
+ version () const;
+
+ const bool&
+ proprietary_license () const;
+
+ // Print usage information.
+ //
+ static ::cli::usage_para
+ print_usage (::std::wostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::cli::scanner&);
+
+ private:
+ bool
+ _parse (::cli::scanner&,
+ ::cli::unknown_mode option,
+ ::cli::unknown_mode argument);
+
+ public:
+ std::uint64_t build2_metadata_;
+ bool build2_metadata_specified_;
+ bool help_;
+ bool version_;
+ bool proprietary_license_;
+};
+
+class options
+{
+ public:
+ // Option accessors.
+ //
+ const NarrowStrings&
+ disable_warning () const;
+
+ bool
+ disable_warning_specified () const;
+
+ const std::string&
+ options_file () const;
+
+ bool
+ options_file_specified () const;
+
+ const bool&
+ show_sloc () const;
+
+ const std::size_t&
+ sloc_limit () const;
+
+ bool
+ sloc_limit_specified () const;
+
+ const bool&
+ proprietary_license () const;
+
+ const NarrowString&
+ custom_literals () const;
+
+ bool
+ custom_literals_specified () const;
+
+ const bool&
+ preserve_anonymous () const;
+
+ const bool&
+ show_anonymous () const;
+
+ const NarrowStrings&
+ anonymous_regex () const;
+
+ bool
+ anonymous_regex_specified () const;
+
+ const bool&
+ anonymous_regex_trace () const;
+
+ const bool&
+ morph_anonymous () const;
+
+ const NarrowStrings&
+ location_map () const;
+
+ bool
+ location_map_specified () const;
+
+ const NarrowStrings&
+ location_regex () const;
+
+ bool
+ location_regex_specified () const;
+
+ const bool&
+ location_regex_trace () const;
+
+ const bool&
+ file_per_type () const;
+
+ const NarrowStrings&
+ type_file_regex () const;
+
+ bool
+ type_file_regex_specified () const;
+
+ const bool&
+ type_file_regex_trace () const;
+
+ const NarrowStrings&
+ schema_file_regex () const;
+
+ bool
+ schema_file_regex_specified () const;
+
+ const bool&
+ schema_file_regex_trace () const;
+
+ const bool&
+ fat_type_file () const;
+
+ const NarrowString&
+ file_list () const;
+
+ bool
+ file_list_specified () const;
+
+ const bool&
+ file_list_only () const;
+
+ const NarrowString&
+ file_list_prologue () const;
+
+ bool
+ file_list_prologue_specified () const;
+
+ const NarrowString&
+ file_list_epilogue () const;
+
+ bool
+ file_list_epilogue_specified () const;
+
+ const NarrowString&
+ file_list_delim () const;
+
+ bool
+ file_list_delim_specified () const;
+
+ const bool&
+ disable_multi_import () const;
+
+ const bool&
+ disable_full_check () const;
+
+ // Print usage information.
+ //
+ static ::cli::usage_para
+ print_usage (::std::wostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ options ();
+
+ bool
+ _parse (const char*, ::cli::scanner&);
+
+ public:
+ NarrowStrings disable_warning_;
+ bool disable_warning_specified_;
+ std::string options_file_;
+ bool options_file_specified_;
+ bool show_sloc_;
+ std::size_t sloc_limit_;
+ bool sloc_limit_specified_;
+ bool proprietary_license_;
+ NarrowString custom_literals_;
+ bool custom_literals_specified_;
+ bool preserve_anonymous_;
+ bool show_anonymous_;
+ NarrowStrings anonymous_regex_;
+ bool anonymous_regex_specified_;
+ bool anonymous_regex_trace_;
+ bool morph_anonymous_;
+ NarrowStrings location_map_;
+ bool location_map_specified_;
+ NarrowStrings location_regex_;
+ bool location_regex_specified_;
+ bool location_regex_trace_;
+ bool file_per_type_;
+ NarrowStrings type_file_regex_;
+ bool type_file_regex_specified_;
+ bool type_file_regex_trace_;
+ NarrowStrings schema_file_regex_;
+ bool schema_file_regex_specified_;
+ bool schema_file_regex_trace_;
+ bool fat_type_file_;
+ NarrowString file_list_;
+ bool file_list_specified_;
+ bool file_list_only_;
+ NarrowString file_list_prologue_;
+ bool file_list_prologue_specified_;
+ NarrowString file_list_epilogue_;
+ bool file_list_epilogue_specified_;
+ NarrowString file_list_delim_;
+ bool file_list_delim_specified_;
+ bool disable_multi_import_;
+ bool disable_full_check_;
+};
+
+#include <xsd/options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // XSD_OPTIONS_HXX
diff --git a/xsd/xsd/pregenerated/xsd/options.ixx b/xsd/xsd/pregenerated/xsd/options.ixx
new file mode 100644
index 0000000..d87e59c
--- /dev/null
+++ b/xsd/xsd/pregenerated/xsd/options.ixx
@@ -0,0 +1,555 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <cassert>
+
+namespace cli
+{
+ // usage_para
+ //
+ inline usage_para::
+ usage_para (value v)
+ : v_ (v)
+ {
+ }
+
+ // unknown_mode
+ //
+ inline unknown_mode::
+ unknown_mode (value v)
+ : v_ (v)
+ {
+ }
+
+ // exception
+ //
+ inline ::std::wostream&
+ operator<< (::std::wostream& os, const exception& e)
+ {
+ e.print (os);
+ return os;
+ }
+
+ // unknown_option
+ //
+ inline unknown_option::
+ unknown_option (const std::string& option)
+ : option_ (option)
+ {
+ }
+
+ inline const std::string& unknown_option::
+ option () const
+ {
+ return option_;
+ }
+
+ // unknown_argument
+ //
+ inline unknown_argument::
+ unknown_argument (const std::string& argument)
+ : argument_ (argument)
+ {
+ }
+
+ inline const std::string& unknown_argument::
+ argument () const
+ {
+ return argument_;
+ }
+
+ // missing_value
+ //
+ inline missing_value::
+ missing_value (const std::string& option)
+ : option_ (option)
+ {
+ }
+
+ inline const std::string& missing_value::
+ option () const
+ {
+ return option_;
+ }
+
+ // invalid_value
+ //
+ inline invalid_value::
+ invalid_value (const std::string& option,
+ const std::string& value,
+ const std::string& message)
+ : option_ (option),
+ value_ (value),
+ message_ (message)
+ {
+ }
+
+ inline const std::string& invalid_value::
+ option () const
+ {
+ return option_;
+ }
+
+ inline const std::string& invalid_value::
+ value () const
+ {
+ return value_;
+ }
+
+ inline const std::string& invalid_value::
+ message () const
+ {
+ return message_;
+ }
+
+ // file_io_failure
+ //
+ inline file_io_failure::
+ file_io_failure (const std::string& file)
+ : file_ (file)
+ {
+ }
+
+ inline const std::string& file_io_failure::
+ file () const
+ {
+ return file_;
+ }
+
+ // unmatched_quote
+ //
+ inline unmatched_quote::
+ unmatched_quote (const std::string& argument)
+ : argument_ (argument)
+ {
+ }
+
+ inline const std::string& unmatched_quote::
+ argument () const
+ {
+ return argument_;
+ }
+
+ // argv_scanner
+ //
+ inline argv_scanner::
+ argv_scanner (int& argc,
+ char** argv,
+ bool erase,
+ std::size_t sp)
+ : start_position_ (sp + 1),
+ i_ (1),
+ argc_ (argc),
+ argv_ (argv),
+ erase_ (erase)
+ {
+ }
+
+ inline argv_scanner::
+ argv_scanner (int start,
+ int& argc,
+ char** argv,
+ bool erase,
+ std::size_t sp)
+ : start_position_ (sp + static_cast<std::size_t> (start)),
+ i_ (start),
+ argc_ (argc),
+ argv_ (argv),
+ erase_ (erase)
+ {
+ }
+
+ inline int argv_scanner::
+ end () const
+ {
+ return i_;
+ }
+
+ // argv_file_scanner
+ //
+ inline argv_file_scanner::
+ argv_file_scanner (int& argc,
+ char** argv,
+ const std::string& option,
+ bool erase,
+ std::size_t sp)
+ : argv_scanner (argc, argv, erase, sp),
+ option_ (option),
+ options_ (&option_info_),
+ options_count_ (1),
+ i_ (1),
+ skip_ (false)
+ {
+ option_info_.option = option_.c_str ();
+ option_info_.search_func = 0;
+ }
+
+ inline argv_file_scanner::
+ argv_file_scanner (int start,
+ int& argc,
+ char** argv,
+ const std::string& option,
+ bool erase,
+ std::size_t sp)
+ : argv_scanner (start, argc, argv, erase, sp),
+ option_ (option),
+ options_ (&option_info_),
+ options_count_ (1),
+ i_ (1),
+ skip_ (false)
+ {
+ option_info_.option = option_.c_str ();
+ option_info_.search_func = 0;
+ }
+
+ inline argv_file_scanner::
+ argv_file_scanner (const std::string& file,
+ const std::string& option,
+ std::size_t sp)
+ : argv_scanner (0, zero_argc_, 0, sp),
+ option_ (option),
+ options_ (&option_info_),
+ options_count_ (1),
+ i_ (1),
+ skip_ (false)
+ {
+ option_info_.option = option_.c_str ();
+ option_info_.search_func = 0;
+
+ load (file);
+ }
+
+ inline argv_file_scanner::
+ argv_file_scanner (int& argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
+ bool erase,
+ std::size_t sp)
+ : argv_scanner (argc, argv, erase, sp),
+ options_ (options),
+ options_count_ (options_count),
+ i_ (1),
+ skip_ (false)
+ {
+ }
+
+ inline argv_file_scanner::
+ argv_file_scanner (int start,
+ int& argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
+ bool erase,
+ std::size_t sp)
+ : argv_scanner (start, argc, argv, erase, sp),
+ options_ (options),
+ options_count_ (options_count),
+ i_ (1),
+ skip_ (false)
+ {
+ }
+
+ inline argv_file_scanner::
+ argv_file_scanner (const std::string& file,
+ const option_info* options,
+ std::size_t options_count,
+ std::size_t sp)
+ : argv_scanner (0, zero_argc_, 0, sp),
+ options_ (options),
+ options_count_ (options_count),
+ i_ (1),
+ skip_ (false)
+ {
+ load (file);
+ }
+}
+
+// help_options
+//
+
+inline const std::uint64_t& help_options::
+build2_metadata () const
+{
+ return this->build2_metadata_;
+}
+
+inline bool help_options::
+build2_metadata_specified () const
+{
+ return this->build2_metadata_specified_;
+}
+
+inline const bool& help_options::
+help () const
+{
+ return this->help_;
+}
+
+inline const bool& help_options::
+version () const
+{
+ return this->version_;
+}
+
+inline const bool& help_options::
+proprietary_license () const
+{
+ return this->proprietary_license_;
+}
+
+// options
+//
+
+inline const NarrowStrings& options::
+disable_warning () const
+{
+ return this->disable_warning_;
+}
+
+inline bool options::
+disable_warning_specified () const
+{
+ return this->disable_warning_specified_;
+}
+
+inline const std::string& options::
+options_file () const
+{
+ return this->options_file_;
+}
+
+inline bool options::
+options_file_specified () const
+{
+ return this->options_file_specified_;
+}
+
+inline const bool& options::
+show_sloc () const
+{
+ return this->show_sloc_;
+}
+
+inline const std::size_t& options::
+sloc_limit () const
+{
+ return this->sloc_limit_;
+}
+
+inline bool options::
+sloc_limit_specified () const
+{
+ return this->sloc_limit_specified_;
+}
+
+inline const bool& options::
+proprietary_license () const
+{
+ return this->proprietary_license_;
+}
+
+inline const NarrowString& options::
+custom_literals () const
+{
+ return this->custom_literals_;
+}
+
+inline bool options::
+custom_literals_specified () const
+{
+ return this->custom_literals_specified_;
+}
+
+inline const bool& options::
+preserve_anonymous () const
+{
+ return this->preserve_anonymous_;
+}
+
+inline const bool& options::
+show_anonymous () const
+{
+ return this->show_anonymous_;
+}
+
+inline const NarrowStrings& options::
+anonymous_regex () const
+{
+ return this->anonymous_regex_;
+}
+
+inline bool options::
+anonymous_regex_specified () const
+{
+ return this->anonymous_regex_specified_;
+}
+
+inline const bool& options::
+anonymous_regex_trace () const
+{
+ return this->anonymous_regex_trace_;
+}
+
+inline const bool& options::
+morph_anonymous () const
+{
+ return this->morph_anonymous_;
+}
+
+inline const NarrowStrings& options::
+location_map () const
+{
+ return this->location_map_;
+}
+
+inline bool options::
+location_map_specified () const
+{
+ return this->location_map_specified_;
+}
+
+inline const NarrowStrings& options::
+location_regex () const
+{
+ return this->location_regex_;
+}
+
+inline bool options::
+location_regex_specified () const
+{
+ return this->location_regex_specified_;
+}
+
+inline const bool& options::
+location_regex_trace () const
+{
+ return this->location_regex_trace_;
+}
+
+inline const bool& options::
+file_per_type () const
+{
+ return this->file_per_type_;
+}
+
+inline const NarrowStrings& options::
+type_file_regex () const
+{
+ return this->type_file_regex_;
+}
+
+inline bool options::
+type_file_regex_specified () const
+{
+ return this->type_file_regex_specified_;
+}
+
+inline const bool& options::
+type_file_regex_trace () const
+{
+ return this->type_file_regex_trace_;
+}
+
+inline const NarrowStrings& options::
+schema_file_regex () const
+{
+ return this->schema_file_regex_;
+}
+
+inline bool options::
+schema_file_regex_specified () const
+{
+ return this->schema_file_regex_specified_;
+}
+
+inline const bool& options::
+schema_file_regex_trace () const
+{
+ return this->schema_file_regex_trace_;
+}
+
+inline const bool& options::
+fat_type_file () const
+{
+ return this->fat_type_file_;
+}
+
+inline const NarrowString& options::
+file_list () const
+{
+ return this->file_list_;
+}
+
+inline bool options::
+file_list_specified () const
+{
+ return this->file_list_specified_;
+}
+
+inline const bool& options::
+file_list_only () const
+{
+ return this->file_list_only_;
+}
+
+inline const NarrowString& options::
+file_list_prologue () const
+{
+ return this->file_list_prologue_;
+}
+
+inline bool options::
+file_list_prologue_specified () const
+{
+ return this->file_list_prologue_specified_;
+}
+
+inline const NarrowString& options::
+file_list_epilogue () const
+{
+ return this->file_list_epilogue_;
+}
+
+inline bool options::
+file_list_epilogue_specified () const
+{
+ return this->file_list_epilogue_specified_;
+}
+
+inline const NarrowString& options::
+file_list_delim () const
+{
+ return this->file_list_delim_;
+}
+
+inline bool options::
+file_list_delim_specified () const
+{
+ return this->file_list_delim_specified_;
+}
+
+inline const bool& options::
+disable_multi_import () const
+{
+ return this->disable_multi_import_;
+}
+
+inline const bool& options::
+disable_full_check () const
+{
+ return this->disable_full_check_;
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
diff --git a/xsd/xsd/xsd.cxx b/xsd/xsd/xsd.cxx
index f1d22fc..d2b0faf 100644
--- a/xsd/xsd/xsd.cxx
+++ b/xsd/xsd/xsd.cxx
@@ -196,7 +196,7 @@ main (int argc, char* argv[])
{
o << "The compiler was invoked in the Proprietary License mode. You "
<< "should have\nreceived a proprietary license from Code Synthesis "
- << "Tools CC that entitles\nyou to use it in this mode." << endl;
+ << "that entitles you to\nuse it in this mode." << endl;
}
else
{
@@ -298,6 +298,14 @@ main (int argc, char* argv[])
? static_cast<CXX::options&> (*tree_ops)
: static_cast<CXX::options&> (*parser_ops));
+ // Validate options.
+ //
+ if (common_ops.file_list_only () && !common_ops.file_list_specified ())
+ {
+ e << "error: --file-list-only specified without --file-list" << endl;
+ return 1;
+ }
+
// Disabled warnings.
//
WarningSet disabled_w;
@@ -770,38 +778,43 @@ main (int argc, char* argv[])
try
{
OutputFileStream ofs;
- SemanticGraph::Path path (fl);
+ if (fl != "-")
+ {
+ SemanticGraph::Path path (fl);
- ofs.open (path.string ().c_str (), ios_base::out);
+ ofs.open (path.string ().c_str (), ios_base::out);
- if (!ofs.is_open ())
- {
- wcerr << path << ": error: unable to open in write mode" << endl;
- return 1;
+ if (!ofs.is_open ())
+ {
+ wcerr << path << ": error: unable to open in write mode" << endl;
+ return 1;
+ }
}
+ std::ostream& os (ofs.is_open () ? ofs : cout);
+
NarrowString d (common_ops.file_list_delim ());
expand_nl (d);
if (NarrowString p = common_ops.file_list_prologue ())
{
expand_nl (p);
- ofs << p;
+ os << p;
}
for (FileList::iterator i (file_list.begin ()), e (file_list.end ());
i != e;)
{
- ofs << *i;
+ os << *i;
if (++i != e)
- ofs << d;
+ os << d;
}
if (NarrowString e = common_ops.file_list_epilogue ())
{
expand_nl (e);
- ofs << e;
+ os << e;
}
}
catch (SemanticGraph::InvalidPath const&)