Permalink
Commits on Dec 1, 2016
  1. Fix a typo in the NEWS file

    vadz committed Dec 1, 2016
Commits on Nov 29, 2016
  1. Increase version to 0.8.0

    vadz committed Nov 29, 2016
Commits on Sep 14, 2016
  1. Merge branch 'save-errors'

    Throw exceptions for the errors happening when saving the documents and during
    other operations and not only when loading them.
    vadz committed Sep 14, 2016
  2. Don't suppress all libxml2 errors by default

    It's not especially useful to show libxml2 error messages on stderr,
    especially under Windows, but it's even worse to not show them anywhere at all
    and silently ignore all errors.
    
    Don't do this any longer, errors should be handled by adding code using
    xml::impl::global_errors_collector to the functions where they may happen, as
    it was done in the previous commits on this branch.
    vadz committed Sep 12, 2016
  3. Throw exception when evaluating an invalid XPath expression

    Propagate libxslt and libxml2 error messages to the application as exceptions
    by default instead of simply ignoring them.
    vadz committed Sep 12, 2016
  4. Add "do nothing" ignore_errors error handler

    This could be useful for maintaining backwards-compatible behaviour instead of
    throwing an exception in case of error as document::save_to_{string,file}
    already does and more functions will do in the future.
    vadz committed Sep 12, 2016
Commits on Sep 12, 2016
  1. Make set of xpath_context::evaluate() overloads more maintainable

    Don't duplicate comments and (even if it's just a single line) code to make
    modifying these functions simpler in the future.
    vadz committed Sep 12, 2016
  2. Catch libxml2 errors when applying style sheets too

    In addition to XSLT errors, using an invalid style sheet can generate errors
    in libxml2 too, so catch them as well when doing this.
    vadz committed Sep 12, 2016
  3. Return libxml2 IO errors correctly to the user code

    It's simpler and better (as libxml2 may have more details) to just return the
    errors logged by libxml2 global error handler to the caller, instead of
    checking whether the input file could be opened ourselves.
    
    This does change the format of the error message, which now takes the form
    
    	I/O warning : failed to load external entity "$filename"
    
    so update the unit test to make it less strict: we don't really care about the
    exact message, just that it mentions the file that we failed to open.
    vadz committed Sep 12, 2016
  4. Make it possible to install a different object as libxml2 error sink

    Generalize global_errors_collector by factoring out global_errors_installer
    from it to allow installing other, already existing, error_message objects as
    global error sinks.
    
    This is not used yet, but will be in the upcoming commits.
    vadz committed Sep 12, 2016
  5. Improve error handling in document::save_to_{string,file}()

    Throw an exception if any errors occur while saving (this can happen if the
    document contains nodes with not well-formed UTF-8 text, for example) instead
    of ignoring any errors and silently losing data.
    
    Also make it possible to pass a custom on_error handler to these functions,
    just as it was already possible when loading the document.
    vadz committed Sep 12, 2016
  6. Refactor code temporarily changing document compression parameter

    Use a RAII-based helper instead of manually changing and restoring this field.
    This is less error-prone and will remain correct even in presence of
    exceptions.
    
    No real changes in this commit.
    vadz committed Sep 12, 2016
Commits on Sep 11, 2016
  1. Ensure that temporary test file is always deleted

    Use a tiny RAII helper to delete the temporary file created by the document
    tests on scope exit, even if the test fails.
    vadz committed Sep 11, 2016
  2. Don't leak memory when creating a document object fails

    There is no need to allocate a new doc_impl when creating a document from file
    or data, it's not used at all in the normal case after a call to swap() and is
    simply leaked if an error occurs.
    
    This fixes memory leak reports from MSVC debug CRT and, perhaps more
    importantly, avoids an unnecessary allocation in the normal case.
    vadz committed Sep 11, 2016
  3. Fix warnings about signed/unsigned comparison in MSVS tests build

    Compiling tests code with MSVS at "all" warning level gave several warnings
    about comparing signed literal values with unsigned result of calling size().
    Fix these warnings by making the literals unsigned as well.
    vadz committed Sep 11, 2016
  4. Merge branch 'windows-tests'

    vadz committed Sep 11, 2016
  5. Generate MSVS projects for building the test suite too

    Make it possible to build (and run) the unit test suite under Windows too.
    vadz committed Sep 11, 2016
  6. Use reasonably maximal warning level for MSVS projects

    Use bakefile "all" warnings level and fix two warnings that appeared when
    using it with MSVS 2015.
    vadz committed Sep 11, 2016
  7. Allow skipping building a single test case using zlib

    This is especially useful under Windows where zlib might not be available out
    of the box, unlike under Unix systems which always have it, because the test
    suite can avoid linking to it then.
    
    By default, zlib is still required and XMLWRAPP_NO_ZLIB needs to be explicitly
    predefined to avoid depending on it.
    vadz committed Sep 11, 2016
  8. Allow linking Boost.Test statically in the test suite

    This is especially useful under Windows where it's built as a static library
    by bjam by default.
    
    By default, it is still used dynamically and XMLWRAPP_NO_BOOST_TEST_DYN_LINK
    needs to be explicitly predefined when building to avoid it.
    vadz committed Sep 11, 2016
Commits on Sep 9, 2016
  1. Generate project files for MSVS 2013 and 2015 in bakefile too

    Just support newer versions of the compiler in exactly the same way as we
    already supported the previous ones.
    vadz committed Sep 9, 2016
Commits on Jul 25, 2016
  1. Fix crashes in some of xslt::stylesheet::apply() overloads

    If the provided on_error handler doesn't throw an exception (e.g. if it's an
    xml::error_messages object), don't crash in apply() overloads returning the
    result of the transformation.
    
    Just check for apply_stylesheet() success there too, just as it was already
    done in the overloads using the "result" document object.
    
    See #31.
    vadz committed with Jul 25, 2016
  2. Merge pull request #32 from vslavik/suncc-fixes

    Sun CC fixes
    committed on GitHub Jul 25, 2016
Commits on Jul 20, 2016
  1. Fix compilation fix for ancient libxslt 1.1.15

    It didn't have xsltInit() yet, so just don't call it then.
    
    This is necessary to fix Solaris build which uses this version of the library.
    vadz committed Mar 17, 2015
  2. Fix compilation for calling convention mismatch with Sun CC

    We can't use extern "C" xmlXPathFreeObject pointer with xml_scoped_ptr<> which
    expects a C++ function pointer, so add an intermediate C++ helper function
    wrapping it to make compilation work with this compiler (whose behaviour is
    unusually picky but is 100% standard conforming in this aspect).
    vadz committed Jul 3, 2014
Commits on Apr 4, 2016
  1. Fix build with MSVS 2010, don't enable C++11 support for it

    While it does support std::unique_ptr<>, it doesn't support alias templates
    which we need to alias it to auto_ptr<>.
    vadz committed Apr 4, 2016
Commits on Feb 5, 2016
  1. Update copyright info

    committed Feb 5, 2016
Commits on Jan 13, 2016
  1. Enable testing in C++11 mode on Travis CI

    Add a build variant using -std=c++11 compiler flags.
    vadz committed Jan 13, 2016
  2. Fix warnings due to the use of auto_ptr<> in C++11 build

    Use std::unique_ptr<> when using C++11 while continuing to use auto_ptr<> in
    the C++03 case.
    
    Add a new cpp11.h private header which can (and hopefully will) be used to
    selectively enable other C++11 features later.
    vadz committed Jan 13, 2016
  3. Fix handling of --with-boost configure option

    The directory used with this option was used for configure checks but not when
    compiling our code, so while the checks passed, the build itself failed.
    
    Do use BOOST_CPPFLAGS set by BOOST_REQUIRE macro to fix this.
    vadz committed Jan 13, 2016
  4. Fix check for boost::singleton_pool in configure

    This check could never pass with a standard conforming C++03 compiler (such as
    g++ 4.x) because it uses a locally defined (inside the function main) struct
    tag as a template argument, so compiling the test program always failed.
    
    Confusingly, it did succeed in C++11 mode which resulted in other problems in
    this case but not when using C++98 even though they didn't have anything to do
    with the language dialect choice.
    vadz committed Jan 13, 2016
  5. Allow disabling building the documentation

    Add --disable-docs configure command line option similar to the existing
    --disable-tests which can be used to avoid building the documentation which is
    especially useful if Doxygen is not available.
    vadz committed Jan 13, 2016
Commits on Aug 2, 2015
  1. Update boost.m4

    Probably fixes #26.
    committed Aug 2, 2015
Commits on Apr 6, 2015
  1. Merge pull request #24 from vadz/insert-ns-fix

    Use parent namespace by default for the new nodes.
    vadz committed Apr 6, 2015