Permalink
Switch branches/tags
Nothing to show
Commits on May 12, 2012
  1. Use buffers when constructing string node lists.

    Before this change xmlStringGetNodeList would perform a realloc() of the
    entire new content for every XML entity in the assigned text in order to
    merge together adjacent text nodes. This had the effect of making
    xmlSetNodeContent O(n^2), which led to unexpectedly bad performance on
    inputs that contained a large number of XML entities.
    
    After this change the memory management is done by the buffer API,
    avoiding the need to continually re-measure and realloc() the string.
    
    For my test data (6MB of 80 character lines, each ending with 
)
    this takes the time to xmlSetNodeContent from about 500 seconds to
    around 50ms. I have not profiled smaller cases, though I tried to
    minimize the performance impact of my change by avoiding unnecessary
    string copying.
    
    Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
    committed May 11, 2012
Commits on May 11, 2012
  1. HTML parser error with <noscript> in the <head>

    For https://bugzilla.gnome.org/show_bug.cgi?id=615785
    When the <noscript> is found, <head> is closed and a <body> element is created.
    The real <body id="xxx"> gets skipped over, so I can't see any of the
    body's attributes.
    Just don't close <head> when encountering a <noscript>
    Add a regression test too
    0lvin committed with veillard May 11, 2012
  2. XSD: optional element in complex type extension

    For https://bugzilla.gnome.org/show_bug.cgi?id=609796
    Libxml2 fails to validate an instance document against a schema if an element
    whose type is a complex extension of some base type with an optional child
    element and that child element is not specified in the instance document.  For
    example, suppose I have some complex type BaseType that is defined to have one
    child element in a sequence group that has minOccurs set to 0
    Remi Gacogne committed with veillard May 11, 2012
  3. Fix html serialization error and htmlSetMetaEncoding()

    For https://bugzilla.gnome.org/show_bug.cgi?id=630682
    The python tests were reporting errors, some of it was due to
    a small change in case encoding, but the main one was about
    htmlSetMetaEncoding(doc, NULL) being broken by not removing
    the associated meta tag anymore
    veillard committed May 11, 2012
  4. Fix an uninitialized variable use

    When compiled without SAX1 support
    veillard committed May 11, 2012
  5. Fix a compilation problem with --minimum

    For https://bugzilla.gnome.org/show_bug.cgi?id=636750
    Moved a #endif /* LIBXML_OUTPUT_ENABLED */ a few lines down
    to avoid reference an undefined variable
    bslack committed with veillard May 11, 2012
  6. Remove redundant and ungarded include of resolv.h

    For https://bugzilla.gnome.org/show_bug.cgi?id=617053
    This broke the build on Interix-6.0
    veillard committed May 11, 2012
Commits on May 10, 2012
  1. Remove git error message during configure

    For https://bugzilla.gnome.org/show_bug.cgi?id=635531
    If git is not installed but .git was found configure would emit an
    error message
    kalikiana committed with veillard May 10, 2012
  2. emove a bashism in confgure.in

    Not portable, broke on old FreeBSD
    John Hein committed with veillard May 10, 2012
  3. xinclude with parse="text" does not use the entity loader

    For https://bugzilla.gnome.org/show_bug.cgi?id=552479
    
    The code for xinclude parse="text" was not using the registered
    entity loader, defeating attempts to control loading of files.
    shaunix committed with veillard May 10, 2012
  4. Allow to parse 1 byte HTML files

    For https://bugzilla.gnome.org/show_bug.cgi?id=605740
    
    File 1 byte long were not accepted by the HTML push parser
    0lvin committed with veillard May 10, 2012
  5. undef ERROR if already defined

    paroga committed with veillard May 10, 2012
  6. Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag

    For https://bugzilla.gnome.org/show_bug.cgi?id=642916
    
    I just noticed that the HTML_PARSE_NOIMPLIED flag that you can pass to the
    HTML-Parser methods doesn't do anything. Its intended purpose is to stop the
    HTML-parser from forcibly adding a pair of html/body tags if the stream does
    not contain any.
    
    This is highly useful when you don't need this level of strictness.
    Unfortunately, specifying it doesn't work, because the option is not
    copied into the parsing context.
    HedAurabesh committed with veillard May 10, 2012
  7. Avoid memory leak if xmlParserInputBufferCreateIO fails

    For https://bugzilla.gnome.org/show_bug.cgi?id=643949
    
    In case of error on an IO creation input the given context
    is terminated with the given close function, except if the
    error happened in xmlParserInputBufferCreateIO. This can
    lead to a resource leak which is fixed by this patch.
    record committed with veillard May 10, 2012
  8. Add HTML parser support for HTML5 meta charset encoding declaration

    For https://bugzilla.gnome.org/show_bug.cgi?id=655218
    
    http://www.w3.org/TR/2011/WD-html5-20110525/semantics.html#the-meta-element
    
    """
    The charset attribute specifies the character encoding used by the document.
    This is a character encoding declaration. If the attribute is present in an XML
    document, its value must be an ASCII case-insensitive match for the string
    "UTF-8" (and the document is therefore forced to use UTF-8 as its
    encoding).
    """
    
    However, while <meta http-equiv="Content-Type" content="text/html;
    charset=utf8"> works, <meta charset="utf8"> does not.
    
    While libxml2 HTML parser is not tuned for HTML5, this is a simple
    addition
    
    Also added a testcase
    0lvin committed with veillard May 10, 2012
  9. Fix library problems with mingw-w64

    For https://bugzilla.gnome.org/show_bug.cgi?id=663588
    Fix a windows only issue when compiling the library with
    MingW (64 bits) using Fedora cross-compiler chain.
    Change the dllexport for data
    mooninite committed with veillard May 10, 2012
Commits on May 9, 2012
  1. fix windows build.

    ifdef addition from bug 666491 makes no sense
    robrichards committed May 9, 2012
  2. prefer native threads on win32

    For https://bugzilla.gnome.org/show_bug.cgi?id=665526
    
    When building on Win32 configure the suport to use native Windows
    threads since there is support for it unless pthreads are found
    and asked for explicitely
    ssssam committed with veillard May 9, 2012
  3. Allow to compile with Visual Studio 2010

    For https://bugzilla.gnome.org/show_bug.cgi?id=666491
    
    This patch adds project files to compile and debug libxml2 using Visual
    Studio 2010. Only few minor changes have been made to the actual source
    code.
    
    This patch also requires for the iconv package to be compiled with visual
    studio 2010 which has been submitted to the iconv project (see:
    https://savannah.gnu.org/bugs/?35088)
    Thomas Lemm committed with veillard May 9, 2012
Commits on May 8, 2012
  1. Prevent an infinite loop when dumping a node with encoding problems

    When a node is dumped with a new encoding, we may encounter characters
    that are not supported in the new encoding. libxml2 handles this by
    replacing the character with character references, but in some encodings
    this can result in an infinite loop when the character references
    themselves contain unsupported characters.
    
    This fixes the infinite loop by undoing a character reference substitution
    when it cannot be inserted, and returning an encoder error.
    
    This bug was noticed when looking into an infinite loop bug report for
    the Ruby Nokogiri project. The original bug report, "nokogiri process
    hangs on call to inner_html" is here:
    https://github.com/tenderlove/nokogiri/issues/400
    ender672 committed with veillard May 8, 2012
  2. wrong message for double hyphen in comment XML error

    The error message when you have a double hyphen in a comment is "comment
    not terminated" and should be "double hyphen in comment".
    giraffedata committed with veillard May 8, 2012
  3. xmlParseNodeInContext problems with an empty document

    When you call xmlParseNodeInContext on a fragment node with an
    empty document, the parser associates the first new node twice --
    once with the document, and once with the fragment node.
    
    This fixes the issue by only associating the new node with the
    fragment node.
    ender672 committed with veillard Jan 18, 2012
  4. HTML element position is not detected propperly

    The data in node_seq in xmlParserCtxt was not updated properly
    when parsing HTML. This patch fixes the accounting for both
    pull and push mode of HTML parsing.
    p-an committed with veillard May 8, 2012
  5. Fix mingw's snprintf configure check

    For mingw, snprintf is defined as _snprintf and therefore the check
    should be for _snprintf. This applies to _vsnprintf too.
    ylatuya committed with veillard May 8, 2012
Commits on May 7, 2012
  1. Add "whereis" command to xmllint shell

    When playing with xpath in the xmllint shell, it's really handy to be
    able to ask where the returned nodes live in the tree, in the same
    way "pwd" asks where the current node lives.
    
    The feature is actually quite easy to implement by combining the
    functionality of the existing dir/ls and pwd commands (see proposed patch).
    
    Example usage:
    
    / > whereis //last_name
    /clinical_study/overall_official/last_name
    /clinical_study/location/contact/last_name
    /clinical_study/location/investigator/last_name
    Ryan committed with veillard May 7, 2012
  2. fixed a 64bit big endian issue

    For https://bugzilla.gnome.org/show_bug.cgi?id=671176
    patch fixes a 64bit endian issue, making libxml2 work (again) on ppc64
    unsigned int and size_t are differently sized on 64bit.
    msmeissn committed with veillard May 7, 2012
  3. Improve xmllint shell

    For https://bugzilla.gnome.org/show_bug.cgi?id=310222
    
    adds namespace support to ls, du and the element named in
    the command shell prompt. It also fixes du to actually dump
    the requested path, if the user gives one, rather than always
    dumping the whole file.
    Ryan committed with veillard May 7, 2012
  4. Update README.tests

    document make check, make valgrind and fix a typo pointed out by
    Daniel Neel <dneelyep@gmail.com>
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=617019
    
    Daniel
    veillard committed May 7, 2012
  5. Fix an off by one pointer access

    getting out of the range of memory allocated for xpointer decoding
    Jüri Aedla committed with veillard May 7, 2012
  6. URI handling code is not OOM resilient

    as pointed out by Dan Berrange, add a small comment in the header
    veillard committed May 7, 2012
  7. Fix an error in comment

    nsWarn handler is not about parser fatal errors
    veillard committed May 7, 2012