You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(18) |
Dec
(18) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(8) |
Feb
(8) |
Mar
|
Apr
(2) |
May
(8) |
Jun
(5) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
| 2010 |
Jan
|
Feb
(4) |
Mar
(8) |
Apr
(6) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(39) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vac...@us...> - 2008-11-25 16:03:03
|
Revision: 100
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=100&view=rev
Author: vaclavslavik
Date: 2008-11-25 16:03:00 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
fixed Automake warning about different definitions of LIBS
Modified Paths:
--------------
trunk/tests/xslt/Makefile.am
Modified: trunk/tests/xslt/Makefile.am
===================================================================
--- trunk/tests/xslt/Makefile.am 2008-11-25 16:02:25 UTC (rev 99)
+++ trunk/tests/xslt/Makefile.am 2008-11-25 16:03:00 UTC (rev 100)
@@ -1,9 +1,9 @@
-if WITH_XSLT
-
AM_CPPFLAGS = -I$(top_srcdir)/include
LIBS = ../../src/libxsltwrapp.la ../../src/libxmlwrapp.la
+if WITH_XSLT
+
TESTS = runtest.pl
noinst_PROGRAMS = \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-25 16:02:31
|
Revision: 99
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=99&view=rev
Author: vaclavslavik
Date: 2008-11-25 16:02:25 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
config.h is not used anymore and so autoheader isn't needed either
Modified Paths:
--------------
trunk/bootstrap
Modified: trunk/bootstrap
===================================================================
--- trunk/bootstrap 2008-11-25 15:50:51 UTC (rev 98)
+++ trunk/bootstrap 2008-11-25 16:02:25 UTC (rev 99)
@@ -50,7 +50,6 @@
echo " - aclocal " && aclocal ${wx+-I} $wx && \
echo " - libtoolize " && libtoolize --copy --automake && \
echo " - autoconf " && autoconf && \
-echo " - autoheader " && autoheader && \
echo " - automake " && automake --add-missing --copy --foreign && \
echo "Build setup successful, type \"configure\" to configure xmlwrapp now." && \
exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-25 15:50:57
|
Revision: 98
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=98&view=rev
Author: vaclavslavik
Date: 2008-11-25 15:50:51 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
ported Unix build system to Autotools
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libxml/document.cxx
Added Paths:
-----------
trunk/Makefile.am
trunk/admin/
trunk/bootstrap
trunk/configure.ac
trunk/examples/01-tree_parsing/Makefile.am
trunk/examples/02-event_parsing/Makefile.am
trunk/examples/03-xml_generation/Makefile.am
trunk/examples/04-xslt/Makefile.am
trunk/examples/Makefile.am
trunk/include/Makefile.am
trunk/src/Makefile.am
trunk/tests/Makefile.am
trunk/tests/attributes/Makefile.am
trunk/tests/document/Makefile.am
trunk/tests/event/Makefile.am
trunk/tests/node/Makefile.am
trunk/tests/tree/Makefile.am
trunk/tests/xslt/Makefile.am
trunk/xmlwrapp-config.in
trunk/xmlwrapp.pc.in
Removed Paths:
-------------
trunk/configure.pl
trunk/tools/cxxflags
trunk/tools/genconfig
trunk/tools/mkmf
Property Changed:
----------------
trunk/
trunk/examples/
trunk/examples/01-tree_parsing/
trunk/examples/02-event_parsing/
trunk/examples/03-xml_generation/
trunk/examples/04-xslt/
trunk/include/
trunk/src/
trunk/tests/
trunk/tests/attributes/
trunk/tests/document/
trunk/tests/event/
trunk/tests/node/
trunk/tests/tree/
trunk/tests/xslt/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- Makefile
README.xmlwrapp_sourceforge
*.pdf
*.ps
xmlwrapp-config
xmlwrapp.pc
docbookmk-0.0.11.tar.gz
download
t
t.pdf
t.ps
t.txt
packxmlwrapp.pl
xmlwrapp.carry
xmlwrapp_exclude.pm
tmp
+ Makefile
Makefile.in
xmlwrapp-config
xmlwrapp.pc
config.log
config.status
stamp-h1
libtool
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-24 02:37:42 UTC (rev 97)
+++ trunk/ChangeLog 2008-11-25 15:50:51 UTC (rev 98)
@@ -3,6 +3,8 @@
Fixed libxmlwrapp to not depend on libxslt if XSLT support
is enabled (Vadim Zeitlin, #1927398).
+ Ported Unix build system to Autotools.
+
Version 0.5.1
Various compilation fixes.
Added: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am (rev 0)
+++ trunk/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,7 @@
+
+SUBDIRS = include src examples tests
+
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA = xmlwrapp.pc
+
+bin_SCRIPTS = xmlwrapp-config
Property changes on: trunk/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/admin
___________________________________________________________________
Added: svn:ignore
+ depcomp
missing
config.guess
ltmain.sh
config.sub
install-sh
Added: trunk/bootstrap
===================================================================
--- trunk/bootstrap (rev 0)
+++ trunk/bootstrap 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Script to execute to initialize xmlwrapp build system after checking out
+# pristine sources from a version control system: this script creates all
+# generated files which are needed for the build but not stored under version
+# control.
+
+# Copyright (C) 2005, 2006, 2007, 2008 Vadim Zeitlin
+# All Rights Reserved
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Author nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+# $Id$
+
+if [ ! -f configure.ac -o ! -f Makefile.am -o ! -f xmlwrapp.pc.in ]; then
+ echo "Please run this script from the xmlwrapp source directory."
+ exit 2
+fi
+
+# use --foreign with automake because we lack standard GNU NEWS and AUTHOR
+# files, if they're added we can "upgrade" to (default) GNU strictness. Use
+# --copy to allow simultaneous use on windows under mingw and cygwin platforms.
+# Symlinking of files under mingw does not work out for cygwin and vice-versa.
+echo "Setting up build system for xmlwrapp:"
+echo " - aclocal " && aclocal ${wx+-I} $wx && \
+echo " - libtoolize " && libtoolize --copy --automake && \
+echo " - autoconf " && autoconf && \
+echo " - autoheader " && autoheader && \
+echo " - automake " && automake --add-missing --copy --foreign && \
+echo "Build setup successful, type \"configure\" to configure xmlwrapp now." && \
+exit 0
+
+echo "Automatic build files setup failed!"
+
+exit 1
Property changes on: trunk/bootstrap
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/configure.ac
===================================================================
--- trunk/configure.ac (rev 0)
+++ trunk/configure.ac 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,125 @@
+dnl configure.ac script for xmlwrapp, process with autoconf to create configure
+dnl
+dnl Copyright (C) 2008 Vaclav Slavik <vs...@fa...>,
+dnl 2008 Vadim Zeitlin <va...@tt...>
+dnl All Rights Reserved
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl
+dnl 1. Redistributions of source code must retain the above copyright
+dnl notice, this list of conditions and the following disclaimer.
+dnl 2. Redistributions in binary form must reproduce the above copyright
+dnl notice, this list of conditions and the following disclaimer in
+dnl the documentation and/or other materials provided with the
+dnl distribution.
+dnl 3. Neither the name of the Author nor the names of its contributors
+dnl may be used to endorse or promote products derived from this software
+dnl without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+dnl USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+dnl AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+dnl OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+dnl SUCH DAMAGE.
+
+dnl === Prologue ===
+
+AC_REVISION($Id$)dnl
+
+AC_PREREQ(2.56)
+AC_INIT(xmlwrapp, 0.6.0, [xml...@li...])
+
+AC_CONFIG_SRCDIR([xmlwrapp.pc.in])
+AC_CONFIG_AUX_DIR([admin])
+
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+
+dnl remember, "build" is where we compile, "host" is where the resulting
+dnl program runs (which may be different from "build" for cross-compilation)
+AC_CANONICAL_HOST
+
+
+dnl === Command line options ===
+
+AC_ARG_ENABLE(xslt,
+ [AC_HELP_STRING([--disable-xslt],
+ [don't build libxsltwrapp library])],
+ [case "x${enableval}" in
+ x) build_xslt=no ;;
+ xyes) build_xslt=yes ;;
+ xno) build_xslt=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-xslt) ;;
+ esac],
+ [build_xslt=yes])
+
+
+dnl === Program checks ===
+
+AC_PROG_CXX
+AC_PROG_LD
+AC_PROG_LIBTOOL
+
+
+dnl === Library checks ===
+
+dnl use C++ compiler as we're checking for C++ libraries/headers from now on
+dnl (we couldn't do it before as libtool tests must be done with C compiler)
+AC_LANG(C++)
+
+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.4.28])
+
+if test "x$build_xslt" = "xyes" ; then
+ PKG_CHECK_MODULES(LIBXSLT, [libxslt >= 1.0.23])
+ PKG_CHECK_MODULES(LIBEXSLT, [libexslt])
+fi
+
+
+dnl === Compiler-specific stuff ===
+
+if test "x$GCC" == "xyes"; then
+ dnl Enable some useful warnings that GCC supports:
+ CXXFLAGS="$CXXFLAGS -W -Wall -Wcast-align -Wwrite-strings"
+fi
+
+
+dnl === Generate output files ===
+
+XMLWRAPP_LINK_FLAGS="-lxmlwrapp $LIBXML_LIBS"
+if test "x$build_xslt" = "xyes" ; then
+ XMLWRAPP_LINK_FLAGS="-lxsltwrapp $LIBEXSLT_LIBS $LIBXSLT_LIBS $XMLWRAPP_LINK_FLAGS"
+fi
+
+AM_CONDITIONAL(WITH_XSLT, [ test "x$build_xslt" = "xyes" ])
+
+AC_SUBST(XMLWRAPP_LINK_FLAGS)
+
+AC_CONFIG_FILES([
+ xmlwrapp.pc
+ xmlwrapp-config
+ Makefile
+ include/Makefile
+ src/Makefile
+ examples/Makefile
+ examples/01-tree_parsing/Makefile
+ examples/02-event_parsing/Makefile
+ examples/03-xml_generation/Makefile
+ examples/04-xslt/Makefile
+ tests/Makefile
+ tests/attributes/Makefile
+ tests/document/Makefile
+ tests/event/Makefile
+ tests/node/Makefile
+ tests/tree/Makefile
+ tests/xslt/Makefile
+])
+AC_OUTPUT
Deleted: trunk/configure.pl
===================================================================
--- trunk/configure.pl 2008-11-24 02:37:42 UTC (rev 97)
+++ trunk/configure.pl 2008-11-25 15:50:51 UTC (rev 98)
@@ -1,600 +0,0 @@
-#! /usr/bin/perl
-######################################################################
-# Copyright (C) 2001-2003 Peter J Jones (pj...@pm...)
-# All Rights Reserved
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of the Author nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
-# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-################################################################################
-#
-# configure.pl (bootstrap xmlwrapp)
-# Peter J Jones (pj...@pm...)
-#
-################################################################################
-#
-# Includes
-#
-################################################################################
-use strict;
-use Getopt::Long;
-use Cwd qw(cwd chdir);
-################################################################################
-#
-# Constants
-#
-################################################################################
-use constant DATE => 'Tue Jan 15 08:56:06 2002';
-use constant ID => '$Id: configure.pl,v 1.6 2005-11-15 21:30:43 tbrowder2 Exp $';
-################################################################################
-#
-# Global Variables
-#
-################################################################################
-$Getopt::Long::bundling = 1;
-
-my $cwd = cwd();
-my %clo;
-my $dirsep = "/";
-
-my $mkmf = "${cwd}${dirsep}tools${dirsep}mkmf";
-my $cxxflags = "${cwd}${dirsep}tools${dirsep}cxxflags";
-my $genconfig = "${cwd}${dirsep}tools${dirsep}genconfig";
-my $master_inc = "${cwd}${dirsep}include";
-
-my $mkmf_flags;
-my $libname = "xmlwrapp";
-my $install_spec= "docs${dirsep}install.spec";
-my $src_sub_dir = 'libxml';
-my @test_dirs = qw(tree event node document attributes);
-my $xmlwrapp_ver;
-my $xmlwrapp_mjr;
-
-my $xslt_libname = "xsltwrapp";
-my $xslt_sub_dir = 'libxslt';
-my $xsltwrapp_okay = 0;
-my $xsltwrapp_mjr;
-
-my $have_pkg_config = 0;
-my @external_libs;
-my @external_incs;
-################################################################################
-#
-# Code Start
-#
-################################################################################
-$|++;
-
-if (not defined $ENV{'CXX'}) {
- print STDERR "**** Your CXX environment variable is not set. ****\n";
- print STDERR "**** xmlwrapp needs this variable to find your C++ compiler. ****\n";
- exit;
-}
-
-GetOptions(
- \%clo,
-
- 'help|h',
-
- 'developer|d',
- 'contrib',
-
- 'xml2-config=s',
- 'xslt-config=s',
-
- 'disable-shared',
- 'disable-examples',
- 'enable-tests|t',
- 'disable-xslt',
-
- 'prefix=s',
- 'bindir=s',
- 'libdir=s',
- 'incdir=s',
-) or usage();
-$clo{'help'} && usage();
-
-sub usage {
- print "Usage: $0 [options]\n", <<EOT;
- -h, --help This message
- --developer Turn on features for a xmlwrapp developer
- --contrib Configure for being bundled inside another project
- --disable-shared Don't build a shared library
- --disable-examples Don't build the example programs
- --enable-tests Enable the building of test programs
-
- --xml2-config file Run file to get info about libxml2 [xml2-config]
-
- --prefix path Set install prefix to path [/usr/local]
- --bindir path Set bin install location to path [PREFIX/bin]
- --libdir path Set lib install location to path [PREFIX/lib]
- --incdir path Set include install location to path [PREFIX/include]
-EOT
- exit 1;
-}
-
-# set some defaults
-$clo{'prefix'} ||= "/usr/local";
-$clo{'bindir'} ||= "$clo{'prefix'}${dirsep}bin";
-$clo{'libdir'} ||= "$clo{'prefix'}${dirsep}lib";
-$clo{'incdir'} ||= "$clo{'prefix'}${dirsep}include";
-$clo{'disable-shared'} = 1 if $clo{'contrib'};
-
-if ($clo{'contrib'}) {
- $clo{'disable-shared'} = 1;
- $clo{'disable-examples'} = 1;
-}
-
-# setup defaults for mkmf
-$mkmf_flags = "--include $master_inc --cxxflags $cxxflags --quiet ";
-if ($clo{'developer'}) {$mkmf_flags .= " --developer";}
-
-# look for libxml2
-if ($clo{'disable-xslt'} or check_libxslt() != 1) {
- check_libxml2();
-}
-
-# find out the current version
-parse_version_file();
-
-# generate the config script
-generate_config_script();
-
-# generate the xmlwrapp_config.h header
-generate_config_header();
-
-# start generating makefiles
-generate_top_makefile();
-generate_test_makefiles();
-generate_example_makefiles();
-generate_src_makefiles();
-
-if (!$clo{'contrib'}) {
- print "+---------------------------------------------------------------+\n";
- print "| Join the users mailing list for help with xmlwrapp. |\n";
- print "| Visit 'http://sourceforge.net/projects/xmlwrapp'. |\n";
- print "| Click on 'Lists'. |\n";
- print "+---------------------------------------------------------------+\n";
-}
-################################################################################
-sub parse_version_file {
- unless (open(VERSION, "docs${dirsep}VERSION")) {
- print STDERR "$0: can't open VERSION file 'docs${dirsep}VERSION': $!\n";
- exit 1;
- }
-
- my $first_line = <VERSION>;
- close VERSION;
-
- ($xmlwrapp_ver, $xmlwrapp_mjr, $xsltwrapp_mjr, undef) = split(/\s+/, $first_line, 4);
-}
-################################################################################
-sub check_libxslt {
- my $output;
-
- print "Checking for libxslt version ... ";
- $clo{'xslt-config'} ||= 'xslt-config';
- chomp($output = `$clo{'xslt-config'} --version 2>&1`);
-
- if ($? != 0 or not defined $output or not length($output)) {
- print "no\n";
- return 0;
- }
-
- if ($output =~ /^(\d+\.\d+)\.(\d+)$/) {
- if (($1 > 1.0) or ($1 == 1.0 and $2 >= 23)) {
- print "$output >= 1.0.23\n";
- } else {
- print "$output < 1.0.23\n";
- print STDERR "**** your version of libxslt is too old.\n";
- print STDERR "**** you can configure with --disable-xslt to drop XSLT support.\n";
- exit 1;
- }
- } else {
- print "xmlwrapp bug\n";
- print STDERR "**** I can't parse the version string, this is a bug!\n";
- exit 1;
- }
-
- load_flags_from_xml_config("xslt");
- $xsltwrapp_okay = 1;
- push(@test_dirs, "xslt");
-
- return 1;
-}
-################################################################################
-sub check_libxml2 {
- my $output;
-
- print "Checking for libxml2 version ... ";
- $clo{'xml2-config'} ||= 'xml2-config';
- chomp($output = `$clo{'xml2-config'} --version 2>&1`);
-
- unless ($output) {
- print "[fail]\n";
- print STDERR "**** can't find xml2-config, try using --xml2-config\n";
- exit 1;
- }
-
- if ($output =~ /^(\d+\.\d+)\.(\d+)$/) {
- if (($1 >= 2.5) || $1 == 2.4 && $2 >= 28) {
- print "$output >= 2.4.28\n";
- } else {
- print "$output < 2.4.28\n";
- print STDERR "**** your version of libxml2 is too old, please upgrade\n";
- exit 1;
- }
- } else {
- print "what is that?\n";
- print STDERR "**** I can't seem to parse the libxml2 version, please submit a bug\n";
- exit 1;
- }
-
- load_flags_from_xml_config("xml2");
-}
-################################################################################
-sub load_flags_from_xml_config {
- my $xmllib = shift;
- my $config = "$xmllib-config";
- my $output;
-
- print "Finding XML '$xmllib' include directory ... ";
- chomp($output = `$clo{$config} --cflags 2>&1`);
-
- if ($xmllib eq 'xslt' && 1) {
- # hack
- $output = $output . ' -I/usr/local/include/libxml2';
- if (0) {
- my $cmd = $clo{$config};
- print "DEBUG: cmd = '$cmd'...\n";
- print "DEBUG: xml2 flags = '$output'...\n";
- exit;
- }
- }
- if ($? != 0 or not defined $output or not length($output)) {
- print "fail\n";
- print "**** error running $clo{$config} --cflags, sorry\n";
- exit 1;
- }
-
- $output =~ s/-I//g;
- my @include_dirs = split(/\s+/, $output);
- my $main_include_dir = undef;
- my $xslt_include_dir = undef;
-
- # add a few standard directories just in case
- push(@include_dirs, '/usr/include');
-
- foreach my $dir (@include_dirs) {
- if (-d "$dir${dirsep}libxml" and not defined $main_include_dir) {
- $main_include_dir = $dir;
- }
-
- if (-e "$dir${dirsep}libxslt${dirsep}transform.h" and not defined $xslt_include_dir) {
- $xslt_include_dir = $dir;
- }
-
- if (-e "$dir${dirsep}giconv.h") {
- push(@external_incs, $dir);
- }
-
- if (-e "$dir${dirsep}iconv.h") {
- push(@external_incs, $dir);
- }
- }
-
- if ($xmllib eq 'xslt' and not defined $xslt_include_dir) {
- print STDERR "**** can't find include dir for libxslt, what does $clo{'$xmllib-config'} --cflags say?\n";
- exit 1;
- }
- elsif($xmllib eq 'xslt') {
- push(@external_incs, $xslt_include_dir);
- }
-
- if (not defined $main_include_dir) {
- print "fail\n";
- print STDERR "**** can't find include dir for libxml2, what does $clo{'$xmllib-config'} --cflags say?\n";
- exit 1;
- }
- else {
- print "$main_include_dir\n";
- push(@external_incs, $main_include_dir);
- }
-
- print "Finding XML libraries ... ";
- chomp($output = `$clo{$config} --libs 2>&1`);
-
- if ($? != 0 or not defined $output or not length($output)) {
- print "fail\n";
- print "**** error running $clo{$config} --libs, sorry\n";
- exit 1;
- }
- else {
- print "done\n";
- }
-
- $output =~ s/^\s+//; $output =~ s/\s+$//;
- my $last_L;
-
- if ($xmllib eq 'xslt' and $output !~ /-lexslt/) {
- $output =~ s/-lxslt/-lxslt -lexslt/;
- }
-
- while ($output =~ /-([Ll])(\S+)/cg) {
- if ($1 eq 'L') {
- $last_L = $2;
- next;
- }
-
- if ($last_L) {
- push(@external_libs, [$last_L, $2]);
- } else {
- push(@external_libs, $2);
- }
- }
-}
-################################################################################
-sub generate_top_makefile {
- my $extra_dirs = "tests" if $clo{'enable-tests'};
- $extra_dirs .= " examples" if not $clo{'disable-examples'};
-
- my $extra_flags = '';
- $extra_flags .= ' --with-test tests' if $clo{'enable-tests'};
-
- unless (open(SPEC, ">$install_spec")) {
- print STDERR "\n$0: can't open $install_spec: $!\n";
- exit 1;
- }
-
- # set some install paths
- print SPEC "bindir=$clo{'bindir'}\n";
- print SPEC "libdir=$clo{'libdir'}\n";
- print SPEC "includedir=$clo{'incdir'}\n";
-
- # add files
- print SPEC "binary $libname-config\n";
- print SPEC "pkgconfig $libname.pc\n" if $have_pkg_config == 1;
- print SPEC "include-dir include/$libname $libname\n";
- print SPEC "static-lib src/$src_sub_dir $libname\n";
- print SPEC "shared-lib src/$src_sub_dir $libname $xmlwrapp_mjr\n" unless $clo{'disable-shared'};
-
- if ($xsltwrapp_okay == 1) {
- print SPEC "include-dir include/$xslt_libname $xslt_libname\n";
- print SPEC "static-lib src/$xslt_sub_dir $xslt_libname\n";
- print SPEC "shared-lib src/$xslt_sub_dir $xslt_libname $xsltwrapp_mjr\n" unless $clo{'disable-shared'};
- }
-
- close SPEC;
-
- print "Creating Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --install $install_spec $extra_flags --wrapper src $extra_dirs");
- unlink($install_spec);
-}
-################################################################################
-sub generate_src_makefiles {
- ##
- # src/Makefile
- if (! chdir("$cwd${dirsep}src")) {
- print STDERR "\n**** hey, I can't cd into my src directory: $!\n";
- exit 1;
- }
-
- my $src_dirs = "$src_sub_dir";
- $src_dirs .= " $xslt_sub_dir" if $xsltwrapp_okay == 1;
-
- print "Creating src/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --wrapper $src_dirs");
- chdir($cwd);
-
- ##
- # src/libxml2/Makefile
- if (! chdir("$cwd${dirsep}src${dirsep}$src_sub_dir")) {
- print STDERR "\n**** hey, I can't cd into my src/$src_sub_dir directory: $!\n";
- exit 1;
- }
-
- my $extra_flags = "--shared-lib $libname --major $xmlwrapp_mjr" unless $clo{'disable-shared'};
- foreach my $dir (@external_incs) { $extra_flags .= " --include $dir"; }
-
- print "Creating src/$src_sub_dir/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --static-lib $libname $extra_flags *.cxx");
- chdir($cwd);
-
- ##
- # src/libxslt/Makefile
- if (! chdir("$cwd${dirsep}src${dirsep}$xslt_sub_dir")) {
- print STDERR "\n**** hey, I can't cd into my src/$xslt_sub_dir directory: $!\n";
- exit 1;
- }
-
- my $extra_flags = "--shared-lib $xslt_libname --major $xsltwrapp_mjr" unless $clo{'disable-shared'};
- foreach my $dir (@external_incs) { $extra_flags .= " --include $dir"; }
-
- print "Creating src/$xslt_sub_dir/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --static-lib $xslt_libname $extra_flags *.cxx");
- chdir($cwd);
-}
-################################################################################
-sub generate_test_makefiles {
- return unless $clo{'enable-tests'};
-
- if (! chdir("$cwd${dirsep}tests")) {
- print STDERR "\n$0: can't cd to tests: $!\n";
- exit 1;
- }
-
- my $with_test = join(',', @test_dirs);
- print "Creating tests/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --with-test '$with_test' --wrapper @test_dirs");
- chdir($cwd);
-
- # static link with xmlwrapp so that it does not need to be installed
- my $extra_flags = "";
- $extra_flags .= "--slinkwith $cwd${dirsep}src/$xslt_sub_dir,$xslt_libname " if $xsltwrapp_okay == 1;
- $extra_flags .= "--slinkwith $cwd${dirsep}src/$src_sub_dir,$libname ";
-
- # link with all external libs
- foreach my $lib (@external_libs) {
- if (ref $lib) {
- $extra_flags .= " --linkwith $lib->[0],$lib->[1]";
- } else {
- $extra_flags .= " --linkwith $lib";
- }
- }
-
- $extra_flags .= " --test-cmds '$^X runtest.pl'";
-
- foreach my $test (@test_dirs) {
- if (! chdir("$cwd${dirsep}tests${dirsep}$test")) {
- print STDERR "\n$0: can't cd to $cwd${dirsep}tests${dirsep}$test: $!\n";
- exit 1;
- }
-
- print "Creating tests/$test/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --many-exec $extra_flags *.cxx");
- chdir($cwd);
- }
-}
-################################################################################
-sub generate_example_makefiles {
- return if $clo{'disable-examples'};
-
- if (! chdir("$cwd${dirsep}examples")) {
- print STDERR "\n$0: can't cd to examples: $!\n";
- exit 1;
- }
-
- my @raw_example_dirs = grep {!/^(CVS|Makefile)$/} glob("*");
- my @example_dirs;
-
- foreach (@raw_example_dirs) {
- if (/xslt/i and $xsltwrapp_okay != 1) { next; }
- push(@example_dirs, $_);
- }
-
- print "Creating examples/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --wrapper @example_dirs");
- chdir($cwd);
-
- # static link with xmlwrapp so that it does not need to be installed
- my $extra_flags;
- $extra_flags .= "--slinkwith $cwd${dirsep}src/$xslt_sub_dir,$xslt_libname " if $xsltwrapp_okay == 1;
- $extra_flags .= "--slinkwith $cwd${dirsep}src${dirsep}$src_sub_dir,$libname ";
-
- # link with all external libs
- foreach my $lib (@external_libs) {
- if (ref $lib) {
- $extra_flags .= " --linkwith $lib->[0],$lib->[1]";
- } else {
- $extra_flags .= " --linkwith $lib";
- }
- }
-
- foreach my $example (@example_dirs) {
- if (! chdir("$cwd${dirsep}examples${dirsep}$example")) {
- print STDERR "\n$0: can't cd to $cwd${dirsep}examples${dirsep}$example: $!\n";
- exit 1;
- }
-
- print "Creating examples/$example/Makefile ...\n";
- system("$^X $mkmf $mkmf_flags --one-exec example $extra_flags *.cxx");
- chdir($cwd);
- }
-}
-################################################################################
-sub generate_config_script {
- my ($all_incs, $all_libs);
-
- if ($clo{'contrib'}) {
- $all_incs = "-I$cwd${dirsep}include ";
- $all_libs = "";
-
- my @lib_names;
- push(@lib_names, $xslt_libname) if $xsltwrapp_okay == 1;
- push(@lib_names, $libname);
-
- foreach my $lib_name (@lib_names) {
- my $full_libname = `$^X $cxxflags --static-lib-prefix`;
- $full_libname =~ s/^\s+//; $full_libname =~ s/\s+$//;
- $full_libname .= $lib_name;
- $full_libname .= `$^X $cxxflags --static-lib-extension`;
- $full_libname =~ s/^\s+//; $full_libname =~ s/\s+$//;
-
- my $subdir = $lib_name eq $xslt_libname ? $xslt_sub_dir : $src_sub_dir;
- $all_libs .= "$cwd${dirsep}src${dirsep}$subdir${dirsep}$full_libname ";
- }
- } else {
- $all_incs = "-I$clo{'incdir'} ";
- $all_libs .= `$^X $cxxflags --linkwith $clo{'libdir'},$xslt_libname` if $xsltwrapp_okay == 1;
- $all_libs .= `$^X $cxxflags --linkwith $clo{'libdir'},$libname`;
- }
-
- # add external libraries
- foreach my $lib (@external_libs) {
- if (ref $lib) {
- $all_libs .= `$^X $cxxflags --linkwith $lib->[0],$lib->[1]`;
- } else {
- $all_libs .= `$^X $cxxflags --linkwith $lib`;
- }
- }
-
- # clean and encode
- foreach ($all_incs, $all_libs) {
- s/^\s+//; s/\s+$//; s/\s+/ /g; s/-/^/g;
- }
-
- my $command = "$^X $genconfig --version $xmlwrapp_ver --name $libname";
- $command .= " --libs \"$all_libs\" --cxxflags \"$all_incs\"";
- $command .= " --desc 'A C++ wrapper around libxml2 and libxslt' ";
- $command .= " -o $libname-config";
-
- # check for pkg-config
- if (system("pkg-config --version > /dev/null 2>&1") == 0 || system("$clo{'bindir'}/pkg-config --version > /dev/null 2>&1") == 0) {
- $have_pkg_config = 1;
- $command .= " --prefix='$clo{prefix}' --bindir='$clo{bindir}' --libdir='$clo{libdir}' --incdir='$clo{incdir}' --pkgconfig='$libname.pc'";
- }
-
- print "Creating xmlwrapp-config script ... \n";
- system("$command");
-}
-################################################################################
-sub generate_config_header {
- if (not open(CH, ">src${dirsep}xmlwrapp_config.h")) {
- print STDERR "$0: error creating src/xmlwrapp_config.h: $!\n";
- exit 1;
- }
-
- print CH "#ifndef _xmlwrapp_config_h_\n";
- print CH "#define _xmlwrapp_config_h_\n";
-
- if ($xsltwrapp_okay == 1) {
- print CH "#define XMLWRAPP_WITH_XSLT\n";
- }
-
- print CH "#endif\n";
- close CH;
-}
-################################################################################
Property changes on: trunk/examples
___________________________________________________________________
Modified: svn:ignore
- Makefile
+ Makefile
Makefile.in
Property changes on: trunk/examples/01-tree_parsing
___________________________________________________________________
Modified: svn:ignore
- Makefile
example
+ example
Makefile
Makefile.in
.deps
.libs
Added: trunk/examples/01-tree_parsing/Makefile.am
===================================================================
--- trunk/examples/01-tree_parsing/Makefile.am (rev 0)
+++ trunk/examples/01-tree_parsing/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,6 @@
+
+noinst_PROGRAMS = example
+
+example_SOURCES = example.cxx
+example_CPPFLAGS = -I$(top_srcdir)/include
+example_LDADD = ../../src/libxmlwrapp.la
Property changes on: trunk/examples/01-tree_parsing/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/examples/02-event_parsing
___________________________________________________________________
Modified: svn:ignore
- Makefile
example
+ example
Makefile
Makefile.in
.deps
.libs
Added: trunk/examples/02-event_parsing/Makefile.am
===================================================================
--- trunk/examples/02-event_parsing/Makefile.am (rev 0)
+++ trunk/examples/02-event_parsing/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,6 @@
+
+noinst_PROGRAMS = example
+
+example_SOURCES = example.cxx
+example_CPPFLAGS = -I$(top_srcdir)/include
+example_LDADD = ../../src/libxmlwrapp.la
Property changes on: trunk/examples/02-event_parsing/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/examples/03-xml_generation
___________________________________________________________________
Modified: svn:ignore
- Makefile
example
+ example
Makefile
Makefile.in
.deps
.libs
Added: trunk/examples/03-xml_generation/Makefile.am
===================================================================
--- trunk/examples/03-xml_generation/Makefile.am (rev 0)
+++ trunk/examples/03-xml_generation/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,6 @@
+
+noinst_PROGRAMS = example
+
+example_SOURCES = example.cxx
+example_CPPFLAGS = -I$(top_srcdir)/include
+example_LDADD = ../../src/libxmlwrapp.la
Property changes on: trunk/examples/03-xml_generation/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/examples/04-xslt
___________________________________________________________________
Modified: svn:ignore
- Makefile
example
+ example
Makefile
Makefile.in
.deps
.libs
Added: trunk/examples/04-xslt/Makefile.am
===================================================================
--- trunk/examples/04-xslt/Makefile.am (rev 0)
+++ trunk/examples/04-xslt/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,10 @@
+
+if WITH_XSLT
+
+noinst_PROGRAMS = example
+
+example_SOURCES = example.cxx
+example_CPPFLAGS = -I$(top_srcdir)/include
+example_LDADD = ../../src/libxsltwrapp.la ../../src/libxmlwrapp.la
+
+endif
Property changes on: trunk/examples/04-xslt/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/examples/Makefile.am
===================================================================
--- trunk/examples/Makefile.am (rev 0)
+++ trunk/examples/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,6 @@
+
+SUBDIRS = \
+ 01-tree_parsing \
+ 02-event_parsing \
+ 03-xml_generation \
+ 04-xslt
Property changes on: trunk/examples/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/include
___________________________________________________________________
Added: svn:ignore
+ Makefile
Makefile.in
Added: trunk/include/Makefile.am
===================================================================
--- trunk/include/Makefile.am (rev 0)
+++ trunk/include/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,19 @@
+
+xmlwrapp_includedir= $(includedir)/xmlwrapp
+xmlwrapp_include_HEADERS = \
+ xmlwrapp/attributes.h \
+ xmlwrapp/_cbfo.h \
+ xmlwrapp/document.h \
+ xmlwrapp/event_parser.h \
+ xmlwrapp/init.h \
+ xmlwrapp/node.h \
+ xmlwrapp/tree_parser.h \
+ xmlwrapp/xmlwrapp.h
+
+if WITH_XSLT
+xsltwrapp_includedir= $(includedir)/xsltwrapp
+xsltwrapp_include_HEADERS = \
+ xsltwrapp/init.h \
+ xsltwrapp/stylesheet.h \
+ xsltwrapp/xsltwrapp.h
+endif
Property changes on: trunk/include/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/src
___________________________________________________________________
Modified: svn:ignore
- Makefile
xmlwrapp_config.h
+ Makefile
Makefile.in
.libs
.deps
Added: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am (rev 0)
+++ trunk/src/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,44 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+
+if WITH_XSLT
+lib_LTLIBRARIES = libxmlwrapp.la libxsltwrapp.la
+else
+lib_LTLIBRARIES = libxmlwrapp.la
+endif
+
+libxmlwrapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS)
+libxmlwrapp_la_LIBADD = $(LIBXML_LIBS)
+libxmlwrapp_la_LDFLAGS = -version-info 5:1:0
+
+libxmlwrapp_la_SOURCES = \
+ libxml/ait_impl.cxx \
+ libxml/ait_impl.h \
+ libxml/attributes.cxx \
+ libxml/document.cxx \
+ libxml/dtd_impl.cxx \
+ libxml/dtd_impl.h \
+ libxml/event_parser.cxx \
+ libxml/init.cxx \
+ libxml/node.cxx \
+ libxml/node_iterator.cxx \
+ libxml/node_iterator.h \
+ libxml/node_manip.cxx \
+ libxml/node_manip.h \
+ libxml/tree_parser.cxx \
+ libxml/utility.cxx \
+ libxml/utility.h
+
+
+if WITH_XSLT
+
+libxsltwrapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEXSLT_CFLAGS) $(LIBXSLT_CFLAGS)
+libxsltwrapp_la_LIBADD = libxmlwrapp.la $(LIBEXSLT_LIBS) $(LIBXSLT_LIBS)
+libxsltwrapp_la_LDFLAGS = -version-info 2:1:0
+
+libxsltwrapp_la_SOURCES = \
+ libxslt/init.cxx \
+ libxslt/result.h \
+ libxslt/stylesheet.cxx
+
+endif
Property changes on: trunk/src/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/src/libxml/document.cxx
===================================================================
--- trunk/src/libxml/document.cxx 2008-11-24 02:37:42 UTC (rev 97)
+++ trunk/src/libxml/document.cxx 2008-11-25 15:50:51 UTC (rev 98)
@@ -41,11 +41,6 @@
#include "dtd_impl.h"
#include "node_manip.h"
-// configure.pl generated file
-#ifndef WIN32
-# include "../xmlwrapp_config.h"
-#endif
-
// standard includes
#include <new>
#include <memory>
Property changes on: trunk/tests
___________________________________________________________________
Modified: svn:ignore
- Makefile
+ Makefile
Makefile.in
Added: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am (rev 0)
+++ trunk/tests/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,8 @@
+
+SUBDIRS = \
+ attributes \
+ document \
+ event \
+ node \
+ tree \
+ xslt
Property changes on: trunk/tests/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/attributes
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_attr-01
test_attr-02
test_attr-03
test_attr-04
test_attr-05
test_attr-06
test_attr-07
test_attr-08
test_attr-09
test_attr-10
+ Makefile
Makefile.in
.deps
.libs
test_attr-01
test_attr-02
test_attr-03
test_attr-04
test_attr-05
test_attr-06
test_attr-07
test_attr-08
test_attr-09
test_attr-10
Added: trunk/tests/attributes/Makefile.am
===================================================================
--- trunk/tests/attributes/Makefile.am (rev 0)
+++ trunk/tests/attributes/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,28 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_attr-01 \
+ test_attr-02 \
+ test_attr-03 \
+ test_attr-04 \
+ test_attr-05 \
+ test_attr-06 \
+ test_attr-07 \
+ test_attr-08 \
+ test_attr-09 \
+ test_attr-10
+
+test_attr_01_SOURCES = test_attr-01.cxx
+test_attr_02_SOURCES = test_attr-02.cxx
+test_attr_03_SOURCES = test_attr-03.cxx
+test_attr_04_SOURCES = test_attr-04.cxx
+test_attr_05_SOURCES = test_attr-05.cxx
+test_attr_06_SOURCES = test_attr-06.cxx
+test_attr_07_SOURCES = test_attr-07.cxx
+test_attr_08_SOURCES = test_attr-08.cxx
+test_attr_09_SOURCES = test_attr-09.cxx
+test_attr_10_SOURCES = test_attr-10.cxx
Property changes on: trunk/tests/attributes/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/document
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_document-01
test_document-02
test_document-03
test_document-04
test_document-05
test_document-06
test_document-07
test_document-08
test_document-09
test_document-10
test_document-11
test_document-12
test_document-13
test_document-14
test_document-15
test_document-16
test_document-17
test_document-18
test_document-19
test_document-20
test_document-21
test_document-22
+ Makefile
Makefile.in
.deps
.libs
test_document-01
test_document-02
test_document-03
test_document-04
test_document-05
test_document-06
test_document-07
test_document-08
test_document-09
test_document-10
test_document-11
test_document-12
test_document-13
test_document-14
test_document-15
test_document-16
test_document-17
test_document-18
test_document-19
test_document-20
test_document-21
test_document-22
Added: trunk/tests/document/Makefile.am
===================================================================
--- trunk/tests/document/Makefile.am (rev 0)
+++ trunk/tests/document/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,52 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_document-01 \
+ test_document-02 \
+ test_document-03 \
+ test_document-04 \
+ test_document-05 \
+ test_document-06 \
+ test_document-07 \
+ test_document-08 \
+ test_document-09 \
+ test_document-10 \
+ test_document-11 \
+ test_document-12 \
+ test_document-13 \
+ test_document-14 \
+ test_document-15 \
+ test_document-16 \
+ test_document-17 \
+ test_document-18 \
+ test_document-19 \
+ test_document-20 \
+ test_document-21 \
+ test_document-22
+
+test_document_01_SOURCES = test_document-01.cxx
+test_document_02_SOURCES = test_document-02.cxx
+test_document_03_SOURCES = test_document-03.cxx
+test_document_04_SOURCES = test_document-04.cxx
+test_document_05_SOURCES = test_document-05.cxx
+test_document_06_SOURCES = test_document-06.cxx
+test_document_07_SOURCES = test_document-07.cxx
+test_document_08_SOURCES = test_document-08.cxx
+test_document_09_SOURCES = test_document-09.cxx
+test_document_10_SOURCES = test_document-10.cxx
+test_document_11_SOURCES = test_document-11.cxx
+test_document_12_SOURCES = test_document-12.cxx
+test_document_13_SOURCES = test_document-13.cxx
+test_document_14_SOURCES = test_document-14.cxx
+test_document_15_SOURCES = test_document-15.cxx
+test_document_16_SOURCES = test_document-16.cxx
+test_document_17_SOURCES = test_document-17.cxx
+test_document_18_SOURCES = test_document-18.cxx
+test_document_19_SOURCES = test_document-19.cxx
+test_document_20_SOURCES = test_document-20.cxx
+test_document_21_SOURCES = test_document-21.cxx
+test_document_22_SOURCES = test_document-22.cxx
Property changes on: trunk/tests/document/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/event
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_event-01
test_event-02
test_event-03
+ Makefile
Makefile.in
.deps
.libs
test_event-01
test_event-02
test_event-03
Added: trunk/tests/event/Makefile.am
===================================================================
--- trunk/tests/event/Makefile.am (rev 0)
+++ trunk/tests/event/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,14 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_event-01 \
+ test_event-02 \
+ test_event-03
+
+test_event_01_SOURCES = test_event-01.cxx
+test_event_02_SOURCES = test_event-02.cxx
+test_event_03_SOURCES = test_event-03.cxx
Property changes on: trunk/tests/event/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/node
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_node-01
test_node-02a
test_node-02b
test_node-02c
test_node-02d
test_node-03a
test_node-03b
test_node-04a
test_node-04b
test_node-05a
test_node-05b
test_node-05c
test_node-05d
test_node-06
test_node-07
test_node-08
test_node-09
test_node-10
test_node-11
test_node-12
test_node-13
+ Makefile
Makefile.in
.deps
.libs
test_node-01
test_node-02a
test_node-02b
test_node-02c
test_node-02d
test_node-03a
test_node-03b
test_node-04a
test_node-04b
test_node-05a
test_node-05b
test_node-05c
test_node-05d
test_node-06
test_node-07
test_node-08
test_node-09
test_node-10
test_node-11
test_node-12
test_node-13
Added: trunk/tests/node/Makefile.am
===================================================================
--- trunk/tests/node/Makefile.am (rev 0)
+++ trunk/tests/node/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,50 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_node-01 \
+ test_node-02a \
+ test_node-02b \
+ test_node-02c \
+ test_node-02d \
+ test_node-03a \
+ test_node-03b \
+ test_node-04a \
+ test_node-04b \
+ test_node-05a \
+ test_node-05b \
+ test_node-05c \
+ test_node-05d \
+ test_node-06 \
+ test_node-07 \
+ test_node-08 \
+ test_node-09 \
+ test_node-10 \
+ test_node-11 \
+ test_node-12 \
+ test_node-13
+
+test_node_01_SOURCES = test_node-01.cxx
+test_node_02a_SOURCES = test_node-02a.cxx
+test_node_02b_SOURCES = test_node-02b.cxx
+test_node_02c_SOURCES = test_node-02c.cxx
+test_node_02d_SOURCES = test_node-02d.cxx
+test_node_03a_SOURCES = test_node-03a.cxx
+test_node_03b_SOURCES = test_node-03b.cxx
+test_node_04a_SOURCES = test_node-04a.cxx
+test_node_04b_SOURCES = test_node-04b.cxx
+test_node_05a_SOURCES = test_node-05a.cxx
+test_node_05b_SOURCES = test_node-05b.cxx
+test_node_05c_SOURCES = test_node-05c.cxx
+test_node_05d_SOURCES = test_node-05d.cxx
+test_node_06_SOURCES = test_node-06.cxx
+test_node_07_SOURCES = test_node-07.cxx
+test_node_08_SOURCES = test_node-08.cxx
+test_node_09_SOURCES = test_node-09.cxx
+test_node_10_SOURCES = test_node-10.cxx
+test_node_11_SOURCES = test_node-11.cxx
+test_node_12_SOURCES = test_node-12.cxx
+test_node_13_SOURCES = test_node-13.cxx
Property changes on: trunk/tests/node/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/tree
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_tree-01
test_tree-02
test_tree-03
test_tree-04
test_tree-05
test_tree-06
+ Makefile
Makefile.in
.deps
.libs
test_tree-01
test_tree-02
test_tree-03
test_tree-04
test_tree-05
test_tree-06
Added: trunk/tests/tree/Makefile.am
===================================================================
--- trunk/tests/tree/Makefile.am (rev 0)
+++ trunk/tests/tree/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,20 @@
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_tree-01 \
+ test_tree-02 \
+ test_tree-03 \
+ test_tree-04 \
+ test_tree-05 \
+ test_tree-06
+
+test_tree_01_SOURCES = test_tree-01.cxx
+test_tree_02_SOURCES = test_tree-02.cxx
+test_tree_03_SOURCES = test_tree-03.cxx
+test_tree_04_SOURCES = test_tree-04.cxx
+test_tree_05_SOURCES = test_tree-05.cxx
+test_tree_06_SOURCES = test_tree-06.cxx
Property changes on: trunk/tests/tree/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Property changes on: trunk/tests/xslt
___________________________________________________________________
Modified: svn:ignore
- Makefile
test_xslt-01
test_xslt-02
test_xslt-03
test_xslt-04
test_xslt-05
+ Makefile
Makefile.in
.deps
.libs
test_xslt-01
test_xslt-02
test_xslt-03
test_xslt-04
test_xslt-05
Added: trunk/tests/xslt/Makefile.am
===================================================================
--- trunk/tests/xslt/Makefile.am (rev 0)
+++ trunk/tests/xslt/Makefile.am 2008-11-25 15:50:51 UTC (rev 98)
@@ -0,0 +1,22 @@
+
+if WITH_XSLT
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+LIBS = ../../src/libxsltwrapp.la ../../src/libxmlwrapp.la
+
+TESTS = runtest.pl
+
+noinst_PROGRAMS = \
+ test_xslt-01 \
+ test_xslt-02 \
+ test_xslt-03 \
+ test_xslt-04 \
+ test_xslt-05
+
+test_xslt_01_SOURCES = test_xslt-01.cxx
+test_xslt_02_SOURCES = test_xslt-02.cxx
+test_xslt_03_SOURCES = test_xslt-03.cxx
+test_xslt_04_SOURCES = test_xslt-04.cxx
+test_xslt_05_SOURCES = test_xslt-05.cxx
+
+endif
Property changes on: trunk/tests/xslt/Makefile.am
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Deleted: trunk/tools/cxxflags
===================================================================
--- trunk/tools/cxxflags 2008-11-24 02:37:42 UTC (rev 97)
+++ trunk/tools/cxxflags 2008-11-25 15:50:51 UTC (rev 98)
@@ -1,396 +0,0 @@
-#! /usr/bin/perl
-######################################################################
-# Copyright (C) 2001-2002 Peter J Jones (pj...@pm...)
-# All Rights Reserved
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of the Author nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
-# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-################################################################################
-#
-# cxxflags (Helper script to get compiler flags)
-# Peter J Jones (pj...@pm...)
-#
-# This file is part of cxxtools (http://pmade.org/pjones/software/cxxtools/)
-#
-################################################################################
-#
-# Includes
-#
-################################################################################
-use strict;
-use Getopt::Long;
-################################################################################
-#
-# Constants
-#
-################################################################################
-use constant DATE => 'Sat Aug 18 12:09:00 2001';
-use constant ID => '$Id: cxxflags,v 1.1.1.1 2003-08-04 04:57:28 pjones Exp $';
-################################################################################
-#
-# Global Variables
-#
-################################################################################
-use vars qw($VERSION);
-$VERSION = '0.0.1';
-
-my %clo;
-
-my %flags = (
- 'getid' => '',
- 'debug' => '',
- 'depend' => '',
- 'pic' => '',
- 'optimize' => '',
- 'ar' => '',
- 'arflags' => '',
- 'arextra' => '',
- 'sar' => '',
- 'sarflags' => '',
- 'warn' => '',
- 'general' => '',
- 'object-ext' => '',
- 'static-ext' => '',
- 'shared-ext' => '',
- 'static-pre' => '',
- 'shared-pre' => '',
- 'shared-mjr' => '',
- 'exec-ext' => '',
- 'mkexec' => '',
- 'mkstatic' => '',
- 'mkshared' => '',
- 'linker' => '',
- 'linkwith' => '',
- 'mtcompile' => '',
- 'mtlink' => '',
-);
-################################################################################
-#
-# Code Start
-#
-################################################################################
-GetOptions(
- \%clo,
- 'help|h!',
- 'cxx=s',
- 'getid!',
- 'setid=s',
-
- 'arflags|A!',
- 'ar|a!',
- 'arextra',
- 'sar!',
- 'sarflags!',
- 'debug!',
- 'depend|d!',
- 'exec-extension!',
- 'general!',
- 'linker!',
- 'linkwith=s@',
- 'mkexec=s',
- 'mkstatic=s',
- 'mkshared=s',
- 'mkshared-name=s',
- 'major=i',
- 'object-extension!',
- 'optimize|O!',
- 'pic|p!',
- 'static-lib-extension!',
- 'shared-lib-extension!',
- 'static-lib-prefix!',
- 'shared-lib-prefix!',
- 'warn!',
- 'mtcompile!',
- 'mtlink!',
-
-) or usage(); $clo{'help'} and usage();
-
-sub usage {
- print "Usage: $0 [options]\n", <<EOT;
- --cxx string The path to the compiler to use instead of \$CXX
- --getid Get the current compiler ID
- --setid id Don't run the compiler, assume it has the given id
-
- --ar, a Get the name of the tool for making archives
- --arflags, A Get the flags for the ar tool
- --arextra Get any commands to run after ar (ie ranlib)
- --sar Get the name of the tool to create shared libs
- --sarflags Get the flags for the sar tool
- --debug Get flags for debugging
- --depend, d Get the make depend compiler flags
- --exec-extension Get the file extension for binary executables
- --general Get general compiler flags that should always be used
- --linker Get the name of the linker
- --linkwith lib Get linker line for library
- --linkwith path,lib Get linker libe for library in path
- --mkexec file Get flag to output executable with given name
- --mkstatic file Get flag to output static library with given name
- --mkshared file Get flag to output shared library with given name
- --mkshared-name file Get the complete name for a shared lib
- --major number Set the major number for a shared lib
- --mtcomplile Get flags for compiling multithreaded code
- --mtlink Get flags for linking multithreaded objects
- --object-extension Get the file extension for object files
- --optimize, O Get the compilers level two optimization flags
- --pic, p Get the flags for Position Independ Code
- --static-lib-extension Get the file extension for a static library
- --shared-lib-extension Get the file extension for a shared library
- --static-lib-prefix Get the prefix for static libraries
- --shared-lib-prefix Get the prefix for shared libraries
- --warn Get compiler flags for generating warnings
-EOT
- exit;
-}
-
-$clo{'cxx'} ||= $ENV{'CXX'} || 'c++';
-$clo{'linkwith'} ||= [];
-$clo{'major'} ||= '1';
-
-stat_compiler();
-
-################################################################################
-
-#
-# this got out of hand !
-#
-$clo{'debug'} and print "$flags{'debug'} ";
-$clo{'depend'} and print "$flags{'depend'} ";
-$clo{'pic'} and print "$flags{'pic'} ";
-$clo{'optimize'} and print "$flags{'optimize'} ";
-$clo{'ar'} and print "$flags{'ar'} ";
-$clo{'arflags'} and print "$flags{'arflags'} ";
-$clo{'arextra'} and print "$flags{'arextra'} ";
-$clo{'sar'} and print "$flags{'sar'} ";
-$clo{'sarflags'} and print "$flags{'sarflags'} ";
-$clo{'warn'} and print "$flags{'warn'} ";
-$clo{'general'} and print "$flags{'general'} ";
-$clo{'object-extension'} and print "$flags{'object-ext'} ";
-$clo{'static-lib-extension'}and print "$flags{'static-ext'} ";
-$clo{'shared-lib-extension'}and print "$flags{'shared-ext'} ";
-$clo{'static-lib-prefix'} and print "$flags{'static-pre'} ";
-$clo{'shared-lib-prefix'} and print "$flags{'shared-pre'} ";
-$clo{'mkshared-name'} and print "$flags{'shared-mjr'} ";
-$clo{'exec-extension'} and print "$flags{'exec-ext'} ";
-$clo{'mkexec'} and print "$flags{'mkexec'} ";
-$clo{'mkstatic'} and print "$flags{'mkstatic'} ";
-$clo{'mkshared'} and print "$flags{'mkshared'} ";
-$clo{'linker'} and print "$flags{'linker'} ";
-$clo{'linkwith'} and print "$flags{'linkwith'} ";
-$clo{'mtcompile'} and print "$flags{'mtcompile'} ";
-$clo{'mtlink'} and print "$flags{'mtlink'} ";
-$clo{'getid'} and print "$flags{'getid'} ";
- print "\n";
-################################################################################
-
-sub stat_compiler {
- my $output;
-
- if ($^O =~ /solaris/i) {
- $flags{'mtcompile'} .= " -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";
- }
-
- ################################################################################
- # gcc
- if ($clo{'setid'} and $clo{'setid'} =~ /^gcc/) {
- $output = $clo{'setid'};
- } else {
- $output = `$clo{'cxx'} -v 2>&1`;
- }
-
- if ($output =~ /gcc/) {
- my $linker = 'gnu'; # default for now
-
- if ($^O =~ /solaris/i) {
- if ($clo{'setid'}) {
- if ($clo{'setid'} eq 'gcc-sun') { $linker = 'sun'; }
- } else {
- $output = `$clo{'cxx'} -Wl,-v 2>&1`;
-
- if ($output =~ /\[-h\s+name\]/ and $output =~ /\[-G\]/) {
- $linker = 'sun';
- }
- }
- } elsif ($^O =~ /darwin/i) {
- $linker = 'mach';
- }
-
- $flags{'debug'} = "-g";
- $flags{'depend'} = '-M';
- $flags{'optimize'} = '-O2';
- $flags{'ar'} = $ENV{'AR'} || 'ar';
- $flags{'arflags'} = $ENV{'ARFLAGS'} || 'rc';
- $flags{'sar'} = $clo{'cxx'};
- $flags{'sarflags'} = $ENV{'LDFLAGS'} || '';
- $flags{'warn'} = '-Wall -W -Wcast-align -Wwrite-strings';
- $flags{'object-ext'} = '.o';
- $flags{'static-ext'} = '.a';
- $flags{'shared-ext'} = '.so';
- $flags{'static-pre'} = "lib";
- $flags{'shared-pre'} = "lib";
- $flags{'linker'} = $clo{'cxx'};
- $flags{'mkexec'} = "-o $clo{'mkexec'}" if $clo{'mkexec'};
- $flags{'mkstatic'} = $clo{'mkstatic'} if $clo{'mkstatic'};
-
- if ($clo{'mkshared'} or $clo{'mkshared-name'}) {
- $flags{'shared-mjr'} = "lib$clo{'mkshared-name'}.so.$clo{'major'}" if $clo{'mkshared-name'};
-
- if ($clo{'mkshared'}) {
- if ($linker eq 'gnu') {
- $flags{'mkshared'} = "-shared -o $clo{'mkshared'} -Wl,-soname,$clo{'mkshared'}.$clo{'major'}";
- } elsif ($linker eq 'sun') {
- $flags{'mkshared'} = "-o $clo{'mkshared'} -Wl,-G,-h,$clo{'mkshared'}.$clo{'major'}";
- } elsif ($linker eq 'mach') {
- $flags{'mkshared'} = "-o $clo{'mkshared'} -dynamiclib -compatibility_version $clo{'major'} -current_version $clo{'major'}";
- } else {
- print STDERR "$0: your linker is not supported.\n";
- print STDERR "$0: you might want to install the GNU linker.\n";
- }
- }
- }
-
- foreach (@{$clo{'linkwith'}}) {
- my ($path, $lib) = split(/,/, $_, 2);
- if ($lib) {
- $lib =~ s/^lib//;
- $flags{'linkwith'} .= "-L$path -l$lib ";
- } else {
- $path =~ s/^lib//;
- $flags{'linkwith'} .= "-l$path";
- }
- }
-
- if ($^O =~ /freebsd/i) {
- $flags{'mtlink'} .= " -pthread";
- $flags{'arextra'}.= "ranlib";
- $flags{'pic'} = '-fpic -shared';
- } elsif ($^O =~ /darwin/i) {
- $flags{'pic'} = '';
- $flags{'shared.ext'} = '.dylib';
- $flags{'exec-ext'} = '';
- $flags{'arextra'} = "ranlib";
- } elsif ($^O =~ /cygwin/i) {
- $flags{'pic'} = '';
- } else {
- $flags{'mtlink'} .= " -lpthread";
- $flags{'pic'} = '-fpic -shared';
- }
-
- $flags{'getid'} = "gcc-$linker";
- return;
- }
-
- ################################################################################
- # Microsoft Visual C++ (cl.exe)
- if ($clo{'setid'} && $clo{'setid'} =~ /^microsoft/) {
- $output = 'Microsoft';
- } else {
- $output = `$clo{'cxx'} -verbose=version 2>&1`;
- }
- if ($output =~ /Microsoft/) {
-
- $flags{'debug'} = '/Od /Gz /Zi';
- $flags{'debug'} .= '/GA' if ($clo{'mkstatic'});
- $flags{'debug'} .= '/GD' if ($clo{'mkshared'});
- $flags{'depend'} ...
[truncated message content] |
|
From: <vac...@us...> - 2008-11-24 02:37:52
|
Revision: 97
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=97&view=rev
Author: vaclavslavik
Date: 2008-11-24 02:37:42 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
Fixed libxmlwrapp to not depend on libxslt if XSLT support is enabled (patch #1927398 by Vadim Zeitlin)
Modified Paths:
--------------
trunk/AUTHORS
trunk/ChangeLog
trunk/include/xmlwrapp/document.h
trunk/src/libxml/document.cxx
trunk/src/libxslt/stylesheet.cxx
Added Paths:
-----------
trunk/src/libxslt/result.h
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2008-11-24 02:27:10 UTC (rev 96)
+++ trunk/AUTHORS 2008-11-24 02:37:42 UTC (rev 97)
@@ -7,6 +7,7 @@
Tom Browder <tbr...@us...>
Other contributors:
+ Vadim Zeitlin <va...@tt...>
Tiziano Mueller <ti...@us...>
Greg Chicares <gch...@sb...>
Daniel Evison
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-24 02:27:10 UTC (rev 96)
+++ trunk/ChangeLog 2008-11-24 02:37:42 UTC (rev 97)
@@ -1,3 +1,8 @@
+Version 0.6.0
+
+ Fixed libxmlwrapp to not depend on libxslt if XSLT support
+ is enabled (Vadim Zeitlin, #1927398).
+
Version 0.5.1
Various compilation fixes.
Modified: trunk/include/xmlwrapp/document.h
===================================================================
--- trunk/include/xmlwrapp/document.h 2008-11-24 02:27:10 UTC (rev 96)
+++ trunk/include/xmlwrapp/document.h 2008-11-24 02:37:42 UTC (rev 97)
@@ -46,7 +46,10 @@
#include <cstddef>
// forward declaration
-namespace xslt { class stylesheet; }
+namespace xslt {
+ class result;
+ class stylesheet;
+} // end xslt namespace
namespace xml {
@@ -532,7 +535,7 @@
private:
doc_impl *pimpl_;
void set_doc_data (void *data);
- void set_doc_data_from_xslt (void *data, void *ss);
+ void set_doc_data_from_xslt (void *data, xslt::result *xr);
void* get_doc_data (void);
void* release_doc_data (void);
Modified: trunk/src/libxml/document.cxx
===================================================================
--- trunk/src/libxml/document.cxx 2008-11-24 02:27:10 UTC (rev 96)
+++ trunk/src/libxml/document.cxx 2008-11-24 02:37:42 UTC (rev 97)
@@ -58,13 +58,8 @@
#include <libxml/tree.h>
#include <libxml/xinclude.h>
-// bring in libxslt stuff if we need it.
-#if defined(XMLWRAPP_WITH_XSLT)
-# include <libxslt/xslt.h>
-# include <libxslt/xsltInternals.h>
-# include <libxslt/transform.h>
-# include <libxslt/xsltutils.h>
-#endif
+// bring in private libxslt stuff (see bug #1927398)
+#include "../libxslt/result.h"
//####################################################################
namespace {
@@ -73,19 +68,19 @@
//####################################################################
struct xml::doc_impl {
//####################################################################
- doc_impl (void) : doc_(0), from_xslt_(0) {
+ doc_impl (void) : doc_(0), xslt_result_(0) {
xmlDocPtr tmpdoc;
if ( (tmpdoc = xmlNewDoc(0)) == 0) throw std::bad_alloc();
set_doc_data(tmpdoc, true);
}
//####################################################################
- doc_impl (const char *root_name) : doc_(0), from_xslt_(0), root_(root_name) {
+ doc_impl (const char *root_name) : doc_(0), xslt_result_(0), root_(root_name) {
xmlDocPtr tmpdoc;
if ( (tmpdoc = xmlNewDoc(0)) == 0) throw std::bad_alloc();
set_doc_data(tmpdoc, true);
}
//####################################################################
- doc_impl (const doc_impl &other) : doc_(0), from_xslt_(0) {
+ doc_impl (const doc_impl &other) : doc_(0), xslt_result_(0) {
xmlDocPtr tmpdoc;
if ( (tmpdoc = xmlCopyDoc(other.doc_, 1)) == 0) throw std::bad_alloc();
set_doc_data(tmpdoc, false);
@@ -123,16 +118,17 @@
root_.set_node_data(new_root_node);
if (old_root_node) xmlFreeNode(old_root_node);
- from_xslt_ = 0;
+ xslt_result_ = 0;
}
//####################################################################
~doc_impl (void) {
if (doc_) xmlFreeDoc(doc_);
+ delete xslt_result_;
}
//####################################################################
xmlDocPtr doc_;
- void *from_xslt_;
+ xslt::result *xslt_result_;
node root_;
std::string version_;
mutable std::string encoding_;
@@ -303,18 +299,11 @@
xmlChar *xml_string;
int xml_string_length;
-#if defined(XMLWRAPP_WITH_XSLT)
- if (pimpl_->from_xslt_ != 0) {
- if (xsltSaveResultToString(&xml_string, &xml_string_length, pimpl_->doc_,
- static_cast<xsltStylesheetPtr>(pimpl_->from_xslt_)) >= 0)
- {
- xmlchar_helper helper(xml_string);
- if (xml_string_length) s.assign(helper.get(), xml_string_length);
- }
+ if (pimpl_->xslt_result_ != 0) {
+ pimpl_->xslt_result_->save_to_string(s);
return;
}
-#endif
const char *enc = pimpl_->encoding_.empty() ? 0 : pimpl_->encoding_.c_str();
xmlDocDumpFormatMemoryEnc(pimpl_->doc_, &xml_string, &xml_string_length, enc, 1);
@@ -326,14 +315,12 @@
bool xml::document::save_to_file (const char *filename, int compression_level) const {
std::swap(pimpl_->doc_->compression, compression_level);
-#if defined(XMLWRAPP_WITH_XSLT)
- if (pimpl_->from_xslt_ != 0) {
- bool rc = xsltSaveResultToFilename(filename, pimpl_->doc_, static_cast<xsltStylesheetPtr>(pimpl_->from_xslt_), 0) >= 0;
+ if (pimpl_->xslt_result_ != 0) {
+ bool rc = pimpl_->xslt_result_->save_to_file(filename, compression_level);
std::swap(pimpl_->doc_->compression, compression_level);
return rc;
}
-#endif
const char *enc = pimpl_->encoding_.empty() ? 0 : pimpl_->encoding_.c_str();
bool rc = xmlSaveFormatFileEnc(filename, pimpl_->doc_, enc, 1) > 0;
@@ -345,13 +332,13 @@
void xml::document::set_doc_data (void *data) {
// we own the doc now, don't free it!
pimpl_->set_doc_data(static_cast<xmlDocPtr>(data), false);
- pimpl_->from_xslt_ = 0;
+ pimpl_->xslt_result_ = 0;
}
//####################################################################
-void xml::document::set_doc_data_from_xslt (void *data, void *ss) {
+void xml::document::set_doc_data_from_xslt (void *data, xslt::result *xr) {
// this document came from a XSLT transformation
pimpl_->set_doc_data(static_cast<xmlDocPtr>(data), false);
- pimpl_->from_xslt_ = ss;
+ pimpl_->xslt_result_ = xr;
}
//####################################################################
void* xml::document::get_doc_data (void) {
Added: trunk/src/libxslt/result.h
===================================================================
--- trunk/src/libxslt/result.h (rev 0)
+++ trunk/src/libxslt/result.h 2008-11-24 02:37:42 UTC (rev 97)
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2008 Vadim Zeitlin (va...@ze...)
+ * All Rights Reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of the Author nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/** @file
+ * This file contains the declaration of the xslt::result class.
+**/
+
+#ifndef _xsltwrapp_result_h_
+#define _xsltwrapp_result_h_
+
+// standard includes
+#include <string>
+
+// forward declarations
+typedef struct _xmlDoc *xmlDocPtr;
+
+namespace xslt {
+
+/**
+ * The xslt::result class is used as a callback by xml::document to allow
+ * special treatment of XML documents which were created by XSLT.
+ *
+ * This class is only meant to be used internally by the library and is
+ * necessary to avoid the dependency of xml::document, which is part of
+ * libxmlwrapp, on libxslt which should be only a dependency of libxsltwrapp
+ * as this precludes calling the XSLT functions which must be used with such
+ * "result" documents directly from xml::document code.
+ *
+ * @author Vadim Zeitlin
+ * @internal
+**/
+class result {
+public:
+ //####################################################################
+ /**
+ * Save the contents of the given XML document in the provided string.
+ *
+ * @param s The string to place the XML text data.
+ **/
+ //####################################################################
+ virtual void save_to_string(std::string &s) const = 0;
+
+ //####################################################################
+ /**
+ * Save the contents of the given XML document in the provided filename.
+ *
+ * @param filename The name of the file to place the XML text data into.
+ * @param compression_level 0 is no compression, 1-9 allowed, where 1 is for better speed, and 9 is for smaller size
+ * @return True if the data was saved successfully.
+ * @return False otherwise.
+ **/
+ //####################################################################
+ virtual bool save_to_file (const char *filename,
+ int compression_level) const = 0;
+
+ //####################################################################
+ /**
+ * Trivial but virtual base class destructor.
+ **/
+ //####################################################################
+ virtual ~result (void) { }
+};
+
+} // end xslt namespace
+
+#endif
Property changes on: trunk/src/libxslt/result.h
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/src/libxslt/stylesheet.cxx
===================================================================
--- trunk/src/libxslt/stylesheet.cxx 2008-11-24 02:27:10 UTC (rev 96)
+++ trunk/src/libxslt/stylesheet.cxx 2008-11-24 02:37:42 UTC (rev 97)
@@ -39,6 +39,9 @@
#include "xmlwrapp/document.h"
#include "xmlwrapp/tree_parser.h"
+#include "result.h"
+#include "../libxml/utility.h"
+
// libxslt includes
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
@@ -52,6 +55,42 @@
#include <vector>
#include <map>
+namespace {
+
+// implementation of xslt::result using xslt::stylesheet: we pass this object
+// to xml::document for the documents obtained via XSLT so that some operations
+// (currently only saving) could be done differently for them
+class result_impl : public xslt::result {
+public:
+ // We don't own the pointers given to us, their lifetime must be greater
+ // than the lifetime of this object.
+ result_impl(xmlDocPtr doc, xsltStylesheetPtr ss) : doc_(doc), ss_(ss) { }
+
+ virtual void save_to_string(std::string &s) const
+ {
+ xmlChar *xml_string;
+ int xml_string_length;
+
+ if (xsltSaveResultToString(&xml_string, &xml_string_length, doc_, ss_) >= 0)
+ {
+ xml::xmlchar_helper helper(xml_string);
+ if (xml_string_length) s.assign(helper.get(), xml_string_length);
+ }
+ }
+
+ virtual bool
+ save_to_file (const char *filename, int /* compression_level */) const
+ {
+ return xsltSaveResultToFilename(filename, doc_, ss_, 0) >= 0;
+ }
+
+private:
+ xmlDocPtr doc_;
+ xsltStylesheetPtr ss_;
+};
+
+} // end of anonymous namespace
+
//####################################################################
namespace {
void make_vector_param (std::vector<const char*> &v, const xslt::stylesheet::param_type &p);
@@ -114,7 +153,7 @@
xmlDocPtr xmldoc = apply_stylesheet(pimpl_->ss_, input);
if (xmldoc) {
- result.set_doc_data_from_xslt(xmldoc, pimpl_->ss_);
+ result.set_doc_data_from_xslt(xmldoc, new result_impl(xmldoc, pimpl_->ss_));
return true;
}
@@ -126,7 +165,7 @@
xmlDocPtr xmldoc = apply_stylesheet(pimpl_->ss_, input, &with_params);
if (xmldoc) {
- result.set_doc_data_from_xslt(xmldoc, pimpl_->ss_);
+ result.set_doc_data_from_xslt(xmldoc, new result_impl(xmldoc, pimpl_->ss_));
return true;
}
@@ -142,7 +181,7 @@
throw std::runtime_error(pimpl_->error_);
}
- pimpl_->doc_.set_doc_data_from_xslt(xmldoc, pimpl_->ss_);
+ pimpl_->doc_.set_doc_data_from_xslt(xmldoc, new result_impl(xmldoc, pimpl_->ss_));
return pimpl_->doc_;
}
//####################################################################
@@ -155,7 +194,7 @@
throw std::runtime_error(pimpl_->error_);
}
- pimpl_->doc_.set_doc_data_from_xslt(xmldoc, pimpl_->ss_);
+ pimpl_->doc_.set_doc_data_from_xslt(xmldoc, new result_impl(xmldoc, pimpl_->ss_));
return pimpl_->doc_;
}
//####################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-24 02:27:15
|
Revision: 96
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=96&view=rev
Author: vaclavslavik
Date: 2008-11-24 02:27:10 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
all versions of VC++ lack vsnprintf(), not just VC6 (Vadim Zeitlin)
Modified Paths:
--------------
trunk/src/libxml/utility.cxx
Modified: trunk/src/libxml/utility.cxx
===================================================================
--- trunk/src/libxml/utility.cxx 2008-11-16 22:32:04 UTC (rev 95)
+++ trunk/src/libxml/utility.cxx 2008-11-24 02:27:10 UTC (rev 96)
@@ -36,8 +36,8 @@
#include <cstring>
#include <string>
-// hack to pull in vsnprintf for MSVC6
-#if (defined(_MSC_VER) && _MSC_VER <= 1200) || (defined(__COMO__) && defined(__WIN32__))
+// hack to pull in vsnprintf for MSVC
+#if defined(_MSC_VER) || (defined(__COMO__) && defined(__WIN32__))
# undef vsnprintf
# define vsnprintf _vsnprintf
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 22:32:07
|
Revision: 95
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=95&view=rev
Author: vaclavslavik
Date: 2008-11-16 22:32:04 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
tagged 0.5.1 release
Added Paths:
-----------
tags/release-0.5.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 20:15:33
|
Revision: 94
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=94&view=rev
Author: vaclavslavik
Date: 2008-11-16 20:15:23 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
added more contributors from the docs
Modified Paths:
--------------
trunk/AUTHORS
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2008-11-16 20:11:14 UTC (rev 93)
+++ trunk/AUTHORS 2008-11-16 20:15:23 UTC (rev 94)
@@ -6,6 +6,9 @@
Eric Beyeler <eri...@us...>
Tom Browder <tbr...@us...>
-Patches:
+Other contributors:
Tiziano Mueller <ti...@us...>
Greg Chicares <gch...@sb...>
+ Daniel Evison
+ Frank Grimm
+ Gary Passero
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 20:11:19
|
Revision: 93
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=93&view=rev
Author: vaclavslavik
Date: 2008-11-16 20:11:14 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
increased version to 0.5.1
Modified Paths:
--------------
trunk/docs/VERSION
Modified: trunk/docs/VERSION
===================================================================
--- trunk/docs/VERSION 2008-11-16 19:56:13 UTC (rev 92)
+++ trunk/docs/VERSION 2008-11-16 20:11:14 UTC (rev 93)
@@ -1,3 +1,4 @@
+0.5.1 5 2 REL-0_5_1 2008/11/16
0.5.0 5 2 REL-0_5_0 2004/03/18
0.4.4 4 1 REL-0_4_4 2003/10/29
0.4.3 4 1 REL-0_4_3 2003/08/19
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 19:56:15
|
Revision: 92
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=92&view=rev
Author: vaclavslavik
Date: 2008-11-16 19:56:13 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
updated ChangeLog with 0.5.1 changes
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-16 19:51:16 UTC (rev 91)
+++ trunk/ChangeLog 2008-11-16 19:56:13 UTC (rev 92)
@@ -1,3 +1,11 @@
+Version 0.5.1
+
+ Various compilation fixes.
+
+Version 0.5.0
+
+ ?
+
Version 0.4.4
Small changes so that xmlwrapp can work with libxml2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 19:51:19
|
Revision: 91
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=91&view=rev
Author: vaclavslavik
Date: 2008-11-16 19:51:16 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
update tests to pass with recent libxml2/libxslt (see #1748889)
Modified Paths:
--------------
trunk/tests/attributes/data/09.xml
trunk/tests/attributes/data/10.xml
trunk/tests/document/data/14.out
Modified: trunk/tests/attributes/data/09.xml
===================================================================
--- trunk/tests/attributes/data/09.xml 2008-11-16 01:42:02 UTC (rev 90)
+++ trunk/tests/attributes/data/09.xml 2008-11-16 19:51:16 UTC (rev 91)
@@ -1,2 +1,2 @@
-<!DOCTYPE root SYSTEM "data/09.dtd">
+<!DOCTYPE root SYSTEM "09.dtd">
<root one="1"/>
Modified: trunk/tests/attributes/data/10.xml
===================================================================
--- trunk/tests/attributes/data/10.xml 2008-11-16 01:42:02 UTC (rev 90)
+++ trunk/tests/attributes/data/10.xml 2008-11-16 19:51:16 UTC (rev 91)
@@ -1,3 +1,3 @@
<?xml version="1.0" ?>
-<!DOCTYPE example SYSTEM "data/10.dtd">
+<!DOCTYPE example SYSTEM "10.dtd">
<example>See?</example>
Modified: trunk/tests/document/data/14.out
===================================================================
--- trunk/tests/document/data/14.out 2008-11-16 01:42:02 UTC (rev 90)
+++ trunk/tests/document/data/14.out 2008-11-16 19:51:16 UTC (rev 91)
@@ -2,6 +2,6 @@
<?xml version="1.0"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
<child>
- <subchild xml:base="data/14inc.xml"><innerchild self="yes"/></subchild>
+ <subchild><innerchild self="yes"/></subchild>
</child>
</root>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 02:22:07
|
Revision: 88
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=88&view=rev
Author: vaclavslavik
Date: 2008-11-16 01:32:26 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
removed text/tree_reader.* files, they were never finished and didn't contain working (or compilable) code
Removed Paths:
-------------
trunk/include/xmlwrapp/text_reader.h
trunk/src/libxml/text_reader.cxx
Deleted: trunk/include/xmlwrapp/text_reader.h
===================================================================
--- trunk/include/xmlwrapp/text_reader.h 2008-11-16 01:30:21 UTC (rev 87)
+++ trunk/include/xmlwrapp/text_reader.h 2008-11-16 01:32:26 UTC (rev 88)
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2005 Thomas M. Browder, Jr.
- * <tbr...@us...>
- * All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of the Author nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/** @file
- * This file contains the definition of the xml::tree_reader class.
-**/
-
-#ifndef _xmlwrapp_tree_reader_h_
-#define _xmlwrapp_tree_reader_h_
-
-// standard includes
-#include <cstddef>
-#include <string>
-
-namespace xml {
-
- // forward declarations
- struct tree_impl;
- class document;
-
- /**
- * The xml::tree_reader class is used to parse an XML document and generate
- * a tree like structure of xml::node objects. After constructing a
- * tree_reader, with either a file to parse or some in memory data to parse,
- * you can walk the tree using the xml::node interface.
- **/
- class tree_reader {
- public:
- typedef std::size_t size_type;
-
- //####################################################################
- /**
- * xml::tree_reader class constructor. Given the name of a file, this
- * constructor will parse that file.
- *
- * There are two options for dealing with XML parsing errors. The
- * default it to throw an exception (std::runtime_error). The other
- * option is to pass false for the allow_exceptions flag. This will
- * prevent an exception from being thrown, instead, a flag will be set
- * that you can test with the operator! member function.
- *
- * No matter what option you choose, this constructor may still throw
- * exceptions for memory failure or other non-parsing related failures.
- *
- * @param filename The name of the file to parse.
- * @param allow_exceptions Whether or not you want an exception for parsing errors.
- * @author Peter Jones
- **/
- //####################################################################
- tree_reader (const char *filename, bool allow_exceptions=true);
-
- //####################################################################
- /**
- * xml::tree_reader class constructor. Given some data and the size of
- * that data, parse that data as XML. To see if the data was parsed
- * successfully use operator!.
- *
- * @param data The XML data to parse.
- * @param size The size of the XML data to parse.
- * @param allow_exceptions Whether or not you want an exception for parsing errors.
- * @author Peter Jones
- **/
- //####################################################################
- tree_reader (const char *data, size_type size, bool allow_exceptions=true);
-
- //####################################################################
- /**
- * xml::tree_reader class destructor.
- *
- * @author Peter Jones
- **/
- //####################################################################
- ~tree_reader (void);
-
- //####################################################################
- /**
- * Check to see if a xml::tree_reader class is vaild. That is, check to
- * see if parsing XML data was successful and the tree_reader holds a
- * good XML node tree.
- *
- * @return True if the tree_reader is NOT VAILD; false if it is vaild.
- * @author Peter Jones
- **/
- //####################################################################
- bool operator! (void) const;
-
- //####################################################################
- /**
- * If operator! indicates that there was an error parsing your XML data,
- * you can use this member function to get the error message that was
- * generated durring parsing.
- *
- * @return The error message generated durring XML parsing.
- * @author Peter Jones
- **/
- //####################################################################
- const std::string& get_error_message (void) const;
-
- //####################################################################
- /**
- * Check to see if there were any warnings from the parser while
- * processing the given XML data. If there were, you may want to send
- * the same document through xmllint or the event_parser to catch and
- * review the warning messages.
- *
- * @return True if there were any warnings.
- * @return False if there were no warnings.
- * @author Peter Jones
- **/
- //####################################################################
- bool had_warnings (void) const;
-
- //####################################################################
- /**
- * Get a reference to the xml::document that was generated during the
- * XML parsing. You should make sure to only use a reference to the
- * document to avoid a deep copy.
- *
- * @return A reference to the xml::document.
- * @author Peter Jones
- **/
- //####################################################################
- xml::document& get_document (void);
-
- //####################################################################
- /**
- * Get a const reference to the xml::document that was generated during
- * the XML parsing. You should make sure to only use a reference to the
- * document to avoid a deep copy.
- *
- * @return A const reference to the xml::document.
- * @author Peter Jones
- **/
- //####################################################################
- const xml::document& get_document (void) const;
- private:
- tree_impl *pimpl_; // private implementation
-
- /*
- * Don't allow anyone to copy construct a xml::tree_reader or allow the
- * assignment operator to be called. It is not very useful to copy a
- * parser that has already parsed half a document.
- */
- tree_reader (const tree_reader&);
- tree_reader& operator= (const tree_reader&);
- }; // end xml::tree_reader class
-
-} // end xml namespace
-#endif
Deleted: trunk/src/libxml/text_reader.cxx
===================================================================
--- trunk/src/libxml/text_reader.cxx 2008-11-16 01:30:21 UTC (rev 87)
+++ trunk/src/libxml/text_reader.cxx 2008-11-16 01:32:26 UTC (rev 88)
@@ -1,198 +0,0 @@
-/*
- * Copyright (C) 2005 Thomas M. Browder, Jr.
- * <tbr...@us...>
- * All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of the Author nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/** @file
- * This file contains the implementation of the xml::tree_reader class for
- * the libxml2 XML parser.
-**/
-
-// xmlwrapp includes
-#include "xmlwrapp/tree_reader.h"
-#include "xmlwrapp/document.h"
-#include "utility.h"
-
-// libxml includes
-#include <libxml/parser.h>
-#include <libxml/parserInternals.h>
-#include <libxml/SAX.h>
-#include <libxml/xmlversion.h>
-
-// standard includes
-#include <stdexcept>
-#include <cstring>
-#include <string>
-#include <memory>
-
-//####################################################################
-namespace {
- const char const_default_error[] = "unknown XML parsing error";
-
- extern "C" void cb_tree_error (void *v, const char *message, ...);
- extern "C" void cb_tree_warning (void *v, const char *, ...);
- extern "C" void cb_tree_ignore (void*, const xmlChar*, int);
-}
-//####################################################################
-struct xml::tree_impl {
- tree_impl (void) : last_error_(const_default_error), warnings_(false), okay_(false) {
- std::memset(&sax_, 0, sizeof(sax_));
- initxmlDefaultSAXHandler(&sax_, 0);
-
- sax_.warning = cb_tree_warning;
- sax_.error = cb_tree_error;
- sax_.fatalError = cb_tree_error;
-
- if (xmlKeepBlanksDefaultValue == 0) sax_.ignorableWhitespace = cb_tree_ignore;
- }
-
- document doc_;
- xmlSAXHandler sax_;
- std::string last_error_;
- bool warnings_;
- bool okay_;
-};
-
-//####################################################################
-xml::tree_reader::tree_reader (const char *name, bool allow_exceptions) {
- std::auto_ptr<tree_impl> ap(pimpl_ = new tree_impl);
-
- xmlDocPtr tmpdoc = xmlSAXParseFileWithData(&(pimpl_->sax_), name, 0, pimpl_);
- if (allow_exceptions && !tmpdoc) throw std::runtime_error(pimpl_->last_error_);
-
- if (tmpdoc) {
- pimpl_->doc_.set_doc_data(tmpdoc);
- pimpl_->okay_ = true;
- }
-
- ap.release();
-}
-//####################################################################
-xml::tree_reader::tree_reader (const char *data, size_type size, bool allow_exceptions) {
- std::auto_ptr<tree_impl> ap(pimpl_ = new tree_impl);
- xmlParserCtxtPtr ctxt;
-
- if ( (ctxt = xmlCreateMemoryParserCtxt(data, size)) == 0) {
- throw std::bad_alloc();
- }
-
- if (ctxt->sax) xmlFree(ctxt->sax);
- ctxt->sax = &(pimpl_->sax_);
-
- ctxt->_private = pimpl_;
-
- xmlParseDocument(ctxt);
-
- if (!ctxt->wellFormed) {
- xmlFreeDoc(ctxt->myDoc);
- ctxt->myDoc = 0;
- ctxt->sax = 0;
- xmlFreeParserCtxt(ctxt);
-
- if (allow_exceptions) throw std::runtime_error(pimpl_->last_error_);
- ap.release(); return; // handle non-exception case
- }
-
- pimpl_->doc_.set_doc_data(ctxt->myDoc);
- pimpl_->okay_ = true;
- ctxt->sax = 0;
-
- xmlFreeParserCtxt(ctxt);
- ap.release();
-}
-
-//####################################################################
-xml::tree_reader::~tree_reader (void) {
- delete pimpl_;
-}
-
-//####################################################################
-bool xml::tree_reader::operator! (void) const {
- return !pimpl_->okay_;
-}
-
-//####################################################################
-const std::string& xml::tree_reader::get_error_message (void) const {
- return pimpl_->last_error_;
-}
-
-//####################################################################
-bool xml::tree_reader::had_warnings (void) const {
- return pimpl_->warnings_;
-}
-
-//####################################################################
-xml::document& xml::tree_reader::get_document (void) {
- return pimpl_->doc_;
-}
-
-//####################################################################
-const xml::document& xml::tree_reader::get_document (void) const {
- return pimpl_->doc_;
-}
-
-//####################################################################
-namespace {
- //####################################################################
- extern "C" void cb_tree_error (void *v, const char *message, ...) {
- try {
-
- xmlParserCtxtPtr ctxt = static_cast<xmlParserCtxtPtr>(v);
- xml::tree_impl *p = static_cast<xml::tree_impl*>(ctxt->_private);
- if (!p) return; // handle bug in older versions of libxml
-
- va_list ap;
- va_start(ap, message);
- xml::printf2string(p->last_error_, message, ap);
- va_end(ap);
-
- xmlStopParser(ctxt);
- } catch (...) { }
- }
- //####################################################################
- extern "C" void cb_tree_warning (void *v, const char *, ...) {
- try {
-
- xmlParserCtxtPtr ctxt = static_cast<xmlParserCtxtPtr>(v);
- xml::tree_impl *p = static_cast<xml::tree_impl*>(ctxt->_private);
- if (!p) return; // handle bug in older versions of libxml
-
- p->warnings_ = true;
-
- } catch (...) { }
- }
- //####################################################################
- extern "C" void cb_tree_ignore (void*, const xmlChar*, int) {
- return;
- }
- //####################################################################
-}
-//####################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 01:40:19
|
Revision: 89
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=89&view=rev
Author: vaclavslavik
Date: 2008-11-16 01:40:16 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
fix ISO C++ compilation -- include missing C++ standard headers (patch by Greg Chicares)
Modified Paths:
--------------
trunk/AUTHORS
trunk/include/xmlwrapp/event_parser.h
trunk/src/libxml/node.cxx
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2008-11-16 01:32:26 UTC (rev 88)
+++ trunk/AUTHORS 2008-11-16 01:40:16 UTC (rev 89)
@@ -8,3 +8,4 @@
Patches:
Tiziano Mueller <ti...@us...>
+ Greg Chicares <gch...@sb...>
Modified: trunk/include/xmlwrapp/event_parser.h
===================================================================
--- trunk/include/xmlwrapp/event_parser.h 2008-11-16 01:32:26 UTC (rev 88)
+++ trunk/include/xmlwrapp/event_parser.h 2008-11-16 01:40:16 UTC (rev 89)
@@ -38,6 +38,7 @@
#define _xmlwrapp_event_parser_h_
// standard includes
+#include <cstddef>
#include <string>
#include <iosfwd>
#include <map>
Modified: trunk/src/libxml/node.cxx
===================================================================
--- trunk/src/libxml/node.cxx 2008-11-16 01:32:26 UTC (rev 88)
+++ trunk/src/libxml/node.cxx 2008-11-16 01:40:16 UTC (rev 89)
@@ -42,6 +42,7 @@
#include "node_manip.h"
// standard includes
+#include <cstring>
#include <new>
#include <memory>
#include <string>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 00:16:43
|
Revision: 86
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=86&view=rev
Author: vaclavslavik
Date: 2008-11-16 00:16:37 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
fix compilation with gcc 4.2+ (patch #1748887 by Tiziano Mueller)
Modified Paths:
--------------
trunk/src/libxml/node.cxx
Modified: trunk/src/libxml/node.cxx
===================================================================
--- trunk/src/libxml/node.cxx 2008-11-16 00:11:10 UTC (rev 85)
+++ trunk/src/libxml/node.cxx 2008-11-16 00:16:37 UTC (rev 86)
@@ -512,10 +512,12 @@
}
}
//####################################################################
-std::ostream& xml::operator<< (std::ostream &stream, const xml::node &n) {
- std::string xmldata;
- n.node_to_string(xmldata);
- stream << xmldata;
- return stream;
+namespace xml {
+ std::ostream& operator<< (std::ostream &stream, const xml::node &n) {
+ std::string xmldata;
+ n.node_to_string(xmldata);
+ stream << xmldata;
+ return stream;
+ }
}
//####################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vac...@us...> - 2008-11-16 00:11:14
|
Revision: 85
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=85&view=rev
Author: vaclavslavik
Date: 2008-11-16 00:11:10 +0000 (Sun, 16 Nov 2008)
Log Message:
-----------
fixed libxslt check
Modified Paths:
--------------
trunk/configure.pl
Modified: trunk/configure.pl
===================================================================
--- trunk/configure.pl 2008-11-15 23:58:09 UTC (rev 84)
+++ trunk/configure.pl 2008-11-16 00:11:10 UTC (rev 85)
@@ -266,7 +266,7 @@
if ($xmllib eq 'xslt' && 1) {
# hack
- $output = '-I/usr/local/include/libxml2';
+ $output = $output . ' -I/usr/local/include/libxml2';
if (0) {
my $cmd = $clo{$config};
print "DEBUG: cmd = '$cmd'...\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|