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/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/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/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/buildfile2
-rw-r--r--xsd-examples/cxx/parser/hello/README25
-rw-r--r--xsd-examples/cxx/parser/hello/buildfile2
-rw-r--r--xsd-examples/cxx/parser/library/README27
-rw-r--r--xsd-examples/cxx/parser/library/buildfile2
-rw-r--r--xsd-examples/cxx/parser/mixed/README26
-rw-r--r--xsd-examples/cxx/parser/mixed/buildfile2
-rw-r--r--xsd-examples/cxx/parser/mixin/README27
-rw-r--r--xsd-examples/cxx/parser/mixin/buildfile2
-rw-r--r--xsd-examples/cxx/parser/multiroot/README31
-rw-r--r--xsd-examples/cxx/parser/multiroot/buildfile2
-rw-r--r--xsd-examples/cxx/parser/performance/README44
-rw-r--r--xsd-examples/cxx/parser/performance/buildfile2
-rw-r--r--xsd-examples/cxx/parser/polymorphism/README26
-rw-r--r--xsd-examples/cxx/parser/polymorphism/buildfile2
-rw-r--r--xsd-examples/cxx/parser/polyroot/README30
-rw-r--r--xsd-examples/cxx/parser/polyroot/buildfile2
-rw-r--r--xsd-examples/cxx/parser/wildcard/README24
-rw-r--r--xsd-examples/cxx/parser/wildcard/buildfile2
-rw-r--r--xsd-examples/cxx/tree/binary/boost/README37
-rw-r--r--xsd-examples/cxx/tree/binary/boost/buildfile2
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/README29
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/buildfile2
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/README25
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/buildfile2
-rw-r--r--xsd-examples/cxx/tree/caching/README21
-rw-r--r--xsd-examples/cxx/tree/caching/buildfile2
-rw-r--r--xsd-examples/cxx/tree/compression/README38
-rw-r--r--xsd-examples/cxx/tree/compression/buildfile2
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/README37
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/comments/README42
-rw-r--r--xsd-examples/cxx/tree/custom/comments/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/README23
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/buildfile10
-rw-r--r--xsd-examples/cxx/tree/custom/double/README44
-rw-r--r--xsd-examples/cxx/tree/custom/double/buildfile4
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/README30
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/buildfile2
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/README34
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/buildfile2
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/README24
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/buildfile2
-rw-r--r--xsd-examples/cxx/tree/embedded/README44
-rw-r--r--xsd-examples/cxx/tree/embedded/buildfile2
-rw-r--r--xsd-examples/cxx/tree/hello/README18
-rw-r--r--xsd-examples/cxx/tree/hello/buildfile2
-rw-r--r--xsd-examples/cxx/tree/library/README18
-rw-r--r--xsd-examples/cxx/tree/library/buildfile2
-rw-r--r--xsd-examples/cxx/tree/messaging/README41
-rw-r--r--xsd-examples/cxx/tree/messaging/buildfile2
-rw-r--r--xsd-examples/cxx/tree/mixed/README21
-rw-r--r--xsd-examples/cxx/tree/mixed/buildfile2
-rw-r--r--xsd-examples/cxx/tree/multiroot/README28
-rw-r--r--xsd-examples/cxx/tree/multiroot/buildfile2
-rw-r--r--xsd-examples/cxx/tree/order/element/README34
-rw-r--r--xsd-examples/cxx/tree/order/element/buildfile2
-rw-r--r--xsd-examples/cxx/tree/order/mixed/README25
-rw-r--r--xsd-examples/cxx/tree/order/mixed/buildfile2
-rw-r--r--xsd-examples/cxx/tree/performance/README41
-rw-r--r--xsd-examples/cxx/tree/performance/buildfile2
-rw-r--r--xsd-examples/cxx/tree/polymorphism/README22
-rw-r--r--xsd-examples/cxx/tree/polymorphism/buildfile2
-rw-r--r--xsd-examples/cxx/tree/secure/README22
-rw-r--r--xsd-examples/cxx/tree/secure/buildfile2
-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/buildfile2
-rw-r--r--xsd-examples/cxx/tree/wildcard/README23
-rw-r--r--xsd-examples/cxx/tree/wildcard/buildfile2
-rw-r--r--xsd-examples/cxx/tree/xpath/README22
-rw-r--r--xsd-examples/cxx/tree/xpath/buildfile2
-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/buildfile2
-rw-r--r--xsd-tests/clash/buildfile2
-rw-r--r--xsd-tests/code/name-conflict/buildfile2
-rw-r--r--xsd-tests/code/name-escaping/buildfile2
-rw-r--r--xsd-tests/cxx/parser/built-in/buildfile2
-rw-r--r--xsd-tests/cxx/parser/enumeration/buildfile2
-rw-r--r--xsd-tests/cxx/parser/generated-impl/buildfile2
-rw-r--r--xsd-tests/cxx/parser/list/buildfile2
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/buildfile2
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/buildfile2
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/buildfile2
-rw-r--r--xsd-tests/cxx/parser/recursive/buildfile2
-rw-r--r--xsd-tests/cxx/parser/test-template/buildfile2
-rw-r--r--xsd-tests/cxx/parser/union/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/all/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/any/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/choice/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/buildfile2
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/buildfile2
-rw-r--r--xsd-tests/cxx/tree/any-type/buildfile2
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/buildfile2
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/buildfile2
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/buildfile2
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/buildfile2
-rw-r--r--xsd-tests/cxx/tree/built-in/buildfile2
-rw-r--r--xsd-tests/cxx/tree/chameleon/buildfile2
-rw-r--r--xsd-tests/cxx/tree/comparison/buildfile2
-rw-r--r--xsd-tests/cxx/tree/compilation/buildfile2
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/buildfile2
-rw-r--r--xsd-tests/cxx/tree/containment/buildfile2
-rw-r--r--xsd-tests/cxx/tree/default/general/buildfile2
-rw-r--r--xsd-tests/cxx/tree/default/omit/buildfile2
-rw-r--r--xsd-tests/cxx/tree/detach/buildfile2
-rw-r--r--xsd-tests/cxx/tree/dom-association/buildfile2
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile2
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/buildfile2
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/buildfile2
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/buildfile2
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/buildfile2
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/buildfile2
-rw-r--r--xsd-tests/cxx/tree/float/buildfile2
-rw-r--r--xsd-tests/cxx/tree/list/ctor/buildfile2
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/buildfile2
-rw-r--r--xsd-tests/cxx/tree/naming/camel/buildfile2
-rw-r--r--xsd-tests/cxx/tree/naming/java/buildfile2
-rw-r--r--xsd-tests/cxx/tree/naming/knr/buildfile2
-rw-r--r--xsd-tests/cxx/tree/order/buildfile2
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/buildfile2
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/buildfile2
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/buildfile2
-rw-r--r--xsd-tests/cxx/tree/prefix/buildfile2
-rw-r--r--xsd-tests/cxx/tree/test-template/buildfile2
-rw-r--r--xsd-tests/cxx/tree/types-only/buildfile2
-rw-r--r--xsd-tests/cxx/tree/union/ctor/buildfile2
-rw-r--r--xsd-tests/cxx/tree/wildcard/buildfile2
-rw-r--r--xsd-tests/failed/buildfile2
-rw-r--r--xsd-tests/manifest16
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/buildfile2
-rw-r--r--xsd-tests/morphing/anonymous/basic/buildfile2
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile2
-rw-r--r--xsd-tests/morphing/anonymous/group/buildfile2
-rw-r--r--xsd-tests/morphing/anonymous/unstable/buildfile4
-rw-r--r--xsd-tests/processing/inheritance/buildfile2
-rw-r--r--xsd-tests/schema/anonymous/buildfile2
-rw-r--r--xsd-tests/schema/any-attribute/buildfile2
-rw-r--r--xsd-tests/schema/any-type/buildfile2
-rw-r--r--xsd-tests/schema/any/buildfile4
-rw-r--r--xsd-tests/schema/attribute-group/buildfile2
-rw-r--r--xsd-tests/schema/attribute/buildfile2
-rw-r--r--xsd-tests/schema/cardinality/buildfile2
-rw-r--r--xsd-tests/schema/chameleon/buildfile2
-rw-r--r--xsd-tests/schema/enumeration/buildfile2
-rw-r--r--xsd-tests/schema/forward/buildfile2
-rw-r--r--xsd-tests/schema/group/buildfile2
-rw-r--r--xsd-tests/schema/import/buildfile2
-rw-r--r--xsd-tests/schema/include/buildfile2
-rw-r--r--xsd-tests/schema/inheritance/buildfile4
-rw-r--r--xsd-tests/schema/list/buildfile4
-rw-r--r--xsd-tests/schema/no-namespace/buildfile2
-rw-r--r--xsd-tests/schema/recursive/buildfile2
-rw-r--r--xsd-tests/schema/ref-type/invalid/buildfile2
-rw-r--r--xsd-tests/schema/ref-type/valid/buildfile2
-rw-r--r--xsd-tests/schema/restriction/buildfile2
-rw-r--r--xsd-tests/schema/union/buildfile2
-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/buildfile10
-rw-r--r--xsd/doc/buildfile40
-rw-r--r--xsd/doc/cxx/parser/guide/index.xhtml.in19
-rw-r--r--xsd/doc/cxx/tree/guide/index.xhtml.in14
-rw-r--r--xsd/doc/cxx/tree/manual/index.xhtml.in6
-rw-r--r--xsd/doc/pregenerated/xsd.148
-rw-r--r--xsd/doc/pregenerated/xsd.xhtml64
-rw-r--r--xsd/doc/xsd-epilogue.117
-rw-r--r--xsd/doc/xsd-epilogue.xhtml14
-rw-r--r--xsd/doc/xsd-prologue.xhtml5
-rw-r--r--xsd/manifest157
-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.cxx156
-rw-r--r--xsd/xsd/cxx/tree/tree-inline.cxx6
-rw-r--r--xsd/xsd/cxx/tree/tree-source.cxx2
-rw-r--r--xsd/xsd/options.cli15
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.cxx64
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.hxx8
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.ixx12
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx50
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx50
-rw-r--r--xsd/xsd/pregenerated/xsd/options.cxx85
-rw-r--r--xsd/xsd/pregenerated/xsd/options.hxx30
-rw-r--r--xsd/xsd/pregenerated/xsd/options.ixx6
-rw-r--r--xsd/xsd/xsd.cxx35
225 files changed, 3604 insertions, 2111 deletions
diff --git a/LICENSE b/LICENSE
index 5604610..ec7f72f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2022 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/manifest b/libxsd-tests/manifest
index 191d120..d16306d 100644
--- a/libxsd-tests/manifest
+++ b/libxsd-tests/manifest
@@ -1,15 +1,17 @@
: 1
name: libxsd-tests
-version: 4.2.0-b.4.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.16.0-
-depends: * bpkg >= 0.16.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 5d197e3..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 62bbb92..23a9848 100644
--- a/libxsd/manifest
+++ b/libxsd/manifest
@@ -1,17 +1,116 @@
: 1
name: libxsd
-version: 4.2.0-b.4.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.16.0-
-depends: * bpkg >= 0.16.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/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/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 3c2a0ba..85aded9 100644
--- a/xsd-examples/cxx/parser/generated/buildfile
+++ b/xsd-examples/cxx/parser/generated/buildfile
@@ -17,7 +17,7 @@ exe{driver}: xml{library}: test.input = true
{hxx cxx}{library-pimpl} \
{ cxx}{library-driver}>: xsd{library} $xsd
{{
- $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 4148dd3..c136334 100644
--- a/xsd-examples/cxx/parser/hello/buildfile
+++ b/xsd-examples/cxx/parser/hello/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{hello}: test.input = true
<{hxx ixx cxx}{hello-pskel}>: xsd{hello} $xsd
{{
- $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 13a3e1e..2d463e5 100644
--- a/xsd-examples/cxx/parser/library/buildfile
+++ b/xsd-examples/cxx/parser/library/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library-pskel}>: xsd{library} map{library} $xsd
{{
- $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 9d3a629..103d94b 100644
--- a/xsd-examples/cxx/parser/mixed/buildfile
+++ b/xsd-examples/cxx/parser/mixed/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text-pskel}>: xsd{text} map{text} $xsd
{{
- $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 279ae39..7b6cee2 100644
--- a/xsd-examples/cxx/parser/mixin/buildfile
+++ b/xsd-examples/cxx/parser/mixin/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{instance}: test.input = true
<{hxx ixx cxx}{schema-pskel}>: xsd{schema} map{schema} $xsd
{{
- $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 d582e19..4c97ca1 100644
--- a/xsd-examples/cxx/parser/multiroot/buildfile
+++ b/xsd-examples/cxx/parser/multiroot/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -protocol-pskel} {hxx ixx cxx}{protocol-pskel} $libs \
<{hxx ixx cxx}{protocol-pskel}>: xsd{protocol} map{protocol} $xsd
{{
- $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 094dd7b..1d0edd7 100644
--- a/xsd-examples/cxx/parser/performance/buildfile
+++ b/xsd-examples/cxx/parser/performance/buildfile
@@ -33,7 +33,7 @@ for p: 'xerces' 'expat'
parser = $p
}
{{
- $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 a08dfd5..2fad7dd 100644
--- a/xsd-examples/cxx/parser/polymorphism/buildfile
+++ b/xsd-examples/cxx/parser/polymorphism/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{supermen}: test.input = true
<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
{{
- $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 898551d..c1943d4 100644
--- a/xsd-examples/cxx/parser/polyroot/buildfile
+++ b/xsd-examples/cxx/parser/polyroot/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -supermen-pskel} {hxx ixx cxx}{supermen-pskel} $libs \
<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
{{
- $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 55a8a35..5866f38 100644
--- a/xsd-examples/cxx/parser/wildcard/buildfile
+++ b/xsd-examples/cxx/parser/wildcard/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{email}: test.input = true
<{hxx ixx cxx}{email-pskel}>: xsd{email} $xsd
{{
- $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 7385b9e..17e67fb 100644
--- a/xsd-examples/cxx/tree/binary/boost/buildfile
+++ b/xsd-examples/cxx/tree/binary/boost/buildfile
@@ -13,7 +13,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} hxx{library-prologue} $xsd
{{
- $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 c28806a..ccff659 100644
--- a/xsd-examples/cxx/tree/binary/cdr/buildfile
+++ b/xsd-examples/cxx/tree/binary/cdr/buildfile
@@ -13,7 +13,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 c25803d..0fbab13 100644
--- a/xsd-examples/cxx/tree/binary/xdr/buildfile
+++ b/xsd-examples/cxx/tree/binary/xdr/buildfile
@@ -15,7 +15,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 d550be3..f1bcb10 100644
--- a/xsd-examples/cxx/tree/caching/buildfile
+++ b/xsd-examples/cxx/tree/caching/buildfile
@@ -12,7 +12,7 @@ exe{driver}: {xml xsd}{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 a095cf9..99dd8a6 100644
--- a/xsd-examples/cxx/tree/compression/buildfile
+++ b/xsd-examples/cxx/tree/compression/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs testscript
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 4085561..3309f6f 100644
--- a/xsd-examples/cxx/tree/custom/calendar/buildfile
+++ b/xsd-examples/cxx/tree/custom/calendar/buildfile
@@ -16,7 +16,7 @@ exe{driver}: xml{calendar}: test.input = true
<{hxx ixx cxx}{calendar}>: xsd{calendar} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--extern-xml-schema xml-schema.xsd \
--output-dir $out_base \
@@ -30,7 +30,7 @@ hxx{xml-schema}: $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 93196d2..6edf81a 100644
--- a/xsd-examples/cxx/tree/custom/comments/buildfile
+++ b/xsd-examples/cxx/tree/custom/comments/buildfile
@@ -15,7 +15,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd \
@@ -30,7 +30,7 @@ hxx{xml-schema}: $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 9835bbf..51e9c99 100644
--- a/xsd-examples/cxx/tree/custom/contacts/buildfile
+++ b/xsd-examples/cxx/tree/custom/contacts/buildfile
@@ -12,11 +12,11 @@ exe{driver}: xml{contacts}: test.input = true
<{hxx ixx cxx}{contacts}>: xsd{contacts} $xsd
{{
- $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 03c8cde..0c33afe 100644
--- a/xsd-examples/cxx/tree/custom/double/buildfile
+++ b/xsd-examples/cxx/tree/custom/double/buildfile
@@ -13,7 +13,7 @@ exe{driver}: {hxx cxx}{* -order -xml-schema} \
<{hxx ixx cxx}{order}>: xsd{order} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd \
@@ -28,7 +28,7 @@ hxx{xml-schema}: $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 595f8b2..e5919fe 100644
--- a/xsd-examples/cxx/tree/custom/mixed/buildfile
+++ b/xsd-examples/cxx/tree/custom/mixed/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- $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 520470a..4068daa 100644
--- a/xsd-examples/cxx/tree/custom/taxonomy/buildfile
+++ b/xsd-examples/cxx/tree/custom/taxonomy/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people} hxx{people-fwd}>: xsd{people} $xsd
{{
- $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 a0cd709..1bb5a8f 100644
--- a/xsd-examples/cxx/tree/custom/wildcard/buildfile
+++ b/xsd-examples/cxx/tree/custom/wildcard/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{wildcard}: test.input = true
<{hxx ixx cxx}{wildcard}>: xsd{wildcard} $xsd
{{
- $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 583e34e..20b7207 100644
--- a/xsd-examples/cxx/tree/embedded/buildfile
+++ b/xsd-examples/cxx/tree/embedded/buildfile
@@ -17,7 +17,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--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 b842c00..1cd17ac 100644
--- a/xsd-examples/cxx/tree/hello/buildfile
+++ b/xsd-examples/cxx/tree/hello/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{hello}: test.input = true
<{hxx ixx cxx}{hello}>: xsd{hello} $xsd
{{
- $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 da37919..03745fb 100644
--- a/xsd-examples/cxx/tree/library/buildfile
+++ b/xsd-examples/cxx/tree/library/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 4bb3570..7be8caf 100644
--- a/xsd-examples/cxx/tree/messaging/buildfile
+++ b/xsd-examples/cxx/tree/messaging/buildfile
@@ -10,7 +10,7 @@ exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
{{
- $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 c6c13a0..c91021a 100644
--- a/xsd-examples/cxx/tree/mixed/buildfile
+++ b/xsd-examples/cxx/tree/mixed/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text}>: xsd{text} $xsd
{{
- $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 6f6e1fe..55ddb0d 100644
--- a/xsd-examples/cxx/tree/multiroot/buildfile
+++ b/xsd-examples/cxx/tree/multiroot/buildfile
@@ -10,7 +10,7 @@ exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
{{
- $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 d3c3bd6..6e56a60 100644
--- a/xsd-examples/cxx/tree/order/element/buildfile
+++ b/xsd-examples/cxx/tree/order/element/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{transactions}: test.input = true
<{hxx ixx cxx}{transactions}>: xsd{transactions} $xsd
{{
- $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 0125f8d..6bc21e2 100644
--- a/xsd-examples/cxx/tree/order/mixed/buildfile
+++ b/xsd-examples/cxx/tree/order/mixed/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text}>: xsd{text} $xsd
{{
- $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 e2fb4be..7b28308 100644
--- a/xsd-examples/cxx/tree/performance/buildfile
+++ b/xsd-examples/cxx/tree/performance/buildfile
@@ -14,7 +14,7 @@ exe{driver}: xml{test-50k}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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 ea92889..359d4d3 100644
--- a/xsd-examples/cxx/tree/polymorphism/buildfile
+++ b/xsd-examples/cxx/tree/polymorphism/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{supermen}: test.input = true
<{hxx ixx cxx}{supermen}>: xsd{supermen} $xsd
{{
- $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 e4086be..a86af57 100644
--- a/xsd-examples/cxx/tree/secure/buildfile
+++ b/xsd-examples/cxx/tree/secure/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{library}: test.input = true
<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
- $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 91ab678..8555257 100644
--- a/xsd-examples/cxx/tree/streaming/buildfile
+++ b/xsd-examples/cxx/tree/streaming/buildfile
@@ -10,7 +10,7 @@ exe{driver}: {hxx cxx}{* -position} {hxx ixx cxx}{position} $libs testscript
<{hxx ixx cxx}{position}>: xsd{position} $xsd
{{
- $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 8661865..dc158f4 100644
--- a/xsd-examples/cxx/tree/wildcard/buildfile
+++ b/xsd-examples/cxx/tree/wildcard/buildfile
@@ -12,7 +12,7 @@ exe{driver}: xml{email}: test.input = true
<{hxx ixx cxx}{email}>: xsd{email} $xsd
{{
- $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 7cc5020..4f49599 100644
--- a/xsd-examples/cxx/tree/xpath/buildfile
+++ b/xsd-examples/cxx/tree/xpath/buildfile
@@ -13,7 +13,7 @@ exe{driver}: xml{people}: test.input = true
<{hxx ixx cxx}{people}>: xsd{people} $xsd
{{
- $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 de499f9..438b347 100644
--- a/xsd-examples/manifest
+++ b/xsd-examples/manifest
@@ -1,16 +1,18 @@
: 1
name: xsd-examples
-version: 4.2.0-b.4.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.16.0-
-depends: * bpkg >= 0.16.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/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 6b8f48b..b87d6aa 100644
--- a/xsd-tests/clash/buildfile
+++ b/xsd-tests/clash/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/buildfile b/xsd-tests/code/name-conflict/buildfile
index cc90ab4..03051a5 100644
--- a/xsd-tests/code/name-conflict/buildfile
+++ b/xsd-tests/code/name-conflict/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/code/name-escaping/buildfile
index c2d6467..debfe58 100644
--- a/xsd-tests/code/name-escaping/buildfile
+++ b/xsd-tests/code/name-escaping/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/cxx/parser/built-in/buildfile b/xsd-tests/cxx/parser/built-in/buildfile
index 3da3a59..13ae128 100644
--- a/xsd-tests/cxx/parser/built-in/buildfile
+++ b/xsd-tests/cxx/parser/built-in/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/enumeration/buildfile
index d050054..fe5933a 100644
--- a/xsd-tests/cxx/parser/enumeration/buildfile
+++ b/xsd-tests/cxx/parser/enumeration/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} map{test} $xsd
{{
- $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/generated-impl/buildfile b/xsd-tests/cxx/parser/generated-impl/buildfile
index bcb5d12..f6932f9 100644
--- a/xsd-tests/cxx/parser/generated-impl/buildfile
+++ b/xsd-tests/cxx/parser/generated-impl/buildfile
@@ -16,7 +16,7 @@ exe{driver}: file{output}: test.stdout = true
{hxx cxx}{test-pimpl} \
{ cxx}{test-driver}>: xsd{test} $xsd
{{
- $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 d85aa75..5f44a93 100644
--- a/xsd-tests/cxx/parser/list/buildfile
+++ b/xsd-tests/cxx/parser/list/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
index 66e8bae..d6065be 100644
--- a/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
index ff43afa..02b1b41 100644
--- a/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
index 039b063..4303002 100644
--- a/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/recursive/buildfile
index 583206f..395908e 100644
--- a/xsd-tests/cxx/parser/recursive/buildfile
+++ b/xsd-tests/cxx/parser/recursive/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/test-template/buildfile
index 761a437..aad21e7 100644
--- a/xsd-tests/cxx/parser/test-template/buildfile
+++ b/xsd-tests/cxx/parser/test-template/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/union/buildfile
index e73ae2e..6694d5f 100644
--- a/xsd-tests/cxx/parser/union/buildfile
+++ b/xsd-tests/cxx/parser/union/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/all/buildfile
index fc48800..e9c0550 100644
--- a/xsd-tests/cxx/parser/validation/all/buildfile
+++ b/xsd-tests/cxx/parser/validation/all/buildfile
@@ -9,7 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/any/buildfile
index 29ea8e2..9867f51 100644
--- a/xsd-tests/cxx/parser/validation/any/buildfile
+++ b/xsd-tests/cxx/parser/validation/any/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/attribute/buildfile
index 9253c19..0dfe365 100644
--- a/xsd-tests/cxx/parser/validation/attribute/buildfile
+++ b/xsd-tests/cxx/parser/validation/attribute/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
index b557864..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,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/choice/buildfile
index 8cff0ba..06eca85 100644
--- a/xsd-tests/cxx/parser/validation/choice/buildfile
+++ b/xsd-tests/cxx/parser/validation/choice/buildfile
@@ -9,7 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/restriction/buildfile
index b247303..1086ea0 100644
--- a/xsd-tests/cxx/parser/validation/restriction/buildfile
+++ b/xsd-tests/cxx/parser/validation/restriction/buildfile
@@ -9,7 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/parser/validation/sequence/buildfile
index a7f00a6..2ca2b6a 100644
--- a/xsd-tests/cxx/parser/validation/sequence/buildfile
+++ b/xsd-tests/cxx/parser/validation/sequence/buildfile
@@ -9,7 +9,7 @@ exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
{{
- $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/tree/any-type/buildfile b/xsd-tests/cxx/tree/any-type/buildfile
index 74cc9d9..6f3a355 100644
--- a/xsd-tests/cxx/tree/any-type/buildfile
+++ b/xsd-tests/cxx/tree/any-type/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-any-type \
diff --git a/xsd-tests/cxx/tree/binary/cdr/buildfile b/xsd-tests/cxx/tree/binary/cdr/buildfile
index 581a632..7518f04 100644
--- a/xsd-tests/cxx/tree/binary/cdr/buildfile
+++ b/xsd-tests/cxx/tree/binary/cdr/buildfile
@@ -11,7 +11,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/polymorphic/buildfile b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
index 701f36a..1212a34 100644
--- a/xsd-tests/cxx/tree/binary/polymorphic/buildfile
+++ b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
@@ -11,7 +11,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--root-element-last \
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
index 4900478..93e1701 100644
--- a/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
@@ -13,7 +13,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/cxx/tree/binary/xdr/buildfile
index aefb3cf..0c738f6 100644
--- a/xsd-tests/cxx/tree/binary/xdr/buildfile
+++ b/xsd-tests/cxx/tree/binary/xdr/buildfile
@@ -13,7 +13,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-insertion 'XDR' \
--generate-extraction 'XDR' \
diff --git a/xsd-tests/cxx/tree/built-in/buildfile b/xsd-tests/cxx/tree/built-in/buildfile
index d84e542..5570ff0 100644
--- a/xsd-tests/cxx/tree/built-in/buildfile
+++ b/xsd-tests/cxx/tree/built-in/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -types} {hxx ixx cxx}{types} $libs testscript
<{hxx ixx cxx}{types}>: xsd{types} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--generate-serialization \
diff --git a/xsd-tests/cxx/tree/chameleon/buildfile b/xsd-tests/cxx/tree/chameleon/buildfile
index a30c93e..c04c4b9 100644
--- a/xsd-tests/cxx/tree/chameleon/buildfile
+++ b/xsd-tests/cxx/tree/chameleon/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{includer}>: xsd{includer includee} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--root-element root \
diff --git a/xsd-tests/cxx/tree/comparison/buildfile b/xsd-tests/cxx/tree/comparison/buildfile
index d106e30..c1ece3a 100644
--- a/xsd-tests/cxx/tree/comparison/buildfile
+++ b/xsd-tests/cxx/tree/comparison/buildfile
@@ -10,7 +10,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-comparison \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/compilation/buildfile b/xsd-tests/cxx/tree/compilation/buildfile
index 79a72df..26cf0f0 100644
--- a/xsd-tests/cxx/tree/compilation/buildfile
+++ b/xsd-tests/cxx/tree/compilation/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/complex/ctor/buildfile b/xsd-tests/cxx/tree/complex/ctor/buildfile
index fccdac0..14a4340 100644
--- a/xsd-tests/cxx/tree/complex/ctor/buildfile
+++ b/xsd-tests/cxx/tree/complex/ctor/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/containment/buildfile b/xsd-tests/cxx/tree/containment/buildfile
index dbdea4a..f241817 100644
--- a/xsd-tests/cxx/tree/containment/buildfile
+++ b/xsd-tests/cxx/tree/containment/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/default/general/buildfile b/xsd-tests/cxx/tree/default/general/buildfile
index c84665f..7ccc174 100644
--- a/xsd-tests/cxx/tree/default/general/buildfile
+++ b/xsd-tests/cxx/tree/default/general/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-tests/cxx/tree/default/omit/buildfile b/xsd-tests/cxx/tree/default/omit/buildfile
index af3ce3c..ee6d678 100644
--- a/xsd-tests/cxx/tree/default/omit/buildfile
+++ b/xsd-tests/cxx/tree/default/omit/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \
diff --git a/xsd-tests/cxx/tree/detach/buildfile b/xsd-tests/cxx/tree/detach/buildfile
index c0b0f73..8a27a2c 100644
--- a/xsd-tests/cxx/tree/detach/buildfile
+++ b/xsd-tests/cxx/tree/detach/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-detach \
--generate-default-ctor \
diff --git a/xsd-tests/cxx/tree/dom-association/buildfile b/xsd-tests/cxx/tree/dom-association/buildfile
index 4a9df12..b6f6e0e 100644
--- a/xsd-tests/cxx/tree/dom-association/buildfile
+++ b/xsd-tests/cxx/tree/dom-association/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
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 7d38ce6..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,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/lcp/buildfile b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
index 3b0dfdf..65d2f16 100644
--- a/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/utf-8/buildfile b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
index 60c7f64..c4b06b1 100644
--- a/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-doxygen \
diff --git a/xsd-tests/cxx/tree/encoding/wchar/buildfile b/xsd-tests/cxx/tree/encoding/wchar/buildfile
index b330416..cdc8e60 100644
--- a/xsd-tests/cxx/tree/encoding/wchar/buildfile
+++ b/xsd-tests/cxx/tree/encoding/wchar/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--char-type wchar_t \
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/buildfile b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
index 7d9c030..41a8028 100644
--- a/xsd-tests/cxx/tree/enumeration/ctor/buildfile
+++ b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/inheritance/buildfile b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
index 62ee2d7..beb0add 100644
--- a/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/float/buildfile b/xsd-tests/cxx/tree/float/buildfile
index d9286b5..92a5937 100644
--- a/xsd-tests/cxx/tree/float/buildfile
+++ b/xsd-tests/cxx/tree/float/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--root-element-all \
diff --git a/xsd-tests/cxx/tree/list/ctor/buildfile b/xsd-tests/cxx/tree/list/ctor/buildfile
index f5722e2..adb6a13 100644
--- a/xsd-tests/cxx/tree/list/ctor/buildfile
+++ b/xsd-tests/cxx/tree/list/ctor/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/name-clash/inheritance/buildfile b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
index 7ebafca..473d128 100644
--- a/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/naming/camel/buildfile b/xsd-tests/cxx/tree/naming/camel/buildfile
index 4573295..d93bd8e 100644
--- a/xsd-tests/cxx/tree/naming/camel/buildfile
+++ b/xsd-tests/cxx/tree/naming/camel/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming ucc \
diff --git a/xsd-tests/cxx/tree/naming/java/buildfile b/xsd-tests/cxx/tree/naming/java/buildfile
index a309894..b23f104 100644
--- a/xsd-tests/cxx/tree/naming/java/buildfile
+++ b/xsd-tests/cxx/tree/naming/java/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming java \
diff --git a/xsd-tests/cxx/tree/naming/knr/buildfile b/xsd-tests/cxx/tree/naming/knr/buildfile
index 9d86481..c694aa2 100644
--- a/xsd-tests/cxx/tree/naming/knr/buildfile
+++ b/xsd-tests/cxx/tree/naming/knr/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--type-naming knr \
diff --git a/xsd-tests/cxx/tree/order/buildfile b/xsd-tests/cxx/tree/order/buildfile
index 7ae4cec..b490676 100644
--- a/xsd-tests/cxx/tree/order/buildfile
+++ b/xsd-tests/cxx/tree/order/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-wildcard \
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/buildfile b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
index a26182d..fc486ba 100644
--- a/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
@@ -10,7 +10,7 @@ exe{driver}: xml{test}: test.input = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-polymorphic \
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/buildfile b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
index cd1e510..fb9c4d0 100644
--- a/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--polymorphic-type-all \
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/buildfile b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
index fba6da8..e739925 100644
--- a/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-polymorphic \
--root-element root \
diff --git a/xsd-tests/cxx/tree/prefix/buildfile b/xsd-tests/cxx/tree/prefix/buildfile
index 48fcd72..3ecd411 100644
--- a/xsd-tests/cxx/tree/prefix/buildfile
+++ b/xsd-tests/cxx/tree/prefix/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx ixx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-polymorphic \
diff --git a/xsd-tests/cxx/tree/test-template/buildfile b/xsd-tests/cxx/tree/test-template/buildfile
index 535893f..937840f 100644
--- a/xsd-tests/cxx/tree/test-template/buildfile
+++ b/xsd-tests/cxx/tree/test-template/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-ostream \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/types-only/buildfile b/xsd-tests/cxx/tree/types-only/buildfile
index 1a8a8d9..6436090 100644
--- a/xsd-tests/cxx/tree/types-only/buildfile
+++ b/xsd-tests/cxx/tree/types-only/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--suppress-parsing \
--output-dir $out_base \
diff --git a/xsd-tests/cxx/tree/union/ctor/buildfile b/xsd-tests/cxx/tree/union/ctor/buildfile
index 02a1241..e1dcb77 100644
--- a/xsd-tests/cxx/tree/union/ctor/buildfile
+++ b/xsd-tests/cxx/tree/union/ctor/buildfile
@@ -8,7 +8,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $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/wildcard/buildfile b/xsd-tests/cxx/tree/wildcard/buildfile
index 6430387..d936b0f 100644
--- a/xsd-tests/cxx/tree/wildcard/buildfile
+++ b/xsd-tests/cxx/tree/wildcard/buildfile
@@ -11,7 +11,7 @@ exe{driver}: file{output}: test.stdout = true
<{hxx ixx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-wildcard \
diff --git a/xsd-tests/failed/buildfile b/xsd-tests/failed/buildfile
index 8c8db9f..a37056e 100644
--- a/xsd-tests/failed/buildfile
+++ b/xsd-tests/failed/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/manifest b/xsd-tests/manifest
index 44e1ed6..dc0c5b6 100644
--- a/xsd-tests/manifest
+++ b/xsd-tests/manifest
@@ -1,15 +1,17 @@
: 1
name: xsd-tests
-version: 4.2.0-b.4.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.16.0-
-depends: * bpkg >= 0.16.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 fb8e21c..38aa6d8 100644
--- a/xsd-tests/morphing/anonymous/attribute-group/buildfile
+++ b/xsd-tests/morphing/anonymous/attribute-group/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/morphing/anonymous/basic/buildfile
index 21afec5..8193904 100644
--- a/xsd-tests/morphing/anonymous/basic/buildfile
+++ b/xsd-tests/morphing/anonymous/basic/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
index 627faa8..15cbbe8 100644
--- a/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/buildfile b/xsd-tests/morphing/anonymous/group/buildfile
index 5202deb..980dd19 100644
--- a/xsd-tests/morphing/anonymous/group/buildfile
+++ b/xsd-tests/morphing/anonymous/group/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/unstable/buildfile b/xsd-tests/morphing/anonymous/unstable/buildfile
index a615205..d61d36b 100644
--- a/xsd-tests/morphing/anonymous/unstable/buildfile
+++ b/xsd-tests/morphing/anonymous/unstable/buildfile
@@ -11,7 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
@@ -25,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 d478f4f..3dee900 100644
--- a/xsd-tests/processing/inheritance/buildfile
+++ b/xsd-tests/processing/inheritance/buildfile
@@ -24,7 +24,7 @@ for nm: 000 001
<{hxx cxx}{$sc}>: xsd{$sc} $xsd
{{
- $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/buildfile b/xsd-tests/schema/anonymous/buildfile
index ce236f8..060d7d6 100644
--- a/xsd-tests/schema/anonymous/buildfile
+++ b/xsd-tests/schema/anonymous/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
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 af74cd9..9ab1e7d 100644
--- a/xsd-tests/schema/any-type/buildfile
+++ b/xsd-tests/schema/any-type/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/schema/any/buildfile
index f5d6380..f6c163a 100644
--- a/xsd-tests/schema/any/buildfile
+++ b/xsd-tests/schema/any/buildfile
@@ -24,7 +24,7 @@ for sc: test fail
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
@@ -32,7 +32,7 @@ for sc: test fail
<{hxx cxx}{fail}>: xsd{fail} $xsd
{{
- $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/attribute-group/buildfile b/xsd-tests/schema/attribute-group/buildfile
index 4c97e5b..4b7d27e 100644
--- a/xsd-tests/schema/attribute-group/buildfile
+++ b/xsd-tests/schema/attribute-group/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -global} {hxx cxx}{global} $libs
<{hxx cxx}{global}>: xsd{global} $xsd
{{
- $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/buildfile b/xsd-tests/schema/attribute/buildfile
index a14bafc..30d1464 100644
--- a/xsd-tests/schema/attribute/buildfile
+++ b/xsd-tests/schema/attribute/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/buildfile b/xsd-tests/schema/cardinality/buildfile
index 9b97cf0..93ad75a 100644
--- a/xsd-tests/schema/cardinality/buildfile
+++ b/xsd-tests/schema/cardinality/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/chameleon/buildfile b/xsd-tests/schema/chameleon/buildfile
index 445c052..e270cf0 100644
--- a/xsd-tests/schema/chameleon/buildfile
+++ b/xsd-tests/schema/chameleon/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/enumeration/buildfile b/xsd-tests/schema/enumeration/buildfile
index d8b2d85..5188b04 100644
--- a/xsd-tests/schema/enumeration/buildfile
+++ b/xsd-tests/schema/enumeration/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/schema/forward/buildfile
index ec6b7d9..3b30f53 100644
--- a/xsd-tests/schema/forward/buildfile
+++ b/xsd-tests/schema/forward/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/schema/group/buildfile
index f2bb6e1..e93b592 100644
--- a/xsd-tests/schema/group/buildfile
+++ b/xsd-tests/schema/group/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
diff --git a/xsd-tests/schema/import/buildfile b/xsd-tests/schema/import/buildfile
index 4cec837..c5fab29 100644
--- a/xsd-tests/schema/import/buildfile
+++ b/xsd-tests/schema/import/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/buildfile b/xsd-tests/schema/include/buildfile
index dcc151a..c013903 100644
--- a/xsd-tests/schema/include/buildfile
+++ b/xsd-tests/schema/include/buildfile
@@ -15,7 +15,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $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/inheritance/buildfile b/xsd-tests/schema/inheritance/buildfile
index 23786d3..0eae9b3 100644
--- a/xsd-tests/schema/inheritance/buildfile
+++ b/xsd-tests/schema/inheritance/buildfile
@@ -11,7 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--output-dir $directory($path($>[0])) \
$path($<[0])
}}
@@ -24,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 88ed0ee..090e69a 100644
--- a/xsd-tests/schema/list/buildfile
+++ b/xsd-tests/schema/list/buildfile
@@ -11,7 +11,7 @@ for f: $fs
{
<{hxx cxx}{$f}>: xsd{$f} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $directory($path($>[0])) \
$path($<[0])
@@ -25,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 5d50490..6723d4f 100644
--- a/xsd-tests/schema/no-namespace/buildfile
+++ b/xsd-tests/schema/no-namespace/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/schema/recursive/buildfile
index 99788f6..a166e82 100644
--- a/xsd-tests/schema/recursive/buildfile
+++ b/xsd-tests/schema/recursive/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/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 2b27cf1..ff962dc 100644
--- a/xsd-tests/schema/ref-type/valid/buildfile
+++ b/xsd-tests/schema/ref-type/valid/buildfile
@@ -23,7 +23,7 @@ for sc: idref idrefs
<{hxx cxx}{$sc}>: xsd{$sc} $xsd
{{
- $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/buildfile b/xsd-tests/schema/restriction/buildfile
index b245187..314b095 100644
--- a/xsd-tests/schema/restriction/buildfile
+++ b/xsd-tests/schema/restriction/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $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/buildfile b/xsd-tests/schema/union/buildfile
index 9cdc56f..8ff9349 100644
--- a/xsd-tests/schema/union/buildfile
+++ b/xsd-tests/schema/union/buildfile
@@ -11,7 +11,7 @@ exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
<{hxx cxx}{test}>: xsd{test} $xsd
{{
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--root-element-all \
--output-dir $out_base \
$path($<[0])
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/buildfile b/xsd/buildfile
index 552635c..b0121dd 100644
--- a/xsd/buildfile
+++ b/xsd/buildfile
@@ -1,9 +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 tests or the INSTALL file.
+# Don't install tests.
#
-tests/: install = false
-doc{INSTALL}@./: install = false
+tests/: install = false
diff --git a/xsd/doc/buildfile b/xsd/doc/buildfile
index b2037c7..271d17e 100644
--- a/xsd/doc/buildfile
+++ b/xsd/doc/buildfile
@@ -27,6 +27,12 @@ svg{*}: extension = svg
./: css{default} xsd{custom-literals} {png svg}{**}
+# Note: doc_version is also used in the man pages and the manual.
+#
+doc_version = [string] "$version.major.$version.minor.$version.patch"
+if $version.pre_release
+ doc_version += "-$version.pre_release_string"
+
# Man pages.
#
@@ -51,10 +57,6 @@ pregenerated/{man1 xhtml}{*}: dist = (!$develop)
if $develop
{
- doc_version = [string] "$version.major\.$version.minor\.$version.patch"
- if $version.pre_release
- doc_version += "-$version.pre_release_string"
-
# 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')
@@ -77,7 +79,7 @@ if $develop
#
{man1 xhtml}{xsd}: dist = ($develop ? pregenerated/ : false)
-ops = ../xsd/cxx/cli{options tree/options parser/options}
+ops = ../xsd/cli{options cxx/options cxx/tree/options cxx/parser/options}
man1{xsd}: $ops \
file{xsd-prologue.1 \
@@ -96,20 +98,20 @@ if $develop
-v date="January $doc_year" \
--class CXX::options \
--class options \
- --man-prologue-file $path($<[3]) \
- $path($<[0]) >$o
-
- $cli --generate-man $man_options \
- -v date="January $doc_year" \
--man-prologue-file $path($<[4]) \
- $path($<[1]) >>$o
+ $path($<[1]) >$o
$cli --generate-man $man_options \
-v date="January $doc_year" \
--man-prologue-file $path($<[5]) \
- --man-epilogue-file $path($<[6]) \
$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 >-
@@ -132,20 +134,20 @@ if $develop
-v date="January $doc_year" \
--class CXX::options \
--class options \
- --html-prologue-file $path($<[3]) \
- $path($<[0]) >$o
-
- $cli --generate-html $man_options \
- -v date="January $doc_year" \
--html-prologue-file $path($<[4]) \
- $path($<[1]) >>$o
+ $path($<[1]) >$o
$cli --generate-html $man_options \
-v date="January $doc_year" \
--html-prologue-file $path($<[5]) \
- --html-epilogue-file $path($<[6]) \
$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
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/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/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
index f74a3b0..580ac78 100644
--- a/xsd/doc/pregenerated/xsd.1
+++ b/xsd/doc/pregenerated/xsd.1
@@ -1,7 +1,7 @@
.\" Process this file with
.\" groff -man -Tascii xsd.1
.\"
-.TH XSD 1 "January 2022" "XSD 4.2.0-b.4"
+.TH XSD 1 "January 2023" "XSD 4.2.1-a.0"
.SH NAME
xsd \- W3C XML Schema to C++ Compiler
.\"
@@ -119,12 +119,15 @@ if any, should appear after the corresponding
.
.IP "\fB--std\fR \fIversion\fR"
Specify the C++ standard that the generated code should conform to\. Valid
-values are \fBc++98\fR (default) and \fBc++11\fR\.
+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
@@ -381,7 +384,8 @@ 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\.
+\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
@@ -402,8 +406,12 @@ 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 the provided \fIsuffix\fR instead of the default \fB\.d\fR to construct
-the name of the dependency file\.
+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
@@ -577,9 +585,14 @@ 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\. 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\.
+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
@@ -1292,7 +1305,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
@@ -1303,6 +1315,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
@@ -1382,13 +1402,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;
@@ -1471,7 +1491,7 @@ 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-2022 Code Synthesis Tools CC.
+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,
diff --git a/xsd/doc/pregenerated/xsd.xhtml b/xsd/doc/pregenerated/xsd.xhtml
index 4737ab6..2e30ed4 100644
--- a/xsd/doc/pregenerated/xsd.xhtml
+++ b/xsd/doc/pregenerated/xsd.xhtml
@@ -1,12 +1,11 @@
-<?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>XSD 4.2.0-b.4 Compiler Command Line Manual</title>
+ <title>XSD 4.2.1-a.0 Compiler Command Line Manual</title>
- <meta name="version" content="4.2.0-b.4"/>
- <meta name="copyright" content="&#169; 2005-2022 Code Synthesis Tools CC"/>
+ <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"/>
@@ -124,14 +123,16 @@
<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> (default) and
- <code><b>c++11</b></code>.
+ 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>.</p>
+ 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
@@ -480,7 +481,8 @@
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.
+ 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,
@@ -506,8 +508,15 @@
multiple times.</dd>
<dt><code><b>--dep-suffix</b></code> <code><i>suffix</i></code></dt>
- <dd>Use the provided <code><i>suffix</i></code> instead of the default
- <code><b>.d</b></code> to construct the name of the dependency file.</dd>
+ <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
@@ -731,10 +740,17 @@
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>. 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>
+ <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
@@ -1465,7 +1481,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
@@ -1512,10 +1532,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;
@@ -1585,7 +1605,7 @@ namespace .*
</div>
<div id="footer">
- Copyright &#169; 2005-2022 Code Synthesis Tools CC.
+ Copyright &#169; 2005-2023 Code Synthesis.
<div id="terms">
Permission is granted to copy, distribute and/or modify this
diff --git a/xsd/doc/xsd-epilogue.1 b/xsd/doc/xsd-epilogue.1
index a37da89..9ab1952 100644
--- a/xsd/doc/xsd-epilogue.1
+++ b/xsd/doc/xsd-epilogue.1
@@ -381,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
@@ -392,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
@@ -471,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 632b2d9..178cf8b 100644
--- a/xsd/doc/xsd-epilogue.xhtml
+++ b/xsd/doc/xsd-epilogue.xhtml
@@ -290,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
@@ -337,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 075b021..8ae3ef5 100644
--- a/xsd/manifest
+++ b/xsd/manifest
@@ -1,23 +1,162 @@
: 1
name: xsd
-version: 4.2.0-b.4.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.16.0-
-depends: * bpkg >= 0.16.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- ? ($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/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 3233248..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 () << ':';
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 d702509..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.
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
index f4d3fa7..9eea3a9 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/options.cxx
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.cxx
@@ -184,6 +184,56 @@ namespace cli
}
};
+ 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)
@@ -216,7 +266,7 @@ namespace CXX
options::
options ()
- : std_ (cxx_version::cxx98),
+ : std_ (cxx_version::cxx11),
std_specified_ (false),
char_type_ ("char"),
char_type_specified_ (false),
@@ -311,6 +361,8 @@ namespace CXX
dep_target_specified_ (false),
dep_suffix_ (".d"),
dep_suffix_specified_ (false),
+ dep_file_ (),
+ dep_file_specified_ (false),
dep_regex_ (),
dep_regex_specified_ (false)
{
@@ -477,8 +529,11 @@ namespace CXX
os << "--dep-target <target> Change the target of the dependency rule." << ::std::endl;
- os << "--dep-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
- << " .d to construct the name of the dependency file." << ::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;
@@ -646,6 +701,9 @@ namespace CXX
_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_ >;
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.hxx b/xsd/xsd/pregenerated/xsd/cxx/options.hxx
index b01027a..085aa4c 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/options.hxx
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.hxx
@@ -313,6 +313,12 @@ namespace CXX
dep_suffix_specified () const;
const NarrowString&
+ dep_file () const;
+
+ bool
+ dep_file_specified () const;
+
+ const NarrowString&
dep_regex () const;
bool
@@ -428,6 +434,8 @@ namespace CXX
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_;
};
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.ixx b/xsd/xsd/pregenerated/xsd/cxx/options.ixx
index e8ba2fb..8266e31 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/options.ixx
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.ixx
@@ -585,6 +585,18 @@ namespace CXX
}
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_;
diff --git a/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx
index 04cb7ae..60667ac 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx
+++ b/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx
@@ -184,6 +184,56 @@ namespace cli
}
};
+ 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)
diff --git a/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx
index 60ddeb0..17214c1 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx
+++ b/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx
@@ -184,6 +184,56 @@ namespace cli
}
};
+ 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)
diff --git a/xsd/xsd/pregenerated/xsd/options.cxx b/xsd/xsd/pregenerated/xsd/options.cxx
index 34b0ff5..3022ec4 100644
--- a/xsd/xsd/pregenerated/xsd/options.cxx
+++ b/xsd/xsd/pregenerated/xsd/options.cxx
@@ -27,7 +27,7 @@ namespace cli
// unknown_option
//
unknown_option::
- ~unknown_option () throw ()
+ ~unknown_option () noexcept
{
}
@@ -38,7 +38,7 @@ namespace cli
}
const char* unknown_option::
- what () const throw ()
+ what () const noexcept
{
return "unknown option";
}
@@ -46,7 +46,7 @@ namespace cli
// unknown_argument
//
unknown_argument::
- ~unknown_argument () throw ()
+ ~unknown_argument () noexcept
{
}
@@ -57,7 +57,7 @@ namespace cli
}
const char* unknown_argument::
- what () const throw ()
+ what () const noexcept
{
return "unknown argument";
}
@@ -65,7 +65,7 @@ namespace cli
// missing_value
//
missing_value::
- ~missing_value () throw ()
+ ~missing_value () noexcept
{
}
@@ -76,7 +76,7 @@ namespace cli
}
const char* missing_value::
- what () const throw ()
+ what () const noexcept
{
return "missing option value";
}
@@ -84,7 +84,7 @@ namespace cli
// invalid_value
//
invalid_value::
- ~invalid_value () throw ()
+ ~invalid_value () noexcept
{
}
@@ -99,7 +99,7 @@ namespace cli
}
const char* invalid_value::
- what () const throw ()
+ what () const noexcept
{
return "invalid option value";
}
@@ -113,7 +113,7 @@ namespace cli
}
const char* eos_reached::
- what () const throw ()
+ what () const noexcept
{
return "end of argument stream reached";
}
@@ -121,7 +121,7 @@ namespace cli
// file_io_failure
//
file_io_failure::
- ~file_io_failure () throw ()
+ ~file_io_failure () noexcept
{
}
@@ -132,7 +132,7 @@ namespace cli
}
const char* file_io_failure::
- what () const throw ()
+ what () const noexcept
{
return "unable to open file or read failure";
}
@@ -140,7 +140,7 @@ namespace cli
// unmatched_quote
//
unmatched_quote::
- ~unmatched_quote () throw ()
+ ~unmatched_quote () noexcept
{
}
@@ -151,7 +151,7 @@ namespace cli
}
const char* unmatched_quote::
- what () const throw ()
+ what () const noexcept
{
return "unmatched quote";
}
@@ -677,6 +677,56 @@ namespace cli
}
};
+ 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)
@@ -1046,6 +1096,7 @@ options ()
fat_type_file_ (),
file_list_ (),
file_list_specified_ (false),
+ file_list_only_ (),
file_list_prologue_ (),
file_list_prologue_specified_ (false),
file_list_epilogue_ (),
@@ -1125,7 +1176,11 @@ print_usage (::std::wostream& os, ::cli::usage_para p)
<< " 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>." << ::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;
@@ -1201,6 +1256,8 @@ struct _cli_options_map_init
_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_ >;
diff --git a/xsd/xsd/pregenerated/xsd/options.hxx b/xsd/xsd/pregenerated/xsd/options.hxx
index bdeaa7e..0f4383c 100644
--- a/xsd/xsd/pregenerated/xsd/options.hxx
+++ b/xsd/xsd/pregenerated/xsd/options.hxx
@@ -88,7 +88,7 @@ namespace cli
{
public:
virtual
- ~unknown_option () throw ();
+ ~unknown_option () noexcept;
unknown_option (const std::string& option);
@@ -99,7 +99,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string option_;
@@ -109,7 +109,7 @@ namespace cli
{
public:
virtual
- ~unknown_argument () throw ();
+ ~unknown_argument () noexcept;
unknown_argument (const std::string& argument);
@@ -120,7 +120,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string argument_;
@@ -130,7 +130,7 @@ namespace cli
{
public:
virtual
- ~missing_value () throw ();
+ ~missing_value () noexcept;
missing_value (const std::string& option);
@@ -141,7 +141,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string option_;
@@ -151,7 +151,7 @@ namespace cli
{
public:
virtual
- ~invalid_value () throw ();
+ ~invalid_value () noexcept;
invalid_value (const std::string& option,
const std::string& value,
@@ -170,7 +170,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string option_;
@@ -185,14 +185,14 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
};
class file_io_failure: public exception
{
public:
virtual
- ~file_io_failure () throw ();
+ ~file_io_failure () noexcept;
file_io_failure (const std::string& file);
@@ -203,7 +203,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string file_;
@@ -213,7 +213,7 @@ namespace cli
{
public:
virtual
- ~unmatched_quote () throw ();
+ ~unmatched_quote () noexcept;
unmatched_quote (const std::string& argument);
@@ -224,7 +224,7 @@ namespace cli
print (::std::wostream&) const;
virtual const char*
- what () const throw ();
+ what () const noexcept;
private:
std::string argument_;
@@ -608,6 +608,9 @@ class options
bool
file_list_specified () const;
+ const bool&
+ file_list_only () const;
+
const NarrowString&
file_list_prologue () const;
@@ -678,6 +681,7 @@ class options
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_;
diff --git a/xsd/xsd/pregenerated/xsd/options.ixx b/xsd/xsd/pregenerated/xsd/options.ixx
index e905544..d87e59c 100644
--- a/xsd/xsd/pregenerated/xsd/options.ixx
+++ b/xsd/xsd/pregenerated/xsd/options.ixx
@@ -495,6 +495,12 @@ 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
{
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&)