From ac0ec9b7689393e5e549c08765ca736c673c54bb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Nov 2013 08:55:22 +0200 Subject: Drop support for Berkeley DB XML --- NEWS | 3 + build/configuration.make | 2 - build/configure | 9 - build/import/libdbxml/LICENSE | 340 ----------------- build/import/libdbxml/configuration-rules.make | 15 - build/import/libdbxml/configure | 58 --- build/import/libdbxml/rules.make | 42 -- build/import/libdbxml/stub.make | 32 -- build/import/libdbxml/version | 1 - dist/README-UNIX | 3 - dist/README-WINDOWS | 1 - dist/examples/cxx/tree/dbxml/dbxml-10.0.sln | 25 -- dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj | 209 ---------- .../cxx/tree/dbxml/dbxml-10.0.vcxproj.filters | 38 -- dist/examples/cxx/tree/dbxml/dbxml-8.0.sln | 25 -- dist/examples/cxx/tree/dbxml/dbxml-8.0.vcproj | 423 --------------------- dist/examples/cxx/tree/dbxml/dbxml-9.0.sln | 25 -- dist/examples/cxx/tree/dbxml/dbxml-9.0.vcproj | 420 -------------------- dist/examples/cxx/tree/dbxml/makefile | 33 -- dist/examples/cxx/tree/makefile | 4 - documentation/cxx/tree/dbxml/driver.cxx | 1 - documentation/cxx/tree/dbxml/index.xhtml | 348 ----------------- documentation/cxx/tree/dbxml/library.xsd | 1 - documentation/cxx/tree/guide/index.xhtml | 27 +- documentation/cxx/tree/makefile | 2 - documentation/cxx/tree/manual/index.xhtml | 4 - examples/cxx/tree/README | 4 - examples/cxx/tree/dbxml/README | 45 --- examples/cxx/tree/dbxml/driver.cxx | 175 --------- examples/cxx/tree/dbxml/library.xsd | 75 ---- examples/cxx/tree/dbxml/makefile | 107 ------ examples/cxx/tree/makefile | 6 +- libxsd/xsd/cxx/tree/text.txx | 14 - 33 files changed, 15 insertions(+), 2502 deletions(-) delete mode 100644 build/import/libdbxml/LICENSE delete mode 100644 build/import/libdbxml/configuration-rules.make delete mode 100755 build/import/libdbxml/configure delete mode 100644 build/import/libdbxml/rules.make delete mode 100644 build/import/libdbxml/stub.make delete mode 100644 build/import/libdbxml/version delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-10.0.sln delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj.filters delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-8.0.sln delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-8.0.vcproj delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-9.0.sln delete mode 100644 dist/examples/cxx/tree/dbxml/dbxml-9.0.vcproj delete mode 100644 dist/examples/cxx/tree/dbxml/makefile delete mode 120000 documentation/cxx/tree/dbxml/driver.cxx delete mode 100644 documentation/cxx/tree/dbxml/index.xhtml delete mode 120000 documentation/cxx/tree/dbxml/library.xsd delete mode 100644 examples/cxx/tree/dbxml/README delete mode 100644 examples/cxx/tree/dbxml/driver.cxx delete mode 100644 examples/cxx/tree/dbxml/library.xsd delete mode 100644 examples/cxx/tree/dbxml/makefile diff --git a/NEWS b/NEWS index 61477a5..cbcc032 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Version 4.0.0 + * Oracle/Berkeley DB XML support has been removed since the Xerces-C++- + based document access is no longer supported. + * New option, --std, specifies the C++ standard that the generated code should conform to. Valid values are c++98 (default) and c++11. diff --git a/build/configuration.make b/build/configuration.make index 938d61f..92181e5 100644 --- a/build/configuration.make +++ b/build/configuration.make @@ -10,7 +10,6 @@ $(call include-once,$(scf_root)/configuration-rules.make,$(dcf_root)) xsd_with_zlib := xsd_with_ace := xsd_with_xdr := -xsd_with_dbxml := xsd_with_xqilla := xsd_with_boost_date_time := xsd_with_boost_serialization := @@ -22,7 +21,6 @@ ifdef xsd_with_zlib $(out_root)/%: xsd_with_zlib := $(xsd_with_zlib) $(out_root)/%: xsd_with_ace := $(xsd_with_ace) $(out_root)/%: xsd_with_xdr := $(xsd_with_xdr) -$(out_root)/%: xsd_with_dbxml := $(xsd_with_dbxml) $(out_root)/%: xsd_with_xqilla := $(xsd_with_xqilla) $(out_root)/%: xsd_with_boost_date_time := $(xsd_with_boost_date_time) $(out_root)/%: xsd_with_boost_serialization := $(xsd_with_boost_serialization) diff --git a/build/configure b/build/configure index fb1882d..2125b99 100755 --- a/build/configure +++ b/build/configure @@ -49,7 +49,6 @@ $echo with_boost_serialization=`read_y_n n` - $echo $echo "Would you like to build optional parts of '$project_name' that require" $echo "the boost 'date_time' library?" @@ -59,13 +58,6 @@ with_boost_date_time=`read_y_n n` $echo $echo "Would you like to build optional parts of '$project_name' that require" -$echo "the 'Berkeley DB XML' library?" -$echo - -with_dbxml=`read_y_n n` - -$echo -$echo "Would you like to build optional parts of '$project_name' that require" $echo "the XQilla library?" $echo @@ -74,7 +66,6 @@ with_xqilla=`read_y_n n` echo "xsd_with_zlib := $with_zlib" >$1 echo "xsd_with_ace := $with_ace" >>$1 echo "xsd_with_xdr := $with_xdr" >>$1 -echo "xsd_with_dbxml := $with_dbxml" >>$1 echo "xsd_with_xqilla := $with_xqilla" >>$1 echo "xsd_with_boost_date_time := $with_boost_date_time" >>$1 echo "xsd_with_boost_serialization := $with_boost_serialization" >>$1 diff --git a/build/import/libdbxml/LICENSE b/build/import/libdbxml/LICENSE deleted file mode 100644 index 3912109..0000000 --- a/build/import/libdbxml/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/build/import/libdbxml/configuration-rules.make b/build/import/libdbxml/configuration-rules.make deleted file mode 100644 index 823186c..0000000 --- a/build/import/libdbxml/configuration-rules.make +++ /dev/null @@ -1,15 +0,0 @@ -# file : build/import/libdbxml/configuration-rules.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2005-2009 Boris Kolpackov -# license : GNU GPL v2; see accompanying LICENSE file - -$(dcf_root)/import/libdbxml/configuration-dynamic.make: | $(dcf_root)/import/libdbxml/. - $(call message,,$(scf_root)/import/libdbxml/configure $@) - -ifndef %foreign% - -disfigure:: - $(call message,rm $(dcf_root)/import/libdbxml/configuration-dynamic.make,\ -rm -f $(dcf_root)/import/libdbxml/configuration-dynamic.make) - -endif diff --git a/build/import/libdbxml/configure b/build/import/libdbxml/configure deleted file mode 100755 index 73ce78c..0000000 --- a/build/import/libdbxml/configure +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env bash - -# file : build/import/libdbxml/configure -# author : Boris Kolpackov -# copyright : Copyright (c) 2005-2009 Boris Kolpackov -# license : GNU GPL v2; see accompanying LICENSE file - - -# $1 - out config file -# -# bld_root - build root -# project_name - project name -# - -source $bld_root/dialog.bash - - -$echo -$echo "Configuring external dependency on 'Berkeley DB XML' for '$project_name'." -$echo - -$echo -$echo "Would you like to configure dependency on the installed version" -$echo "of 'Berkeley DB XML' as opposed to the development build?" -$echo - -installed=`read_y_n y` - -path= -type= - -if [ "$installed" = "n" ]; then - - $echo - $echo "Please enter the 'Berkeley DB XML' root directory." - $echo - - root=`read_path --directory --exist` - - $echo - $echo "Please select the library type you would like to use:" - $echo - $echo "(1) archive" - $echo "(2) shared object" - $echo - - type=`read_option "archive shared" "shared"` - -fi - -echo libdbxml_installed := $installed >$1 - -if [ "$installed" = "n" ]; then - - echo libdbxml_root := $root >>$1 - echo libdbxml_type := $type >>$1 - -fi diff --git a/build/import/libdbxml/rules.make b/build/import/libdbxml/rules.make deleted file mode 100644 index ac8118c..0000000 --- a/build/import/libdbxml/rules.make +++ /dev/null @@ -1,42 +0,0 @@ -# file : build/import/libdbxml/rules.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2005-2009 Boris Kolpackov -# license : GNU GPL v2; see accompanying LICENSE file - -#@@ .l construction is compiler-specific -# - -$(dcf_root)/import/libdbxml/%: root := $(libdbxml_root) - -ifeq ($(libdbxml_type),archive) - -$(dcf_root)/import/libdbxml/dbxml.l: \ -$(libdbxml_root)/install/lib/libdbxml.a \ -$(libdbxml_root)/install/lib/libxqilla.a \ -$(libdbxml_root)/install/lib/libxerces-c.a \ -$(libdbxml_root)/install/lib/libdb_cxx.a \ -$(libdbxml_root)/install/lib/libdb.a - -else - -$(dcf_root)/import/libdbxml/dbxml.l: \ -$(libdbxml_root)/install/lib/libdbxml.so \ -$(libdbxml_root)/install/lib/libxqilla.so \ -$(libdbxml_root)/install/lib/libxerces-c.so \ -$(libdbxml_root)/install/lib/libdb_cxx.so \ -$(libdbxml_root)/install/lib/libdb.so - @echo $^ | xargs -n 1 echo >$@ - @echo rpath:$(root)/install/lib >>$@ -endif - -$(dcf_root)/import/libdbxml/dbxml.l.cpp-options: - @echo include: -I$(root)/install/include >$@ - -ifndef %foreign% - -disfigure:: - $(call message,rm $(dcf_root)/import/libdbxml/dbxml.l,\ -rm -f $(dcf_root)/import/libdbxml/dbxml.l) - $(call message,,rm -f $(dcf_root)/import/libdbxml/dbxml.l.cpp-options) - -endif diff --git a/build/import/libdbxml/stub.make b/build/import/libdbxml/stub.make deleted file mode 100644 index f8eb9a3..0000000 --- a/build/import/libdbxml/stub.make +++ /dev/null @@ -1,32 +0,0 @@ -# file : build/import/libdbxml/stub.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2005-2009 Boris Kolpackov -# license : GNU GPL v2; see accompanying LICENSE file - -$(call include-once,$(scf_root)/import/libdbxml/configuration-rules.make,$(dcf_root)) - -libdbxml_installed := - -$(call -include,$(dcf_root)/import/libdbxml/configuration-dynamic.make) - -ifdef libdbxml_installed - -ifeq ($(libdbxml_installed),y) - -$(call export,l: -ldbxml -lxqilla -lxerces-c -ldb_cxx -ldb,cpp-options: ) - -else - -$(call include-once,$(scf_root)/import/libdbxml/rules.make,$(dcf_root)) - -$(call export,\ - l: $(dcf_root)/import/libdbxml/dbxml.l,\ - cpp-options: $(dcf_root)/import/libdbxml/dbxml.l.cpp-options) - -endif - -else - -.NOTPARALLEL: - -endif diff --git a/build/import/libdbxml/version b/build/import/libdbxml/version deleted file mode 100644 index 9e11b32..0000000 --- a/build/import/libdbxml/version +++ /dev/null @@ -1 +0,0 @@ -0.3.1 diff --git a/dist/README-UNIX b/dist/README-UNIX index 15513de..4f83a7d 100644 --- a/dist/README-UNIX +++ b/dist/README-UNIX @@ -66,9 +66,6 @@ WITH_BOOST - Set this variable to 1 if you would like to build examples WITH_XQILLA - Set this variable to 1 if you would like to build examples that depend on the XQilla library (XPath 2) -WITH_DBXML - Set this variable to 1 if you would like to build examples - that depend on the Berkeley DB XML library - Additionally, makefiles for the C++/Parser examples (examples/cxx/parser/) allow you to choose the underlying XML parser: diff --git a/dist/README-WINDOWS b/dist/README-WINDOWS index d2e3925..ad5ffda 100644 --- a/dist/README-WINDOWS +++ b/dist/README-WINDOWS @@ -199,7 +199,6 @@ examples/cxx/tree/binary/boost - depends on the Boost serialization library examples/cxx/tree/binary/cdr - depends on the ACE library examples/cxx/tree/binary/xdr - requires a third-party XDR library examples/cxx/tree/xpath - depends on the XQilla library (XPath 2) -examples/cxx/tree/dbxml - depends on the Berkeley DB XML library Using XSD in Your Projects diff --git a/dist/examples/cxx/tree/dbxml/dbxml-10.0.sln b/dist/examples/cxx/tree/dbxml/dbxml-10.0.sln deleted file mode 100644 index fc08f1f..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-10.0.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbxml", "dbxml-10.0.vcxproj", "{96CDC9C8-FC31-40B8-BDD0-1751712ED704}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.ActiveCfg = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.Build.0 = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.ActiveCfg = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.Build.0 = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.ActiveCfg = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.Build.0 = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.ActiveCfg = Release|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj b/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj deleted file mode 100644 index 69b1d32..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj +++ /dev/null @@ -1,209 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - dbxml - {96CDC9C8-FC31-40B8-BDD0-1751712ED704} - dbxml - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - driver - driver - driver - driver - Debug\ - Debug\ - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - Release\ - Release\ - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - - - - Disabled - WIN32;_DEBUG;_CONSOLE;DBXML_DOM;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - true - - - Level3 - EditAndContinue - - - libdbxml23d.lib;libdb45d.lib;xerces-c_2D.lib;%(AdditionalDependencies) - $(TargetPath) - true - $(OutDir)driver.pdb - Console - false - - - MachineX86 - - - - - X64 - - - Disabled - WIN32;_DEBUG;_CONSOLE;DBXML_DOM;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - true - - - Level3 - ProgramDatabase - - - libdbxml23d.lib;libdb45d.lib;xerces-c_2D.lib;%(AdditionalDependencies) - $(TargetPath) - true - $(OutDir)driver.pdb - Console - false - - - MachineX64 - - - - - WIN32;NDEBUG;_CONSOLE;DBXML_DOM;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - libdbxml23.lib;libdb45.lib;xerces-c_2.lib;%(AdditionalDependencies) - $(TargetPath) - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - WIN32;NDEBUG;_CONSOLE;DBXML_DOM;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - libdbxml23.lib;libdb45.lib;xerces-c_2.lib;%(AdditionalDependencies) - $(TargetPath) - true - Console - true - true - false - - - MachineX64 - - - - - - - - - - - - xsd library.xsd - xsd cxx-tree --generate-ostream --generate-serialization library.xsd - library.hxx;library.cxx;%(Outputs) - xsd library.xsd - xsd cxx-tree --generate-ostream --generate-serialization library.xsd - library.hxx;library.cxx;%(Outputs) - xsd library.xsd - xsd cxx-tree --generate-ostream --generate-serialization library.xsd - library.hxx;library.cxx;%(Outputs) - xsd library.xsd - xsd cxx-tree --generate-ostream --generate-serialization library.xsd - library.hxx;library.cxx;%(Outputs) - - - - - - - - - \ No newline at end of file diff --git a/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj.filters b/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj.filters deleted file mode 100644 index b1f4731..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-10.0.vcxproj.filters +++ /dev/null @@ -1,38 +0,0 @@ - - - - - {19D063BE-083B-4E8A-89F8-D87CC43CB197} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {E11762CD-4895-44DE-AA13-48BC7AAFC419} - h;hpp;hxx;hm;inl;inc;xsd - - - {e64ee5c7-1fea-48c3-92f2-3b85fdd87547} - xsd - - - - - Source Files - - - Source Files - - - - - Header Files - - - - - - - - Schema Files - - - \ No newline at end of file diff --git a/dist/examples/cxx/tree/dbxml/dbxml-8.0.sln b/dist/examples/cxx/tree/dbxml/dbxml-8.0.sln deleted file mode 100644 index b217889..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-8.0.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbxml", "dbxml-8.0.vcproj", "{96CDC9C8-FC31-40B8-BDD0-1751712ED704}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.ActiveCfg = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.Build.0 = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.ActiveCfg = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.Build.0 = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.ActiveCfg = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.Build.0 = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.ActiveCfg = Release|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/dist/examples/cxx/tree/dbxml/dbxml-8.0.vcproj b/dist/examples/cxx/tree/dbxml/dbxml-8.0.vcproj deleted file mode 100644 index 68ccebf..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-8.0.vcproj +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/examples/cxx/tree/dbxml/dbxml-9.0.sln b/dist/examples/cxx/tree/dbxml/dbxml-9.0.sln deleted file mode 100644 index 89e242e..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-9.0.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbxml", "dbxml-9.0.vcproj", "{96CDC9C8-FC31-40B8-BDD0-1751712ED704}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.ActiveCfg = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|Win32.Build.0 = Debug|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.ActiveCfg = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Debug|x64.Build.0 = Debug|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.ActiveCfg = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|Win32.Build.0 = Release|Win32 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.ActiveCfg = Release|x64 - {96CDC9C8-FC31-40B8-BDD0-1751712ED704}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/dist/examples/cxx/tree/dbxml/dbxml-9.0.vcproj b/dist/examples/cxx/tree/dbxml/dbxml-9.0.vcproj deleted file mode 100644 index 7068154..0000000 --- a/dist/examples/cxx/tree/dbxml/dbxml-9.0.vcproj +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/examples/cxx/tree/dbxml/makefile b/dist/examples/cxx/tree/dbxml/makefile deleted file mode 100644 index 501bddf..0000000 --- a/dist/examples/cxx/tree/dbxml/makefile +++ /dev/null @@ -1,33 +0,0 @@ -root := ../../.. - -include $(root)/build/cxx/rules.make -include $(root)/build/xsd/tree-rules.make - - -override XSDFLAGS += --generate-ostream --generate-serialization -override CPPFLAGS += -DDBXML_DOM -override LIBS += -ldbxml -lxqilla -ldb_cxx -ldb - - -# Build. -# -driver: driver.o library.o - -library.o: library.cxx library.hxx -driver.o: driver.cxx library.hxx - -library.cxx library.hxx: library.xsd - - -# Test -# -.PHONY: test -test: driver - ./driver - - -# Clean. -# -.PHONY: clean -clean: - rm -f library.o library.?xx driver.o driver new.dbxml diff --git a/dist/examples/cxx/tree/makefile b/dist/examples/cxx/tree/makefile index 8c23fef..70226f9 100644 --- a/dist/examples/cxx/tree/makefile +++ b/dist/examples/cxx/tree/makefile @@ -5,10 +5,6 @@ ifeq ($(WITH_ZLIB),1) dirs += compression endif -ifeq ($(WITH_DBXML),1) -dirs += dbxml -endif - ifeq ($(WITH_XQILLA),1) dirs += xpath endif diff --git a/documentation/cxx/tree/dbxml/driver.cxx b/documentation/cxx/tree/dbxml/driver.cxx deleted file mode 120000 index 54d4313..0000000 --- a/documentation/cxx/tree/dbxml/driver.cxx +++ /dev/null @@ -1 +0,0 @@ -../../../../examples/cxx/tree/dbxml/driver.cxx \ No newline at end of file diff --git a/documentation/cxx/tree/dbxml/index.xhtml b/documentation/cxx/tree/dbxml/index.xhtml deleted file mode 100644 index dc88083..0000000 --- a/documentation/cxx/tree/dbxml/index.xhtml +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - C++/Tree Mapping and Berkeley DB XML Integration Guide - - - - - - - - - - - -
-
- -

Introduction

- -

This guide shows how to integrate the - C++/Tree - mapping generated by - CodeSynthesis XSD - with - Berkeley DB XML. - - Berkeley DB XML is an embedded XML database which allows efficient - storage and query of XML instance documents. - - CodeSynthesis XSD is a W3C XML Schema to C++ data binding compiler. - - The C++/Tree mapping allows you to manipulate the data stored in XML - using objects that semantically correspond to your application - domain rather than dealing with direct representations of XML. - - For an introduction to - the Berkeley DB XML refer to the - Berkeley DB XML - Getting Started Guide. - For an introduction to the C++/Tree mapping refer to - the C++/Tree Mapping Getting Started Guide. -

- - -

This guide describes the following four operations:

- -
    -
  • Create a new document in DB from an object model
  • -
  • Create an object model from a document in DB
  • -
  • Create an object model from a document fragment in DB
  • -
  • Update a document fragment in DB from an object model
  • -
- -

Our examples will be based on simple XML for book library. The XML - Schema definition for the library is in - library.xsd and is compiled by XSD - to obtain library.hxx and library.cxx. - All C++ code fragments that are presented in this guide are available - as a single program in driver.cxx. - The complete example is available in the - examples/cxx/tree/dbxml directory of the XSD distribution.

- -

Note that due to the incomplete DOM API implementation provided by DB - XML (as of version 2.3.10), the generated code and your application - should be compiled with the DBXML_DOM macro defined in - order to avoid using unsupported parts of the API. -

- -

A sample XML document for the library schema is presented below:

- -
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library">
-  <book available="true" id="ES">
-    <isbn>20530902</isbn>
-    <title>The Elements of Style</title>
-    <genre>reference</genre>
-
-    <author>
-      <name>William Strunk, Jr.</name>
-      <born>1869-07-01</born>
-      <died>1946-09-26</died>
-    </author>
-
-    <author>
-      <name>E.B. White</name>
-      <born>1899-07-11</born>
-      <died>1985-10-01</died>
-    </author>
-  </book>
-</lib:catalog>
-  
- -

Create Document from Object Model

- -

In this step, we will programmatically create a book catalog - with one book, save it into an XmlDocument object - using one of the serialization functions generated by XSD ( - catalog_ in our case), and store the - XmlDocument object as a new document in the - DB container:

- -
-XmlManager manager;
-XmlContainer container (manager.createContainer ("new.bdbxml"));
-XmlUpdateContext update_context (manager.createUpdateContext ());
-XmlQueryContext context (manager.createQueryContext ());
-context.setNamespace ("lib", "http://www.codesynthesis.com/library");
-
-// Create a new catalog with one book.
-//
-catalog c;
-
-book b (20530902,                        // ISBN
-        title ("The Elements of Style"), // Title
-        genre::reference,                // Genre
-        "ES");                           // ID
-
-author strunk ("William Strunk, Jr.", date (1869, 7, 1));
-strunk.died (date (1946, 9, 26));
-
-b.author ().push_back (strunk);
-c.book ().push_back (b);
-
-// Create a new XML document.
-//
-XmlDocument doc (manager.createDocument ());
-doc.setName ("new.xml");
-
-// Obtain its DOM representation and add the root element.
-//
-xercesc::DOMDocument& dom_doc (*doc.getContentAsDOM ());
-
-dom_doc.appendChild (
-  dom_doc.createElementNS (
-    xml::string ("http://www.codesynthesis.com/library").c_str (),
-    xml::string ("lib:catalog").c_str ()));
-
-// Serialize the object model to the XML document. Also avoid
-// re-initializing the Xerces-C++ runtime since XmlManager has
-// it initialized.
-//
-catalog_ (dom_doc, c, xml_schema::flags::dont_initialize);
-
-// Place the document into the container.
-//
-container.putDocument (doc, update_context);
-  
- -

If we now resolve the new.xml in the container and - print its content, we will get:

- -
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library">
-  <book available="true" id="ES">
-    <isbn>20530902</isbn>
-    <title>The Elements of Style</title>
-    <genre>reference</genre>
-    <author>
-      <name>William Strunk, Jr.</name>
-      <born>1869-07-01</born>
-      <died>1946-09-26</died>
-    </author>
-  </book>
-</lib:catalog>
-  
- -

Create Object Model from Document

- -

Creating an object model from a document is a matter - of obtaining XmlDocument object and passing its DOM - representation to one of the parsing functions generated by XSD - (catalog_ in our case): -

- -
-// Resolve the document in the container.
-//
-XmlDocument doc (container.getDocument ("new.xml"));
-
-// Create the object model from the document's DOM. Also avoid
-// re-initializing the Xerces-C++ runtime since XmlManager has
-// it initialized.
-//
-auto_ptr<catalog> c (catalog_ (*doc.getContentAsDOM (),
-                               xml_schema::flags::dont_initialize));
-
-cerr << *c << endl;
-  
- -

This code fragment prints:

- -
-book:
-isbn: 20530902
-title: The Elements of Style
-genre: reference
-author:
-name: William Strunk, Jr.
-born: 1869-07-01
-died: 1946-09-26
-available: 1
-id: ES
-  
- -

Create Object Model from Document Fragment

- -

The following code fragment looks up the book with id "ES" - using XQuery. It then creates a book object from the - resulting XmlValue:

- -
-string query ("collection('new.bdbxml')/lib:catalog/book[@id='ES']");
-
-// Find "The Elements of Style".
-//
-XmlValue v;
-XmlResults results (manager.query (query, context));
-
-if (results.next (v))
-{
-  // Create an object model from the document fragment.
-  //
-  auto_ptr<book> b (
-    new book (
-      *static_cast<xercesc::DOMElement*> (v.asNode ())));
-
-  cerr << *b << endl;
-}
-  
- -

This code fragment prints:

- -
-isbn: 20530902
-title: The Elements of Style
-genre: reference
-author:
-name: William Strunk, Jr.
-born: 1869-07-01
-died: 1946-09-26
-available: 1
-id: ES
-  
- -

Note that we had to perform a static_cast from - xercesc::DOMNode - returned by the XmlValue::asNode member function to - xercesc::DOMElement. This is safe since we know - that in our schema books are represented as XML elements.

- -

Update Document Fragment from Object Model

- -

Analogous to the create case, the following code fragment looks - up the book with id "ES" using XQuery. It then creates - a book object from the resulting XmlValue, - adds another author, changes the availability status, and saves - the changes back to the XmlValue object: -

- -
-string query ("collection('new.bdbxml')/lib:catalog/book[@id='ES']");
-
-// Find "The Elements of Style".
-//
-XmlValue v;
-XmlResults results (manager.query (query, context));
-
-if (results.next (v))
-{
-  // Create an object model from the document fragment.
-  //
-  auto_ptr<book> b (
-    new book (
-      *static_cast<xercesc::DOMElement*> (v.asNode ())));
-
-  // Add another author, change the availability status.
-  //
-  author white ("E.B. White", date (1899, 7, 11));
-  white.died (date (1985, 10, 1));
-
-  b->author ().push_back (white);
-  b->available (false);
-
-  // Update the document fragment from the object model.
-  //
-  *static_cast<xercesc::DOMElement*> (v.asNode ()) << *b;
-
-  // Update the document in the container.
-  //
-  XmlDocument doc (v.asDocument ());
-  container.updateDocument (doc, update_context);
-}
-  
- -

If we now resolve the new.xml in the container and - print its content, we will get:

- -
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library">
-  <book available="false" id="ES">
-    <isbn>20530902</isbn>
-    <title>The Elements of Style</title>
-    <genre>reference</genre>
-    <author>
-      <name>William Strunk, Jr.</name>
-      <born>1869-07-01</born>
-      <died>1946-09-26</died>
-    </author>
-    <author>
-      <name>E.B. White</name>
-      <born>1899-07-11</born>
-      <died>1985-10-01</died>
-    </author>
-  </book>
-</lib:catalog>
-  
- -
- - -
- - - diff --git a/documentation/cxx/tree/dbxml/library.xsd b/documentation/cxx/tree/dbxml/library.xsd deleted file mode 120000 index 636c490..0000000 --- a/documentation/cxx/tree/dbxml/library.xsd +++ /dev/null @@ -1 +0,0 @@ -../../../../examples/cxx/tree/dbxml/library.xsd \ No newline at end of file diff --git a/documentation/cxx/tree/guide/index.xhtml b/documentation/cxx/tree/guide/index.xhtml index 4f76818..7d2ac54 100644 --- a/documentation/cxx/tree/guide/index.xhtml +++ b/documentation/cxx/tree/guide/index.xhtml @@ -298,9 +298,6 @@
  • C++/Tree Mapping Customization Guide
  • -
  • C++/Tree - Mapping and Berkeley DB XML Integration Guide
  • -
  • C++/Tree Mapping Frequently Asked Questions (FAQ)
  • @@ -318,7 +315,6 @@ mailing list is the place to ask technical questions about XSD and the C++/Parser mapping. Furthermore, the archives may already have answers to some of your questions. - @@ -344,18 +340,17 @@ mapping elements that can be useful in some applications. These include serialization and extraction to/from formats others than XML, such as unstructured text (useful for debugging) and binary - representations such as XDR and CDR for high-speed data processing, - integration with XML databases such as Berkeley DB XML, and automatic - documentation generation. The C++/Tree mapping also provides a wide - range of mechanisms for controlling and customizing the generated - code.

    - -

    A typical application that uses C++/Tree for XML processing usually - performs the following three steps: it first reads (parses) an XML - document to an in-memory object model, it then performs some useful - computations on that object model which may involve modification - of the model, and finally it may write (serialize) the modified - object model back to XML.

    + representations such as XDR and CDR for high-speed data processing + as well as automatic documentation generation. The C++/Tree mapping + also provides a wide range of mechanisms for controlling and + customizing the generated code.

    + +

    A typical application that uses C++/Tree for XML processing usually + performs the following three steps: it first reads (parses) an XML + document to an in-memory object model, it then performs some useful + computations on that object model which may involve modification + of the model, and finally it may write (serialize) the modified + object model back to XML.

    The next chapter presents a simple application that performs these three steps. The following chapters show how to use the C++/Tree diff --git a/documentation/cxx/tree/makefile b/documentation/cxx/tree/makefile index 5ca3924..e14bf68 100644 --- a/documentation/cxx/tree/makefile +++ b/documentation/cxx/tree/makefile @@ -25,11 +25,9 @@ $(install): path := $(subst $(src_root)/documentation/,,$(src_base)) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) $(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(docs))) - $(call install-dir,$(src_base)/dbxml,$(install_doc_dir)/xsd/$(path)/dbxml) $(call install-dir,$(src_base)/reference,$(install_doc_dir)/xsd/$(path)/reference) $(dist-common): - $(call install-dir,$(src_base)/dbxml,$(dist_prefix)/$(path)/dbxml) $(call install-dir,$(src_base)/reference,$(dist_prefix)/$(path)/reference) $(dist): $(dist-common) $(addprefix $(out_base)/,$(addsuffix /.dist,$(docs))) diff --git a/documentation/cxx/tree/manual/index.xhtml b/documentation/cxx/tree/manual/index.xhtml index eb41bb8..d022919 100644 --- a/documentation/cxx/tree/manual/index.xhtml +++ b/documentation/cxx/tree/manual/index.xhtml @@ -460,9 +460,6 @@

  • C++/Tree Mapping Customization Guide
  • -
  • C++/Tree - Mapping and Berkeley DB XML Integration Guide
  • -
  • C++/Tree Mapping Frequently Asked Questions (FAQ)
  • @@ -480,7 +477,6 @@ mailing list is a place to ask questions. Furthermore the archives may already have answers to some of your questions. - diff --git a/examples/cxx/tree/README b/examples/cxx/tree/README index 348885f..ee91b43 100644 --- a/examples/cxx/tree/README +++ b/examples/cxx/tree/README @@ -74,7 +74,3 @@ compression binary/ A collection of examples that show how to serialize the object model into a number of predefined and custom binary formats. - -dbxml - Shows how to use the C++/Tree mapping on top of the Berkeley DB - XML embedded XML database. diff --git a/examples/cxx/tree/dbxml/README b/examples/cxx/tree/dbxml/README deleted file mode 100644 index 59e67d0..0000000 --- a/examples/cxx/tree/dbxml/README +++ /dev/null @@ -1,45 +0,0 @@ -This example shows how to use the C++/Tree mapping on top of the Berkeley -DB XML embedded XML database. This example is described in detail in the -"C++/Tree Mapping and Berkeley DB XML Integration Guide" which can be -found in the documentation/cxx/tree/dbxml directory of the XSD -distribution. - -You will need the Berkeley DB XML libraries[1] installed in order to build -and run this example. The makefiles and project files for this example link -to the DB XML library names corresponding to version 2.3.X. Earlier and later -versions can also be used but may require adjustments to the library names -being linked to. - -Note that due to the incomplete DOM API implementation provided by DB -XML (as of version 2.3.10), the generated code and your application -should be compiled with the DBXML_DOM macro defined in order to avoid -using unsupported parts of the API. - -The example consists of the following files: - -library.xsd - XML Schema which describes a library of books. - -library.hxx -library.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 library.xsd. - -driver.cxx - Driver for the example. It performs the following four operations on - the database: - - * Create a new document in DB from an object model - * Create an object model from a document in DB - * Create an object model from a document fragment in DB - * Update a document fragment in DB from an object model - - -To run the example simply execute: - -$ ./driver - - -[1] http://www.sleepycat.com/products/bdbxml.html diff --git a/examples/cxx/tree/dbxml/driver.cxx b/examples/cxx/tree/dbxml/driver.cxx deleted file mode 100644 index 56cbb4a..0000000 --- a/examples/cxx/tree/dbxml/driver.cxx +++ /dev/null @@ -1,175 +0,0 @@ -// file : examples/cxx/tree/dbxml/driver.cxx -// author : Boris Kolpackov -// copyright : not copyrighted - public domain - -#include // std::auto_ptr -#include -#include -#include - -#include - -#include "library.hxx" - -using std::cerr; -using std::endl; -using std::string; -using std::auto_ptr; - -using namespace DbXml; -using namespace xsd::cxx; // for xml::string - -void -print_document (const string& desc, - XmlContainer container, - const string& name) -{ - XmlDocument doc (container.getDocument (name)); - - string content; - doc.getContent (content); - - cerr << endl - << desc << endl - << content << endl; -} - -int -main () -{ - try - { - using namespace library; - using xml_schema::date; - - XmlManager manager; - - { - XmlContainer container (manager.createContainer ("new.bdbxml")); - - XmlUpdateContext update_context (manager.createUpdateContext ()); - - XmlQueryContext context (manager.createQueryContext ()); - context.setNamespace ("lib", "http://www.codesynthesis.com/library"); - - - // Create a new document from an object model. - // - { - // Create a new catalog with one book. - // - catalog c; - - book b (20530902, // ISBN - "The Elements of Style", // Title - genre::reference, // Genre - "ES"); // ID - - author strunk ("William Strunk, Jr.", date (1869, 7, 1)); - strunk.died (date (1946, 9, 26)); - - b.author ().push_back (strunk); - c.book ().push_back (b); - - - // Create a new XML document. - // - XmlDocument doc (manager.createDocument ()); - doc.setName ("new.xml"); - - - // Obtain its DOM representation and add the root element. - // - xercesc::DOMDocument& dom_doc (*doc.getContentAsDOM ()); - - dom_doc.appendChild ( - dom_doc.createElementNS ( - xml::string ("http://www.codesynthesis.com/library").c_str (), - xml::string ("lib:catalog").c_str ())); - - - // Serialize the object model to the XML document. Also avoid - // re-initializing the Xerces-C++ runtime since XmlManager has - // it initialized. - // - catalog_ (dom_doc, c, xml_schema::flags::dont_initialize); - - - // Place the document into the container. - // - container.putDocument (doc, update_context); - - print_document ("after create:", container, "new.xml"); - } - - // Create an object model from a document in DB. - // - { - // Resolve the document in the container. - // - XmlDocument doc (container.getDocument ("new.xml")); - - - // Create the object model from the document's DOM. Also avoid - // re-initializing the Xerces-C++ runtime since XmlManager has - // it initialized. - // - auto_ptr c (catalog_ (*doc.getContentAsDOM (), - xml_schema::flags::dont_initialize)); - - cerr << *c << endl; - } - - - // Lookup a document fragment. - // - - string query ("collection('new.bdbxml')/lib:catalog/book[@id='ES']"); - - // Find "The Elements of Style". - // - XmlValue v; - XmlResults results (manager.query (query, context)); - - if (results.next (v)) - { - // Create an object model from the document fragment. - // - auto_ptr b ( - new book ( - *static_cast (v.asNode ()))); - - cerr << *b << endl; - - - // Add another author, change the availability status. - // - author white ("E.B. White", date (1899, 7, 11)); - white.died (date (1985, 10, 1)); - - b->author ().push_back (white); - b->available (false); - - - // Update the document fragment from the object model. - // - *static_cast (v.asNode ()) << *b; - - - // Update the document in the container. - // - XmlDocument doc (v.asDocument ()); - container.updateDocument (doc, update_context); - } - - print_document ("after update:", container, "new.xml"); - } - - manager.removeContainer ("new.bdbxml"); - } - catch (const std::exception& e) - { - cerr << e.what () << endl; - return 1; - } -} diff --git a/examples/cxx/tree/dbxml/library.xsd b/examples/cxx/tree/dbxml/library.xsd deleted file mode 100644 index c71c312..0000000 --- a/examples/cxx/tree/dbxml/library.xsd +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/cxx/tree/dbxml/makefile b/examples/cxx/tree/dbxml/makefile deleted file mode 100644 index a27088c..0000000 --- a/examples/cxx/tree/dbxml/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : examples/cxx/tree/dbxml/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC -# license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make - -xsd := library.xsd -cxx := driver.cxx - -obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o)) -dep := $(obj:.o=.o.d) - -driver := $(out_base)/driver -install := $(out_base)/.install -dist := $(out_base)/.dist -dist-win := $(out_base)/.dist-win -clean := $(out_base)/.clean - - -# Import. -# -$(call import,\ - $(scf_root)/import/libxerces-c/stub.make,\ - l: xerces_c.l,cpp-options: xerces_c.l.cpp-options) - -ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),) -$(call import,\ - $(scf_root)/import/libdbxml/stub.make,\ - l: dbxml.l,cpp-options: dbxml.l.cpp-options) -endif - - -# Build. -# -$(driver): $(obj) $(xerces_c.l) $(dbxml.l) - -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd -DDBXML_DOM -$(obj) $(dep): $(xerces_c.l.cpp-options) $(dbxml.l.cpp-options) - -genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-serialization --generate-ostream -$(gen): $(out_root)/xsd/xsd - -$(call include-dep,$(dep)) - -# Convenience alias for default target. -# -$(out_base)/: $(driver) - - -# Install & Dist. -# -dist-common := $(out_base)/.dist-common - -$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) - -$(install): - $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README) - $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx) - $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd) - -$(dist-common): - $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) - $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd) - -$(dist): $(dist-common) - $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) - -$(dist-win): $(dist-common) - $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) - $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) - - -# Clean. -# -$(clean): $(driver).o.clean \ - $(addsuffix .cxx.clean,$(obj)) \ - $(addsuffix .cxx.clean,$(dep)) \ - $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean)) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(gen): | $(out_base)/.gitignore -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/cxx/o-e.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/install.make) -$(call include,$(scf_root)/xsd/tree/xsd-cxx.make) - -# Dependencies. -# -$(call import,$(src_root)/xsd/makefile) diff --git a/examples/cxx/tree/makefile b/examples/cxx/tree/makefile index fcf6db3..2532acb 100644 --- a/examples/cxx/tree/makefile +++ b/examples/cxx/tree/makefile @@ -7,7 +7,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make all_examples := binary caching embedded custom hello library messaging \ mixed multiroot performance polymorphism streaming wildcard compression \ -dbxml xpath +xpath build_examples := binary caching embedded custom hello library messaging \ @@ -17,10 +17,6 @@ ifeq ($(xsd_with_zlib),y) build_examples += compression endif -ifeq ($(xsd_with_dbxml),y) -build_examples += dbxml -endif - ifeq ($(xsd_with_xqilla),y) build_examples += xpath endif diff --git a/libxsd/xsd/cxx/tree/text.txx b/libxsd/xsd/cxx/tree/text.txx index 1aab8fe..daf8693 100644 --- a/libxsd/xsd/cxx/tree/text.txx +++ b/libxsd/xsd/cxx/tree/text.txx @@ -31,14 +31,7 @@ namespace xsd n->getNextSibling () == 0) { DOMText* t (static_cast (n)); - - // Berkeley DB XML DOM does not implement getLength(). - // -#ifndef DBXML_DOM return xml::transcode (t->getData (), t->getLength ()); -#else - return xml::transcode (t->getData ()); -#endif } std::basic_string r; @@ -51,14 +44,7 @@ namespace xsd case DOMNode::CDATA_SECTION_NODE: { DOMText* t (static_cast (n)); - - // Berkeley DB XML DOM does not implement getLength(). - // -#ifndef DBXML_DOM r += xml::transcode (t->getData (), t->getLength ()); -#else - r += xml::transcode (t->getData ()); -#endif break; } case DOMNode::ELEMENT_NODE: -- cgit v1.1