1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> 4<head> 5 <title>The XML C parser and toolkit of Gnome</title> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 7</head> 8<body bgcolor="#ffffff"> 9<h1 align="center">The XML C parser and toolkit of Gnome</h1> 10 11<h1>Note: this is the flat content of the <a href="index.html">web 12site</a></h1> 13 14<h1 style="text-align: center">libxml, a.k.a. gnome-xml</h1> 15 16<p></p> 17 18<p 19style="text-align: right; font-style: italic; font-size: 10pt">"Programming 20with libxml2 is like the thrilling embrace of an exotic stranger." <a 21href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark 22Pilgrim</a></p> 23 24<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project 25(but usable outside of the Gnome platform), it is free software available 26under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT 27License</a>. XML itself is a metalanguage to design markup languages, i.e. 28text language where semantic and structure are added to the content using 29extra "markup" information enclosed between angle brackets. HTML is the most 30well-known markup language. Though the library is written in C <a 31href="python.html">a variety of language bindings</a> make it available in 32other environments.</p> 33 34<p>Libxml2 is known to be very portable, the library should build and work 35without serious troubles on a variety of systems (Linux, Unix, Windows, 36CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)</p> 37 38<p>Libxml2 implements a number of existing standards related to markup 39languages:</p> 40<ul> 41 <li>the XML standard: <a 42 href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li> 43 <li>Namespaces in XML: <a 44 href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li> 45 <li>XML Base: <a 46 href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li> 47 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> : 48 Uniform Resource Identifiers <a 49 href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li> 50 <li>XML Path Language (XPath) 1.0: <a 51 href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li> 52 <li>HTML4 parser: <a 53 href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li> 54 <li>XML Pointer Language (XPointer) Version 1.0: <a 55 href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li> 56 <li>XML Inclusions (XInclude) Version 1.0: <a 57 href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li> 58 <li>ISO-8859-x encodings, as well as <a 59 href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8] 60 and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a> 61 [UTF-16] Unicode encodings, and more if using iconv support</li> 62 <li>part of SGML Open Technical Resolution TR9401:1997</li> 63 <li>XML Catalogs Working Draft 06 August 2001: <a 64 href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li> 65 <li>Canonical XML Version 1.0: <a 66 href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a> 67 and the Exclusive XML Canonicalization CR draft <a 68 href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li> 69 <li>Relax NG, ISO/IEC 19757-2:2003, <a 70 href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li> 71 <li>W3C XML Schemas Part 2: Datatypes <a 72 href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May 73 2001</a></li> 74 <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7 75 April 2004</li> 76</ul> 77 78<p>In most cases libxml2 tries to implement the specifications in a 79relatively strictly compliant way. As of release 2.4.16, libxml2 passed all 801800+ tests from the <a 81href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests 82Suite</a>.</p> 83 84<p>To some extent libxml2 provides support for the following additional 85specifications but doesn't claim to implement them completely:</p> 86<ul> 87 <li>Document Object Model (DOM) <a 88 href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a> 89 the document model, but it doesn't implement the API itself, gdome2 does 90 this on top of libxml2</li> 91 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> : 92 libxml2 implements a basic FTP client code</li> 93 <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> : 94 HTTP/1.0, again a basic HTTP client code</li> 95 <li>SAX: a SAX2 like interface and a minimal SAX1 implementation compatible 96 with early expat versions</li> 97</ul> 98 99<p>A partial implementation of <a 100href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part 1011: Structure</a> is being worked on but it would be far too early to make any 102conformance statement about it at the moment.</p> 103 104<p>Separate documents:</p> 105<ul> 106 <li><a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an 107 implementation of XSLT 1.0 and common extensions like EXSLT for 108 libxml2</li> 109 <li><a href="http://gdome2.cs.unibo.it/">the gdome2 page</a> 110 : a standard DOM2 implementation for libxml2</li> 111 <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an 112 implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML 113 Digital Signature</a> for libxml2</li> 114 <li>also check the related links section for more related and active 115 projects.</li> 116</ul> 117<p> Hosting sponsored by <a href="http://www.aoemedia.de/opensource-cms.html" 118>Open Source CMS services</a> from AOE media.</p> 119 120<p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p> 121 122<h2><a name="Introducti">Introduction</a></h2> 123 124<p>This document describes libxml, the <a 125href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the 126<a href="http://www.gnome.org/">Gnome</a> project. <a 127href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based 128structured documents/data.</p> 129 130<p>Here are some key points about libxml:</p> 131<ul> 132 <li>Libxml2 exports Push (progressive) and Pull (blocking) type parser 133 interfaces for both XML and HTML.</li> 134 <li>Libxml2 can do DTD validation at parse time, using a parsed document 135 instance, or with an arbitrary DTD.</li> 136 <li>Libxml2 includes complete <a 137 href="http://www.w3.org/TR/xpath">XPath</a>, <a 138 href="http://www.w3.org/TR/xptr">XPointer</a> and <a 139 href="http://www.w3.org/TR/xinclude">XInclude</a> implementations.</li> 140 <li>It is written in plain C, making as few assumptions as possible, and 141 sticking closely to ANSI C/POSIX for easy embedding. Works on 142 Linux/Unix/Windows, ported to a number of other platforms.</li> 143 <li>Basic support for HTTP and FTP client allowing applications to fetch 144 remote resources.</li> 145 <li>The design is modular, most of the extensions can be compiled out.</li> 146 <li>The internal document representation is as close as possible to the <a 147 href="http://www.w3.org/DOM/">DOM</a> interfaces.</li> 148 <li>Libxml2 also has a <a 149 href="http://www.megginson.com/SAX/index.html">SAX like interface</a>; 150 the interface is designed to be compatible with <a 151 href="http://www.jclark.com/xml/expat.html">Expat</a>.</li> 152 <li>This library is released under the <a 153 href="http://www.opensource.org/licenses/mit-license.html">MIT 154 License</a>. See the Copyright file in the distribution for the precise 155 wording.</li> 156</ul> 157 158<p>Warning: unless you are forced to because your application links with a 159Gnome-1.X library requiring it, <strong><span 160style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use 161libxml2</p> 162 163<h2><a name="FAQ">FAQ</a></h2> 164 165<p>Table of Contents:</p> 166<ul> 167 <li><a href="FAQ.html#License">License(s)</a></li> 168 <li><a href="FAQ.html#Installati">Installation</a></li> 169 <li><a href="FAQ.html#Compilatio">Compilation</a></li> 170 <li><a href="FAQ.html#Developer">Developer corner</a></li> 171</ul> 172 173<h3><a name="License">License</a>(s)</h3> 174<ol> 175 <li><em>Licensing Terms for libxml</em> 176 <p>libxml2 is released under the <a 177 href="http://www.opensource.org/licenses/mit-license.html">MIT 178 License</a>; see the file Copyright in the distribution for the precise 179 wording</p> 180 </li> 181 <li><em>Can I embed libxml2 in a proprietary application ?</em> 182 <p>Yes. The MIT License allows you to keep proprietary the changes you 183 made to libxml, but it would be graceful to send-back bug fixes and 184 improvements as patches for possible incorporation in the main 185 development tree.</p> 186 </li> 187</ol> 188 189<h3><a name="Installati">Installation</a></h3> 190<ol> 191 <li><strong><span style="background-color: #FF0000">Do Not Use 192 libxml1</span></strong>, use libxml2<p></p></li> 193 <li><em>Where can I get libxml</em> ? 194 <p>The original distribution comes from <a 195 href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> or <a 196 href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p> 197 <p>Most Linux and BSD distributions include libxml, this is probably the 198 safer way for end-users to use libxml.</p> 199 <p>David Doolin provides precompiled Windows versions at <a 200 href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p> 201 </li> 202 <li><em>I see libxml and libxml2 releases, which one should I install ?</em> 203 <ul> 204 <li>If you are not constrained by backward compatibility issues with 205 existing applications, install libxml2 only</li> 206 <li>If you are not doing development, you can safely install both. 207 Usually the packages <a 208 href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a 209 href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are 210 compatible (this is not the case for development packages).</li> 211 <li>If you are a developer and your system provides separate packaging 212 for shared libraries and the development components, it is possible 213 to install libxml and libxml2, and also <a 214 href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a> 215 and <a 216 href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a> 217 too for libxml2 >= 2.3.0</li> 218 <li>If you are developing a new application, please develop against 219 libxml2(-devel)</li> 220 </ul> 221 <p></p> 222 </li> 223 <li><em>I can't install the libxml package, it conflicts with libxml0</em> 224 <p>You probably have an old libxml0 package used to provide the shared 225 library for libxml.so.0, you can probably safely remove it. The libxml 226 packages provided on <a 227 href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> provide 228 libxml.so.0</p> 229 </li> 230 <li><em>I can't install the libxml(2) RPM package due to failed 231 dependencies</em> 232 <p>The most generic solution is to re-fetch the latest src.rpm , and 233 rebuild it locally with</p> 234 <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p> 235 <p>If everything goes well it will generate two binary rpm packages (one 236 providing the shared libs and xmllint, and the other one, the -devel 237 package, providing includes, static libraries and scripts needed to build 238 applications with libxml(2)) that you can install locally.</p> 239 </li> 240</ol> 241 242<h3><a name="Compilatio">Compilation</a></h3> 243<ol> 244 <li><em>What is the process to compile libxml2 ?</em> 245 <p>As most UNIX libraries libxml2 follows the "standard":</p> 246 <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p> 247 <p><code>cd libxml-xxxx</code></p> 248 <p><code>./configure --help</code></p> 249 <p>to see the options, then the compilation/installation proper</p> 250 <p><code>./configure [possible options]</code></p> 251 <p><code>make</code></p> 252 <p><code>make install</code></p> 253 <p>At that point you may have to rerun ldconfig or a similar utility to 254 update your list of installed shared libs.</p> 255 </li> 256 <li><em>What other libraries are needed to compile/install libxml2 ?</em> 257 <p>Libxml2 does not require any other library, the normal C ANSI API 258 should be sufficient (please report any violation to this rule you may 259 find).</p> 260 <p>However if found at configuration time libxml2 will detect and use the 261 following libs:</p> 262 <ul> 263 <li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a 264 highly portable and available widely compression library.</li> 265 <li>iconv: a powerful character encoding conversion library. It is 266 included by default in recent glibc libraries, so it doesn't need to 267 be installed specifically on Linux. It now seems a <a 268 href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part 269 of the official UNIX</a> specification. Here is one <a 270 href="http://www.gnu.org/software/libiconv/">implementation of the 271 library</a> which source can be found <a 272 href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li> 273 </ul> 274 <p></p> 275 </li> 276 <li><em>Make check fails on some platforms</em> 277 <p>Sometimes the regression tests' results don't completely match the 278 value produced by the parser, and the makefile uses diff to print the 279 delta. On some platforms the diff return breaks the compilation process; 280 if the diff is small this is probably not a serious problem.</p> 281 <p>Sometimes (especially on Solaris) make checks fail due to limitations 282 in make. Try using GNU-make instead.</p> 283 </li> 284 <li><em>I use the SVN version and there is no configure script</em> 285 <p>The configure script (and other Makefiles) are generated. Use the 286 autogen.sh script to regenerate the configure script and Makefiles, 287 like:</p> 288 <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p> 289 </li> 290 <li><em>I have troubles when running make tests with gcc-3.0</em> 291 <p>It seems the initial release of gcc-3.0 has a problem with the 292 optimizer which miscompiles the URI module. Please use another 293 compiler.</p> 294 </li> 295</ol> 296 297<h3><a name="Developer">Developer</a> corner</h3> 298<ol> 299 <li><em>Troubles compiling or linking programs using libxml2</em> 300 <p>Usually the problem comes from the fact that the compiler doesn't get 301 the right compilation or linking flags. There is a small shell script 302 <code>xml2-config</code> which is installed as part of libxml2 usual 303 install process which provides those flags. Use</p> 304 <p><code>xml2-config --cflags</code></p> 305 <p>to get the compilation flags and</p> 306 <p><code>xml2-config --libs</code></p> 307 <p>to get the linker flags. Usually this is done directly from the 308 Makefile as:</p> 309 <p><code>CFLAGS=`xml2-config --cflags`</code></p> 310 <p><code>LIBS=`xml2-config --libs`</code></p> 311 </li> 312 <li><em>I want to install my own copy of libxml2 in my home directory and 313 link my programs against it, but it doesn't work</em> 314 <p>There are many different ways to accomplish this. Here is one way to 315 do this under Linux. Suppose your home directory is <code>/home/user. 316 </code>Then:</p> 317 <ul> 318 <li>Create a subdirectory, let's call it <code>myxml</code></li> 319 <li>unpack the libxml2 distribution into that subdirectory</li> 320 <li>chdir into the unpacked distribution 321 (<code>/home/user/myxml/libxml2 </code>)</li> 322 <li>configure the library using the "<code>--prefix</code>" switch, 323 specifying an installation subdirectory in 324 <code>/home/user/myxml</code>, e.g. 325 <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other 326 configuration options}</p> 327 </li> 328 <li>now run <code>make</code> followed by <code>make install</code></li> 329 <li>At this point, the installation subdirectory contains the complete 330 "private" include files, library files and binary program files (e.g. 331 xmllint), located in 332 <p><code>/home/user/myxml/xmlinst/lib, 333 /home/user/myxml/xmlinst/include </code> and <code> 334 /home/user/myxml/xmlinst/bin</code></p> 335 respectively.</li> 336 <li>In order to use this "private" library, you should first add it to 337 the beginning of your default PATH (so that your own private program 338 files such as xmllint will be used instead of the normal system 339 ones). To do this, the Bash command would be 340 <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p> 341 </li> 342 <li>Now suppose you have a program <code>test1.c</code> that you would 343 like to compile with your "private" library. Simply compile it using 344 the command 345 <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p> 346 Note that, because your PATH has been set with <code> 347 /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config 348 program which you just installed will be used instead of the system 349 default one, and this will <em>automatically</em> get the correct 350 libraries linked with your program.</li> 351 </ul> 352 <p></p> 353 </li> 354 <li><em>xmlDocDump() generates output on one line.</em> 355 <p>Libxml2 will not <strong>invent</strong> spaces in the content of a 356 document since <strong>all spaces in the content of a document are 357 significant</strong>. If you build a tree from the API and want 358 indentation:</p> 359 <ol> 360 <li>the correct way is to generate those yourself too.</li> 361 <li>the dangerous way is to ask libxml2 to add those blanks to your 362 content <strong>modifying the content of your document in the 363 process</strong>. The result may not be what you expect. There is 364 <strong>NO</strong> way to guarantee that such a modification won't 365 affect other parts of the content of your document. See <a 366 href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault 367 ()</a> and <a 368 href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile 369 ()</a></li> 370 </ol> 371 <p></p> 372 </li> 373 <li><em>Extra nodes in the document:</em> 374 <p><em>For an XML file as below:</em></p> 375 <pre><?xml version="1.0"?> 376<PLAN xmlns="http://www.argus.ca/autotest/1.0/"> 377<NODE CommFlag="0"/> 378<NODE CommFlag="1"/> 379</PLAN></pre> 380 <p><em>after parsing it with the function 381 pxmlDoc=xmlParseFile(...);</em></p> 382 <p><em>I want to the get the content of the first node (node with the 383 CommFlag="0")</em></p> 384 <p><em>so I did it as following;</em></p> 385 <pre>xmlNodePtr pnode; 386pnode=pxmlDoc->children->children;</pre> 387 <p><em>but it does not work. If I change it to</em></p> 388 <pre>pnode=pxmlDoc->children->children->next;</pre> 389 <p><em>then it works. Can someone explain it to me.</em></p> 390 <p></p> 391 <p>In XML all characters in the content of the document are significant 392 <strong>including blanks and formatting line breaks</strong>.</p> 393 <p>The extra nodes you are wondering about are just that, text nodes with 394 the formatting spaces which are part of the document but that people tend 395 to forget. There is a function <a 396 href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault 397 ()</a> to remove those at parse time, but that's an heuristic, and its 398 use should be limited to cases where you are certain there is no 399 mixed-content in the document.</p> 400 </li> 401 <li><em>I get compilation errors of existing code like when accessing 402 <strong>root</strong> or <strong>child fields</strong> of nodes.</em> 403 <p>You are compiling code developed for libxml version 1 and using a 404 libxml2 development environment. Either switch back to libxml v1 devel or 405 even better fix the code to compile with libxml2 (or both) by <a 406 href="upgrade.html">following the instructions</a>.</p> 407 </li> 408 <li><em>I get compilation errors about non existing 409 <strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong> 410 fields.</em> 411 <p>The source code you are using has been <a 412 href="upgrade.html">upgraded</a> to be able to compile with both libxml 413 and libxml2, but you need to install a more recent version: 414 libxml(-devel) >= 1.8.8 or libxml2(-devel) >= 2.1.0</p> 415 </li> 416 <li><em>Random crashes in threaded applications</em> 417 <p>Read and follow all advices on the <a href="threads.html">thread 418 safety</a> page, and make 100% sure you never call xmlCleanupParser() 419 while the library or an XML document might still be in use by another 420 thread.</p> 421 </li> 422 <li><em>The example provided in the web page does not compile.</em> 423 <p>It's hard to maintain the documentation in sync with the code 424 <grin/> ...</p> 425 <p>Check the previous points 1/ and 2/ raised before, and please send 426 patches.</p> 427 </li> 428 <li><em>Where can I get more examples and information than provided on the 429 web page?</em> 430 <p>Ideally a libxml2 book would be nice. I have no such plan ... But you 431 can:</p> 432 <ul> 433 <li>check more deeply the <a href="html/libxml-lib.html">existing 434 generated doc</a></li> 435 <li>have a look at <a href="examples/index.html">the set of 436 examples</a>.</li> 437 <li>look for examples of use for libxml2 function using the Gnome code 438 or by asking on Google.</li> 439 <li><a 440 href="http://svn.gnome.org/viewvc/libxml2/trunk/">Browse 441 the libxml2 source</a> , I try to write code as clean and documented 442 as possible, so looking at it may be helpful. In particular the code 443 of <a href="http://svn.gnome.org/viewvc/libxml2/trunk/xmllint.c?view=markup">xmllint.c</a> and of the various testXXX.c test programs should 444 provide good examples of how to do things with the library.</li> 445 </ul> 446 <p></p> 447 </li> 448 <li><em>What about C++ ?</em> 449 <p>libxml2 is written in pure C in order to allow easy reuse on a number 450 of platforms, including embedded systems. I don't intend to convert to 451 C++.</p> 452 <p>There is however a C++ wrapper which may fulfill your needs:</p> 453 <ul> 454 <li>by Ari Johnson <ari@btigate.com>: 455 <p>Website: <a 456 href="https://libxmlplusplus.github.io/libxmlplusplus/">https://libxmlplusplus.github.io/libxmlplusplus/</a></p> 457 <p>Download: <a 458 href="https://download.gnome.org/sources/libxml++/">https://download.gnome.org/sources/libxml++/</a></p> 459 </li> 460 </ul> 461 </li> 462 <li><em>How to validate a document a posteriori ?</em> 463 <p>It is possible to validate documents which had not been validated at 464 initial parsing time or documents which have been built from scratch 465 using the API. Use the <a 466 href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a> 467 function. It is also possible to simply add a DTD to an existing 468 document:</p> 469 <pre>xmlDocPtr doc; /* your existing document */ 470xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ 471 472 dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */ 473 474 doc->intSubset = dtd; 475 if (doc->children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd); 476 else xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd); 477 </pre> 478 </li> 479 <li><em>So what is this funky "xmlChar" used all the time?</em> 480 <p>It is a null terminated sequence of utf-8 characters. And only utf-8! 481 You need to convert strings encoded in different ways to utf-8 before 482 passing them to the API. This can be accomplished with the iconv library 483 for instance.</p> 484 </li> 485 <li>etc ...</li> 486</ol> 487 488<p></p> 489 490<h2><a name="Documentat">Developer Menu</a></h2> 491 492<p>There are several on-line resources related to using libxml:</p> 493<ol> 494 <li>Use the <a href="search.php">search engine</a> to look up 495 information.</li> 496 <li>Check the <a href="FAQ.html">FAQ.</a></li> 497 <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive 498 documentation</a> automatically extracted from code comments.</li> 499 <li>Look at the documentation about <a href="encoding.html">libxml 500 internationalization support</a>.</li> 501 <li>This page provides a global overview and <a href="example.html">some 502 examples</a> on how to use libxml.</li> 503 <li><a href="examples/index.html">Code examples</a></li> 504 <li>John Fleck's libxml2 tutorial: <a href="tutorial/index.html">html</a> 505 or <a href="tutorial/xmltutorial.pdf">pdf</a>.</li> 506 <li>If you need to parse large files, check the <a 507 href="xmlreader.html">xmlReader</a> API tutorial</li> 508 <li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a 509 href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">some nice 510 documentation</a> explaining how to use the libxml SAX interface.</li> 511 <li>George Lebl wrote <a 512 href="http://www-106.ibm.com/developerworks/library/l-gnome3/">an article 513 for IBM developerWorks</a> about using libxml.</li> 514 <li>Check <a href="http://svn.gnome.org/viewvc/libxml2/trunk/TODO?view=markup">the TODO 515 file</a>.</li> 516 <li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a> 517 description. If you are starting a new project using libxml you should 518 really use the 2.x version.</li> 519 <li>And don't forget to look at the <a 520 href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li> 521</ol> 522 523<h2><a name="Reporting">Reporting bugs and getting help</a></h2> 524 525<p>Well, bugs or missing features are always possible, and I will make a 526point of fixing them in a timely fashion. The best way to report a bug is to 527use the <a href="https://gitlab.gnome.org/GNOME/libxml2/issues">Gnome 528bug tracking database</a> (make sure to use the "libxml2" module name). I 529look at reports there regularly and it's good to have a reminder when a bug 530is still open. Be sure to specify that the bug is for the package libxml2.</p> 531 532<p>For small problems you can try to get help on IRC, the #xml channel on 533irc.gnome.org (port 6667) usually has a few people subscribed which may help 534(but there is no guarantee and if a real issue is raised it should go on the 535mailing-list for archival).</p> 536 537<p>There is also a mailing-list <a 538href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a 539href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a 540href="http://xmlsoft.org/messages">old</a>). To subscribe to this list, 541please visit the <a 542href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and 543follow the instructions. <strong>Do not send code, I won't debug it</strong> 544(but patches are really appreciated!).</p> 545 546<p>Please note that with the current amount of virus and SPAM, sending mail 547to the list without being subscribed won't work. There is *far too many 548bounces* (in the order of a thousand a day !) I cannot approve them manually 549anymore. If your mail to the list bounced waiting for administrator approval, 550it is LOST ! Repost it and fix the problem triggering the error. Also please 551note that <span style="color: #FF0000; background-color: #FFFFFF">emails with 552a legal warning asking to not copy or redistribute freely the information 553they contain</span> are <strong>NOT</strong> acceptable for the mailing-list, 554such mail will as much as possible be discarded automatically, and are less 555likely to be answered if they made it to the list, <strong>DO NOT</strong> 556post to the list from an email address where such legal requirements are 557automatically added, get private paying support if you can't share 558information.</p> 559 560<p>Check the following <strong><span style="color: #FF0000">before 561posting</span></strong>:</p> 562<ul> 563 <li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the 564 search engine</a> to get information related to your problem.</li> 565 <li>Make sure you are <a href="ftp://xmlsoft.org/libxml2/">using a recent 566 version</a>, and that the problem still shows up in a recent version.</li> 567 <li>Check the <a href="http://mail.gnome.org/archives/xml/">list 568 archives</a> to see if the problem was reported already. In this case 569 there is probably a fix available, similarly check the <a 570 href="https://gitlab.gnome.org/GNOME/libxml2/issues">registered 571 open bugs</a>.</li> 572 <li>Make sure you can reproduce the bug with xmllint or one of the test 573 programs found in source in the distribution.</li> 574 <li>Please send the command showing the error as well as the input (as an 575 attachment)</li> 576</ul> 577 578<p>Then send the bug with associated information to reproduce it to the <a 579href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml 580related I will approve it. Please do not send mail to me directly, it makes 581things really hard to track and in some cases I am not the best person to 582answer a given question, ask on the list.</p> 583 584<p>To <span style="color: #E50000">be really clear about support</span>:</p> 585<ul> 586 <li>Support or help <span style="color: #E50000">requests MUST be sent to 587 the list or the bug tracker</span> in case of problems, so that the Question 588 and Answers can be shared publicly. Failing to do so carries the implicit 589 message "I want free support but I don't want to share the benefits with 590 others" and is not welcome. I will automatically Carbon-Copy the 591 xml@gnome.org mailing list for any technical reply made about libxml2 or 592 libxslt.</li> 593 <li>There is <span style="color: #E50000">no guarantee of support</span>. If 594 your question remains unanswered after a week, repost it, making sure you 595 gave all the detail needed and the information requested.</li> 596 <li>Failing to provide information as requested or double checking first 597 for prior feedback also carries the implicit message "the time of the 598 library maintainers is less valuable than my time" and might not be 599 welcome.</li> 600</ul> 601 602<p>Of course, bugs reported with a suggested patch for fixing them will 603probably be processed faster than those without.</p> 604 605<p>If you're looking for help, a quick look at <a 606href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually 607provide the answer. I usually send source samples when answering libxml2 608usage questions. The <a 609href="http://xmlsoft.org/html/book1.html">auto-generated documentation</a> is 610not as polished as I would like (i need to learn more about DocBook), but 611it's a good starting point.</p> 612 613<h2><a name="help">How to help</a></h2> 614 615<p>You can help the project in various ways, the best thing to do first is to 616subscribe to the mailing-list as explained before, check the <a 617href="http://mail.gnome.org/archives/xml/">archives </a>and the <a 618href="https://gitlab.gnome.org/GNOME/libxml2/issues">Gnome bug 619database</a>:</p> 620<ol> 621 <li>Provide patches when you find problems.</li> 622 <li>Provide the diffs when you port libxml2 to a new platform. They may not 623 be integrated in all cases but help pinpointing portability problems 624 and</li> 625 <li>Provide documentation fixes (either as patches to the code comments or 626 as HTML diffs).</li> 627 <li>Provide new documentations pieces (translations, examples, etc 628 ...).</li> 629 <li>Check the TODO file and try to close one of the items.</li> 630 <li>Take one of the points raised in the archive or the bug database and 631 provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me 632 </a>before to avoid synchronization problems and check that the suggested 633 fix will fit in nicely :-)</li> 634</ol> 635 636<h2><a name="Downloads">Downloads</a></h2> 637 638<p>The latest versions of libxml2 can be found on the <a 639href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> server ( <a 640href="ftp://xmlsoft.org/libxml2/">FTP</a> and rsync are available), there are also 641mirrors (<a href="ftp://fr.rpmfind.net/pub/libxml/">France</a> and 642Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a 643mirror in Austria</a>). (NOTE that you need both the <a 644href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a 645href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> 646packages installed to compile applications using libxml if using RPMs.)</p> 647 648<p>You can find all the history of libxml(2) and libxslt releases in the <a 649href="http://xmlsoft.org/sources/old/">old</a> directory. The precompiled 650Windows binaries made by Igor Zlatovic are available in the <a 651href="http://xmlsoft.org/sources/win32/">win32</a> directory.</p> 652 653<p>Binary ports:</p> 654<ul> 655 <li>RPMs for x86_64 are available directly on <a 656 href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>, the source RPM will compile on 657 any architecture supported.</li> 658 <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the 659 maintainer of the Windows port, <a 660 href="http://www.zlatkovic.com/projects/libxml/index.html">he provides 661 binaries</a>.</li> 662 <li>OpenCSW provides <a 663 href="http://opencsw.org/packages/libxml2">Solaris 664 binaries</a>.</li> 665 <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> provides <a 666 href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X 667 binaries</a>.</li> 668 <li>The HP-UX porting center provides <a 669 href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li> 670 <li>Bull provides precompiled <a 671 href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as 672 patr of their GNOME packages</li> 673</ul> 674 675<p>If you know other supported binary ports, please <a 676href="http://veillard.com/">contact me</a>.</p> 677 678<p><a name="Snapshot">Snapshot:</a></p> 679<ul> 680 <li>Code from the GNOME GIT base libxml2 module, updated hourly <a 681 href="ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz">libxml2-git-snapshot.tar.gz</a>.</li> 682 <li>Docs, content of the web site, the list archive included <a 683 href="ftp://xmlsoft.org/libxml2/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li> 684</ul> 685 686<p><a name="Contribs">Contributions:</a></p> 687 688<p>I do accept external contributions, especially if compiling on another 689platform, get in touch with the list to upload the package, wrappers for 690various languages have been provided, and can be found in the <a 691href="python.html">bindings section</a></p> 692 693<p>Libxml2 is also available from GIT:</p> 694<ul> 695 <li><p>See <a href="https://gitlab.gnome.org/GNOME/libxml2">libxml2 Git web</a>. 696 To checkout a local tree use:</p> 697 <pre>git clone https://gitlab.gnome.org/GNOME/libxml2.git</pre> 698 </li> 699 <li>The <strong>libxslt</strong> module is also present 700 <a href="https://gitlab.gnome.org/GNOME/libxslt">there</a>.</li> 701</ul> 702 703<h2><a name="News">Releases</a></h2> 704 705<p>The <a href="ChangeLog.html">change log</a> describes the recents commits 706to the <a href="https://gitlab.gnome.org/GNOME/libxml2">GIT</a> code base.</p> 707 708<p>Here is the list of public releases:</p> 709 710<h3>v2.9.13: Feb 19 2022</h3> 711<ul> 712 <li>Security:<br/> 713 [CVE-2022-23308] Use-after-free of ID and IDREF attributes 714 (Thanks to Shinji Sato for the report)<br/> 715 Use-after-free in xmlXIncludeCopyRange (David Kilzer)<br/> 716 Fix Null-deref-in-xmlSchemaGetComponentTargetNs (huangduirong)<br/> 717 Fix memory leak in xmlXPathCompNodeTest<br/> 718 Fix null pointer deref in xmlStringGetNodeList<br/> 719 Fix several memory leaks found by Coverity (David King)<br/> 720 </li> 721 722 <li>Fixed regressions:<br/> 723 Fix regression in RelaxNG pattern matching<br/> 724 Properly handle nested documents in xmlFreeNode<br/> 725 Fix regression with PEs in external DTD<br/> 726 Fix random dropping of characters on dumping ASCII encoded XML (Mohammad Razavi)<br/> 727 Revert "Make schema validation fail with multiple top-level elements"<br/> 728 Fix regression when parsing invalid HTML tags in push mode<br/> 729 Fix regression parsing public IDs literals in HTML<br/> 730 Fix buffering in xmlOutputBufferWrite<br/> 731 Fix whitespace when serializing empty HTML documents<br/> 732 Fix XPath recursion limit<br/> 733 Fix regression in xmlNodeDumpOutputInternal<br/> 734 Work around lxml API abuse<br/> 735 </li> 736 737 <li>Bug fixes:<br/> 738 Fix xmlSetTreeDoc with entity references<br/> 739 Fix double counting of CRLF in comments<br/> 740 Make sure to grow input buffer in xmlParseMisc<br/> 741 Don't ignore xmllint options after "-"<br/> 742 Don't normalize namespace URIs in XPointer xmlns() scheme<br/> 743 Fix handling of XSD with empty namespace<br/> 744 Also register HTML document nodes<br/> 745 Make xmllint return an error if arguments are missing<br/> 746 Fix handling of ctxt->base in xmlXPtrEvalXPtrPart<br/> 747 Fix xmllint --maxmem<br/> 748 Fix htmlReadFd, which was using a mix of xml and html context functions (Finn Barber)<br/> 749 Move current position before possible calling of ctxt->sax->characters (Yulin Li)<br/> 750 Fix parse failure when 4-byte character in UTF-16 BE is split across a chunk (David Kilzer)<br/> 751 Patch to forbid epsilon-reduction of final states (Arne Becker)<br/> 752 Avoid segfault at exit when using custom memory functions (Mike Dalessio)<br/> 753 </li> 754 755 <li>Tests, code quality, fuzzing:<br/> 756 Remove .travis.yml<br/> 757 Make xmlFuzzReadString return a zero size in error case<br/> 758 Fix unused function warning in testapi.c<br/> 759 Update NewsML DTD in test suite<br/> 760 Add more checks for malloc failures in xmllint.c<br/> 761 Avoid potential integer overflow in xmlstring.c<br/> 762 Run CI tests with UBSan implicit-conversion checks<br/> 763 Fix casting of line numbers in SAX2.c<br/> 764 Fix integer conversion warnings in hash.c<br/> 765 Add explicit casts in runtest.c <br/> 766 Fix integer conversion warning in xmlIconvWrapper<br/> 767 Add suffix to unsigned constant in xmlmemory.c<br/> 768 Add explicit casts in testchar.c<br/> 769 Fix integer conversion warnings in xmlstring.c<br/> 770 Add explicit cast in xmlURIUnescapeString<br/> 771 Remove unused variable in xmlCharEncOutFunc (David King)<br/> 772 </li> 773 774 <li>Build system, portability:<br/> 775 Remove xmlwin32version.h<br/> 776 Fix fuzzer test with VPATH build<br/> 777 Support custom prefix when installing Python module<br/> 778 Remove Makefile.win<br/> 779 Remove CVS and SVN-related code<br/> 780 Port python 3.x module to Windows and improve distutils (Chun-wei Fan)<br/> 781 Correctly install the HTML examples into their subdirectory (Mattia Rizzolo)<br/> 782 Refactor the settings of $docdir (Mattia Rizzolo)<br/> 783 Remove unused configure checks (Ben Boeckel)<br/> 784 python/Makefile.am: use *_LIBADD, not *_LDFLAGS for LIBS (Sam James)<br/> 785 Fix check for libtool in autogen.sh<br/> 786 Use version in configure.ac for CMake (Timothy Lyanguzov)<br/> 787 Add CMake alias targets for embedded projects (Markus Rickert)<br/> 788 </li> 789 790 <li>Documentation:<br/> 791 Remove SVN keyword anchors<br/> 792 Rework README<br/> 793 Remove README.cvs-commits<br/> 794 Remove old ChangeLog<br/> 795 Update hyperlinks<br/> 796 Remove README.docs<br/> 797 Remove MAINTAINERS <br/> 798 Remove xmltutorial.pdf<br/> 799 Upload documentation to GitLab pages<br/> 800 Document how to escape XML_CATALOG_FILES<br/> 801 Fix libxml2.doap<br/> 802 Update URL for libxml++ C++ binding (Kjell Ahlstedt)<br/> 803 Generate devhelp2 index file (Emmanuele Bassi)<br/> 804 Mention XML_CATALOG_FILES is space-separated (Jan Tojnar)<br/> 805 Add documentaiton for xmllint exit code 10 (Rainer Canavan)<br/> 806 Fix some validation errors in the FAQ (David King)<br/> 807 Add instructions on how to use CMake to compile libxml (Markus Rickert)<br/> 808 </li> 809</ul> 810 811<h3>v2.9.12: May 13 2021</h3> 812<ul> 813 <li>Build system:<br/> 814 Add fuzz.h and seed/regexp to EXTRA_DIST<br/> 815 </li> 816</ul> 817 818<h3>v2.9.11: May 13 2021</h3> 819<ul> 820 <li>Security:<br/> 821 Patch for security issue CVE-2021-3541 (Daniel Veillard)<br/> 822 </li> 823 824 <li>Documentation:<br/> 825 Clarify xmlNewDocProp documentation (Nick Wellnhofer)<br/> 826 </li> 827 828 <li>Portability:<br/> 829 CMake: Only add postfixes if MSVC (Christopher Degawa),<br/> 830 Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer),<br/> 831 Use CMake PROJECT_VERSION (Markus Rickert),<br/> 832 Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson),<br/> 833 Add CI for CMake on MSVC (Markus Rickert),<br/> 834 Update minimum required CMake version (Markus Rickert),<br/> 835 Add variables for configured options to CMake config files (Markus Rickert),<br/> 836 Check if variables exist when defining targets (Markus Rickert),<br/> 837 Check if target exists when reading target properties (Markus Rickert),<br/> 838 Add xmlcatalog target and definition to config files (Markus Rickert),<br/> 839 Remove include directories for link-only dependencies (Markus Rickert),<br/> 840 Fix ICU build in CMake (Markus Rickert),<br/> 841 Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus Rickert),<br/> 842 Update CMake config files (Markus Rickert),<br/> 843 Add xmlcatalog and xmllint to CMake export (Markus Rickert),<br/> 844 Simplify xmlexports.h (Nick Wellnhofer),<br/> 845 Require dependencies based on enabled CMake options (Markus Rickert),<br/> 846 Use NAMELINK_COMPONENT in CMake install (Markus Rickert),<br/> 847 Add CMake files to EXTRA_DIST (Markus Rickert),<br/> 848 Add missing compile definition for static builds to CMake (Markus Rickert),<br/> 849 Add CI for CMake on Linux and MinGW (Markus Rickert),<br/> 850 Fix variable name in win32/configure.js (Nick Wellnhofer),<br/> 851 Fix version parsing in win32/configure.js (Nick Wellnhofer),<br/> 852 Fix autotools warnings (Nick Wellnhofer),<br/> 853 Update config.h.cmake.in (Markus Rickert),<br/> 854 win32: allow passing *FLAGS on command line (Michael Stahl),<br/> 855 Configure file xmlwin32version.h.in on MSVC (Markus Rickert),<br/> 856 List headers individually (Markus Rickert),<br/> 857 Add CMake build files (Markus Rickert),<br/> 858 Parenthesize Py<type>_Check() in ifs (Miro Hrončok),<br/> 859 Minor fixes to configure.js (Nick Wellnhofer)<br/> 860 </li> 861 862 <li>Bug Fixes:<br/> 863 Fix null deref in legacy SAX1 parser (Nick Wellnhofer),<br/> 864 Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer),<br/> 865 Fix line numbers in error messages for mismatched tags (Nick Wellnhofer),<br/> 866 Fix htmlTagLookup (Nick Wellnhofer),<br/> 867 Propagate error in xmlParseElementChildrenContentDeclPriv (Nick Wellnhofer),<br/> 868 Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick Wellnhofer),<br/> 869 Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer),<br/> 870 Validate UTF8 in xmlEncodeEntities (Joel Hockey),<br/> 871 Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer),<br/> 872 Allow FP division by zero in xmlXPathInit (Nick Wellnhofer),<br/> 873 Fix xmlGetNodePath with invalid node types (Nick Wellnhofer),<br/> 874 Fix exponential behavior with recursive entities (Nick Wellnhofer),<br/> 875 Fix quadratic behavior when looking up xml:* attributes (Nick Wellnhofer),<br/> 876 Fix slow parsing of HTML with encoding errors (Nick Wellnhofer),<br/> 877 Fix null deref introduced with previous commit (Nick Wellnhofer),<br/> 878 Check for invalid redeclarations of predefined entities (Nick Wellnhofer),<br/> 879 Add the copy of type from original xmlDoc in xmlCopyDoc() (SVGAnimate),<br/> 880 parser.c: shrink the input buffer when appropriate (Mike Dalessio),<br/> 881 Fix infinite loop in HTML parser introduced with recent commits (Nick Wellnhofer),<br/> 882 Fix quadratic runtime when parsing CDATA sections (Nick Wellnhofer),<br/> 883 Fix timeout when handling recursive entities (Nick Wellnhofer),<br/> 884 Fix memory leak in xmlParseElementMixedContentDecl (Nick Wellnhofer),<br/> 885 Fix null deref in xmlStringGetNodeList (Nick Wellnhofer),<br/> 886 use new htmlParseLookupCommentEnd to find comment ends (Mike Dalessio),<br/> 887 htmlParseComment: treat `--!>` as if it closed the comment (Mike Dalessio),<br/> 888 Fix integer overflow in xmlSchemaGetParticleTotalRangeMin (Nick Wellnhofer),<br/> 889 encoding: fix memleak in xmlRegisterCharEncodingHandler() (Xiaoming Ni),<br/> 890 xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add, check "facet->val" (Xiaoming Ni),<br/> 891 Fix null pointer deref in xmlXPtrRangeInsideFunction (Nick Wellnhofer),<br/> 892 Fix quadratic runtime in HTML push parser with null bytes (Nick Wellnhofer),<br/> 893 Avoid quadratic checking of identity-constraints (Michael Matz),<br/> 894 Fix building with ICU 68. (Frederik Seiffert),<br/> 895 Convert python/libxml.c to PY_SSIZE_T_CLEAN (Victor Stinner),<br/> 896 Fix xmlURIEscape memory leaks. (Elliott Hughes),<br/> 897 Avoid call stack overflow with XML reader and recursive XIncludes (Nick Wellnhofer),<br/> 898 Fix caret in regexp character group (Nick Wellnhofer),<br/> 899 parser.c: xmlParseCharData peek behavior fixed wrt newlines (Mike Dalessio),<br/> 900 Fix memory leaks in XPointer string-range function (Nick Wellnhofer),<br/> 901 Fix use-after-free when XIncluding text from Reader (Nick Wellnhofer),<br/> 902 Fix SEGV in xmlSAXParseFileWithData (yanjinjq),<br/> 903 Fix null deref in XPointer expression error path (Nick Wellnhofer),<br/> 904 Don't call xmlXPathInit directly (Nick Wellnhofer),<br/> 905 Fix cleanup of attributes in XML reader (Nick Wellnhofer),<br/> 906 Fix double free in XML reader with XIncludes (Nick Wellnhofer),<br/> 907 Fix memory leak in xmlXIncludeAddNode error paths (Nick Wellnhofer),<br/> 908 Revert "Fix quadratic runtime in xi:fallback processing" (Nick Wellnhofer),<br/> 909 Fix error reporting with xi:fallback (Nick Wellnhofer),<br/> 910 Fix quadratic runtime in xi:fallback processing (Nick Wellnhofer),<br/> 911 Fix corner case with empty xi:fallback (Nick Wellnhofer),<br/> 912 Fix XInclude regression introduced with recent commit (Nick Wellnhofer),<br/> 913 Fix memory leak in runtest.c (Nick Wellnhofer),<br/> 914 Make "xmllint --push --recovery" work (Nick Wellnhofer),<br/> 915 Revert "Do not URI escape in server side includes" (Nick Wellnhofer),<br/> 916 Fix column number accounting in xmlParse*NameAndCompare (Nick Wellnhofer),<br/> 917 Stop counting nbChars in parser context (Nick Wellnhofer),<br/> 918 Fix out-of-bounds read with 'xmllint --htmlout' (Nick Wellnhofer),<br/> 919 Fix exponential runtime and memory in xi:fallback processing (Nick Wellnhofer),<br/> 920 Don't process siblings of root in xmlXIncludeProcess (Nick Wellnhofer),<br/> 921 Don't recurse into xi:include children in xmlXIncludeDoProcess (Nick Wellnhofer),<br/> 922 Fix memory leak in xmlXIncludeIncludeNode error paths (Nick Wellnhofer),<br/> 923 Check for custom free function in global destructor (Nick Wellnhofer),<br/> 924 Fix integer overflow when comparing schema dates (Nick Wellnhofer),<br/> 925 Fix exponential runtime in xmlFARecurseDeterminism (Nick Wellnhofer),<br/> 926 Don't try to handle namespaces when building HTML documents (Nick Wellnhofer),<br/> 927 Fix several quadratic runtime issues in HTML push parser (Nick Wellnhofer),<br/> 928 Fix quadratic runtime when push parsing HTML start tags (Nick Wellnhofer),<br/> 929 Reset XML parser input before reporting errors (David Kilzer),<br/> 930 Fix quadratic runtime when push parsing HTML entity refs (Nick Wellnhofer),<br/> 931 Fix HTML push parser lookahead (Nick Wellnhofer),<br/> 932 Make htmlCurrentChar always translate U+0000 (Nick Wellnhofer),<br/> 933 Fix UTF-8 decoder in HTML parser (Nick Wellnhofer),<br/> 934 Fix quadratic runtime when parsing HTML script content (Nick Wellnhofer),<br/> 935 Reset HTML parser input before reporting error (Nick Wellnhofer),<br/> 936 Fix more quadratic runtime issues in HTML push parser (Nick Wellnhofer),<br/> 937 Fix regression introduced with 477c7f6a (Nick Wellnhofer),<br/> 938 Fix quadratic runtime in HTML parser (Nick Wellnhofer),<br/> 939 Reset HTML parser input before reporting encoding error (Nick Wellnhofer),<br/> 940 Fix integer overflow in xmlFAParseQuantExact (Nick Wellnhofer),<br/> 941 Fix return value of xmlC14NDocDumpMemory (Nick Wellnhofer),<br/> 942 Don't follow next pointer on documents in xmlXPathRunStreamEval (Nick Wellnhofer),<br/> 943 Fix integer overflow in _xmlSchemaParseGYear (Nick Wellnhofer),<br/> 944 Fix integer overflow when parsing {min,max}Occurs (Nick Wellnhofer),<br/> 945 Fix another memory leak in xmlSchemaValAtomicType (Nick Wellnhofer),<br/> 946 Fix unsigned integer overflow in htmlParseTryOrFinish (Nick Wellnhofer),<br/> 947 Fix integer overflow in htmlParseCharRef (Nick Wellnhofer),<br/> 948 Fix undefined behavior in UTF16LEToUTF8 (Nick Wellnhofer),<br/> 949 Fix return value of xmlCharEncOutput (Nick Wellnhofer),<br/> 950 Never expand parameter entities in text declaration (Nick Wellnhofer),<br/> 951 Fix undefined behavior in xmlXPathTryStreamCompile (Nick Wellnhofer),<br/> 952 Fix use-after-free with validating reader (Nick Wellnhofer),<br/> 953 xmlParseBalancedChunkMemory must not be called with NULL doc (Nick Wellnhofer),<br/> 954 Revert "Fix memory leak in xmlParseBalancedChunkMemoryRecover" (Nick Wellnhofer),<br/> 955 Fix memory leak in xmlXIncludeLoadDoc error path (Nick Wellnhofer),<br/> 956 Make schema validation fail with multiple top-level elements (Nick Wellnhofer),<br/> 957 Call xmlCleanupParser on ELF destruction (Samuel Thibault),<br/> 958 Fix copying of entities in xmlParseReference (Nick Wellnhofer),<br/> 959 Fix memory leak in xmlSchemaValidateStream (Zhipeng Xie),<br/> 960 Fix xmlSchemaGetCanonValue formatting for date and dateTime (Kevin Puetz),<br/> 961 Fix memory leak when shared libxml.dll is unloaded (Kevin Puetz),<br/> 962 Fix potentially-uninitialized critical section in Win32 DLL builds (Kevin Puetz),<br/> 963 Fix integer overflow in xmlBufferResize (Nick Wellnhofer),<br/> 964 Check for overflow when allocating two-dimensional arrays (Nick Wellnhofer),<br/> 965 Remove useless comparisons (Nick Wellnhofer),<br/> 966 Fix overflow check in xmlNodeDump (Nick Wellnhofer),<br/> 967 Fix infinite loop in xmlStringLenDecodeEntities (Zhipeng Xie),<br/> 968 Fix freeing of nested documents (Nick Wellnhofer),<br/> 969 Fix more memory leaks in error paths of XPath parser (Nick Wellnhofer),<br/> 970 Fix memory leaks of encoding handlers in xmlsave.c (Nick Wellnhofer),<br/> 971 Fix xml2-config error code (Nick Wellnhofer),<br/> 972 Fix memory leak in error path of XPath expr parser (Nick Wellnhofer),<br/> 973 Fix overflow handling in xmlBufBackToBuffer (Nick Wellnhofer),<br/> 974 Null pointer handling in catalog.c (raniervf),<br/> 975 xml2-config.in: fix regressions introduced by commit 2f2bf4b2c (Dmitry V. Levin)<br/> 976 </li> 977 978 <li>Improvements:<br/> 979 Store per-element parser state in a struct (Nick Wellnhofer),<br/> 980 update for xsd:language type check (PaulHiggs),<br/> 981 Update INSTALL.libxml2 (Nick Wellnhofer),<br/> 982 Fix include order in c14n.h (Nick Wellnhofer),<br/> 983 Fix duplicate xmlStrEqual calls in htmlParseEndTag (Nick Wellnhofer),<br/> 984 Speed up htmlCheckAutoClose (Nick Wellnhofer),<br/> 985 Speed up htmlTagLookup (Nick Wellnhofer),<br/> 986 Stop checking attributes for UTF-8 validity (Nick Wellnhofer),<br/> 987 Reduce some fuzzer timeouts (Nick Wellnhofer),<br/> 988 Only run a few CI tests unless scheduled (Nick Wellnhofer),<br/> 989 Improve fuzzer stability (Nick Wellnhofer),<br/> 990 Check for feature flags in fuzzer tests (Nick Wellnhofer),<br/> 991 Another attempt at improving fuzzer stability (Nick Wellnhofer),<br/> 992 Revert "Improve HTML fuzzer stability" (Nick Wellnhofer),<br/> 993 Add charset names to fuzzing dictionaries (Nick Wellnhofer),<br/> 994 Improve HTML fuzzer stability (Nick Wellnhofer),<br/> 995 Add CI for MSVC x86 (Markus Rickert),<br/> 996 Add a flag to not output anything when xmllint succeeded (hhb),<br/> 997 Speed up HTML fuzzer (Nick Wellnhofer),<br/> 998 Remove unused encoding parameter of HTML output functions (Nick Wellnhofer),<br/> 999 Handle malloc failures in fuzzing code (Nick Wellnhofer),<br/> 1000 add test coverage for incorrectly-closed comments (Mike Dalessio),<br/> 1001 Enforce maximum length of fuzz input (Nick Wellnhofer),<br/> 1002 Remove temporary members from struct _xmlXPathContext (Nick Wellnhofer),<br/> 1003 Build the Python extension with PY_SSIZE_T_CLEAN (Victor Stinner),<br/> 1004 Add CI test for Python 3 (Nick Wellnhofer),<br/> 1005 Add fuzzing dictionaries to EXTRA_DIST (Nick Wellnhofer),<br/> 1006 Add 'fuzz' subdirectory to DIST_SUBDIRS (Nick Wellnhofer),<br/> 1007 Allow port numbers up to INT_MAX (Nick Wellnhofer),<br/> 1008 Handle dumps of corrupted documents more gracefully (Nick Wellnhofer),<br/> 1009 Limit size of free lists in XML reader when fuzzing (Nick Wellnhofer),<br/> 1010 Hardcode maximum XPath recursion depth (Nick Wellnhofer),<br/> 1011 Pass URL of main entity in XML fuzzer (Nick Wellnhofer),<br/> 1012 Consolidate seed corpus generation (Nick Wellnhofer),<br/> 1013 Test fuzz targets with dummy driver (Nick Wellnhofer),<br/> 1014 Fix regression introduced with commit d88df4b (Nick Wellnhofer),<br/> 1015 Fix regression introduced with commit 74dcc10b (Nick Wellnhofer),<br/> 1016 Add TODO comment in xinclude.c (Nick Wellnhofer),<br/> 1017 Stop using maxParserDepth in xpath.c (Nick Wellnhofer),<br/> 1018 Remove dead code in xinclude.c (Nick Wellnhofer),<br/> 1019 Don't add formatting newlines to XInclude nodes (Nick Wellnhofer),<br/> 1020 Don't use SAX1 if all element handlers are NULL (Nick Wellnhofer),<br/> 1021 Remove unneeded progress checks in HTML parser (Nick Wellnhofer),<br/> 1022 Use strcmp when fuzzing (Nick Wellnhofer),<br/> 1023 Fix XPath fuzzer (Nick Wellnhofer),<br/> 1024 Fuzz XInclude engine (Nick Wellnhofer),<br/> 1025 Add XPath and XPointer fuzzer (Nick Wellnhofer),<br/> 1026 Update fuzzing code (Nick Wellnhofer),<br/> 1027 More *NodeDumpOutput fixes (Nick Wellnhofer),<br/> 1028 Fix *NodeDumpOutput functions (Nick Wellnhofer),<br/> 1029 Make xmlNodeDumpOutputInternal non-recursive (Nick Wellnhofer),<br/> 1030 Make xhtmlNodeDumpOutput non-recursive (Nick Wellnhofer),<br/> 1031 Make htmlNodeDumpFormatOutput non-recursive (Nick Wellnhofer),<br/> 1032 Fix .gitattributes (Nick Wellnhofer),<br/> 1033 Rework control flow in htmlCurrentChar (Nick Wellnhofer),<br/> 1034 Make 'xmllint --html --push -' read from stdin (Nick Wellnhofer),<br/> 1035 Remove misleading comments in xpath.c (Nick Wellnhofer),<br/> 1036 Update to Devhelp index file format version 2 (Andre Klapper),<br/> 1037 Set project language to C (Markus Rickert),<br/> 1038 Add variable for working directory of XML Conformance Test Suite (Markus Rickert),<br/> 1039 Add additional tests and XML Conformance Test Suite (Markus Rickert),<br/> 1040 Add command line option for temp directory in runtest (Markus Rickert),<br/> 1041 Ensure LF line endings for test files (Markus Rickert),<br/> 1042 Enable runtests and testThreads (Markus Rickert),<br/> 1043 Limit regexp nesting depth (Nick Wellnhofer),<br/> 1044 Fix return values and documentation in encoding.c (Nick Wellnhofer),<br/> 1045 Add regexp regression tests (David Kilzer),<br/> 1046 Report error for invalid regexp quantifiers (Nick Wellnhofer),<br/> 1047 Fix rebuilding docs, by hiding __attribute__((...)) behind a macro. (Martin Vidner),<br/> 1048 Copy xs:duration parser from libexslt (Nick Wellnhofer),<br/> 1049 Fuzz target for XML Schemas (Nick Wellnhofer),<br/> 1050 Move entity recorder to fuzz.c (Nick Wellnhofer),<br/> 1051 Fuzz target for HTML parser (Nick Wellnhofer),<br/> 1052 Update GitLab CI container (Nick Wellnhofer),<br/> 1053 Add options file for xml fuzzer (Nick Wellnhofer),<br/> 1054 Add a couple of libFuzzer targets (Nick Wellnhofer),<br/> 1055 Guard new calls to xmlValidatePopElement in xml_reader.c (Daniel Cheng),<br/> 1056 Add LIBXML_VALID_ENABLED to xmlreader (Łukasz Wojniłowicz),<br/> 1057 Fix typos (Nick Wellnhofer),<br/> 1058 Disable LeakSanitizer (Nick Wellnhofer),<br/> 1059 Stop calling SAX getEntity handler from XMLReader (Nick Wellnhofer),<br/> 1060 Add test case for recursive external parsed entities (Nick Wellnhofer),<br/> 1061 Enable error tests with entity substitution (Nick Wellnhofer),<br/> 1062 Don't load external entity from xmlSAX2GetEntity (Nick Wellnhofer),<br/> 1063 Merge code paths loading external entities (Nick Wellnhofer),<br/> 1064 Copy some XMLReader option flags to parser context (Nick Wellnhofer),<br/> 1065 Add xmlPopOutputCallbacks (Nick Wellnhofer),<br/> 1066 Updated Python test reader2.py (Pieter van Oostrum),<br/> 1067 Updated python/tests/tstLastError.py (Pieter van Oostrum),<br/> 1068 Use random seed in xmlDictComputeFastKey (Ranier Vilela),<br/> 1069 Enable more undefined behavior sanitizers (Nick Wellnhofer)<br/> 1070 </li> 1071</ul> 1072 1073<h3>v2.9.10: Oct 30 2019</h3> 1074<ul> 1075 <li>Documentation:<br/> 1076 Fix a few more typos ("fonction") (Nick Wellnhofer),<br/> 1077 Large batch of typo fixes (Jared Yanovich),<br/> 1078 Fix typos: tree: move{ -> s}, reconcil{i -> }ed, h{o -> e}ld by... (Jan Pokorný),<br/> 1079 Fix typo: xpath: simpli{ -> fi}ed (Jan Pokorný),<br/> 1080 Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump (Jan Pokorný),<br/> 1081 Fix comments in test code (zhouzhongyuan),<br/> 1082 fix comment in testReader.c (zhouzhongyuan)<br/> 1083 </li> 1084 1085 <li>Portability:<br/> 1086 Fix some release issues on Fedora 30 (Daniel Veillard),<br/> 1087 Fix exponent digits when running tests under old MSVC (Daniel Richard G),<br/> 1088 Work around buggy ceil() function on AIX (Daniel Richard G),<br/> 1089 Don't call printf with NULL string in runtest.c (Daniel Richard G),<br/> 1090 Switched from unsigned long to ptrdiff_t in parser.c (Stephen Chenney),<br/> 1091 timsort.h: support older GCCs (Jérôme Duval),<br/> 1092 Make configure.ac work with older pkg-config (Nick Wellnhofer),<br/> 1093 Stop defining _REENTRANT on some Win32 platforms (Nick Wellnhofer),<br/> 1094 Fix nanohttp.c on MinGW (Nick Wellnhofer),<br/> 1095 Fix Windows compiler warning in testC14N.c (Nick Wellnhofer),<br/> 1096 Merge testThreadsWin32.c into testThreads.c (Nick Wellnhofer),<br/> 1097 Fix Python bindings under Windows (Nick Wellnhofer)<br/> 1098 </li> 1099 1100 <li>Bug Fixes:<br/> 1101 Another fix for conditional sections at end of document (Nick Wellnhofer),<br/> 1102 Fix for conditional sections at end of document (Nick Wellnhofer),<br/> 1103 Make sure that Python tests exit with error code (Nick Wellnhofer),<br/> 1104 Audit memory error handling in xpath.c (Nick Wellnhofer),<br/> 1105 Fix error code in xmlTextWriterStartDocument (Nick Wellnhofer),<br/> 1106 Fix integer overflow when counting written bytes (Nick Wellnhofer),<br/> 1107 Fix uninitialized memory access in HTML parser (Nick Wellnhofer),<br/> 1108 Fix memory leak in xmlSchemaValAtomicType (Nick Wellnhofer),<br/> 1109 Disallow conditional sections in internal subset (Nick Wellnhofer),<br/> 1110 Fix use-after-free in xmlTextReaderFreeNodeList (Nick Wellnhofer),<br/> 1111 Fix Regextests (Nick Wellnhofer),<br/> 1112 Fix empty branch in regex (Nick Wellnhofer),<br/> 1113 Fix integer overflow in entity recursion check (Nick Wellnhofer),<br/> 1114 Don't read external entities or XIncludes from stdin (Nick Wellnhofer),<br/> 1115 Fix Schema determinism check of ##other namespaces (Nick Wellnhofer),<br/> 1116 Fix potential null deref in xmlSchemaIDCFillNodeTables (zhouzhongyuan),<br/> 1117 Fix potential memory leak in xmlBufBackToBuffer (Nick Wellnhofer),<br/> 1118 Fix error message when processing XIncludes with fallbacks (Nick Wellnhofer),<br/> 1119 Fix memory leak in xmlRegEpxFromParse (zhouzhongyuan),<br/> 1120 14:00 is a valid timezone for xs:dateTime (Nick Wellnhofer),<br/> 1121 Fix memory leak in xmlParseBalancedChunkMemoryRecover (Zhipeng Xie),<br/> 1122 Fix potential null deref in xmlRelaxNGParsePatterns (Nick Wellnhofer),<br/> 1123 Misleading error message with xs:{min|max}Inclusive (bettermanzzy),<br/> 1124 Fix memory leak in xmlXIncludeLoadTxt (Wang Kirin),<br/> 1125 Partial fix for comparison of xs:durations (Nick Wellnhofer),<br/> 1126 Fix null deref in xmlreader buffer (zhouzhongyuan),<br/> 1127 Fix unability to RelaxNG-validate grammar with choice-based name class (Jan Pokorný),<br/> 1128 Fix unability to validate ambiguously constructed interleave for RelaxNG (Jan Pokorný),<br/> 1129 Fix possible null dereference in xmlXPathIdFunction (zhouzhongyuan),<br/> 1130 fix memory leak in xmlAllocOutputBuffer (zhouzhongyuan),<br/> 1131 Fix unsigned int overflow (Jens Eggerstedt),<br/> 1132 dict.h: gcc 2.95 doesn't allow multiple storage classes (Nick Wellnhofer),<br/> 1133 Fix another code path in xmlParseQName (Nick Wellnhofer),<br/> 1134 Make sure that xmlParseQName returns NULL in error case (Nick Wellnhofer),<br/> 1135 Fix build without reader but with pattern (Nick Wellnhofer),<br/> 1136 Fix memory leak in xmlAllocOutputBufferInternal error path (Nick Wellnhofer),<br/> 1137 Fix unsigned integer overflow (Nick Wellnhofer),<br/> 1138 Fix return value of xmlOutputBufferWrite (Nick Wellnhofer),<br/> 1139 Fix parser termination from "Double hyphen within comment" error (David Warring),<br/> 1140 Fix call stack overflow in xmlFreePattern (Nick Wellnhofer),<br/> 1141 Fix null deref in previous commit (Nick Wellnhofer),<br/> 1142 Fix memory leaks in xmlXPathParseNameComplex error paths (Nick Wellnhofer),<br/> 1143 Check for integer overflow in xmlXPtrEvalChildSeq (Nick Wellnhofer),<br/> 1144 Fix xmllint dump of XPath namespace nodes (Nick Wellnhofer),<br/> 1145 Fix float casts in xmlXPathSubstringFunction (Nick Wellnhofer),<br/> 1146 Fix null deref in xmlregexp error path (Nick Wellnhofer),<br/> 1147 Fix null pointer dereference in xmlTextReaderReadOuterXml (Nick Wellnhofer),<br/> 1148 Fix memory leaks in xmlParseStartTag2 error paths (Nick Wellnhofer),<br/> 1149 Fix memory leak in xmlSAX2StartElement (Nick Wellnhofer),<br/> 1150 Fix commit "Memory leak in xmlFreeID (xmlreader.c)" (Nick Wellnhofer),<br/> 1151 Fix NULL pointer deref in xmlTextReaderValidateEntity (Nick Wellnhofer),<br/> 1152 Memory leak in xmlFreeTextReader (Nick Wellnhofer),<br/> 1153 Memory leak in xmlFreeID (xmlreader.c) (Nick Wellnhofer)<br/> 1154 </li> 1155 1156 <li>Improvements:<br/> 1157 Run XML conformance tests under CI (Nick Wellnhofer),<br/> 1158 Update GitLab CI config (Nick Wellnhofer),<br/> 1159 Propagate memory errors in valuePush (Nick Wellnhofer),<br/> 1160 Propagate memory errors in xmlXPathCompExprAdd (Nick Wellnhofer),<br/> 1161 Make xmlFreeDocElementContent non-recursive (Nick Wellnhofer),<br/> 1162 Enable continuous integration via GitLab CI (Nick Wellnhofer),<br/> 1163 Avoid ignored attribute warnings under GCC (Nick Wellnhofer),<br/> 1164 Make xmlDumpElementContent non-recursive (Nick Wellnhofer),<br/> 1165 Make apibuild.py ignore ATTRIBUTE_NO_SANITIZE (Nick Wellnhofer),<br/> 1166 Mark xmlExp* symbols as removed (Nick Wellnhofer),<br/> 1167 Make xmlParseConditionalSections non-recursive (Nick Wellnhofer),<br/> 1168 Adjust expected error in Python tests (Nick Wellnhofer),<br/> 1169 Make xmlTextReaderFreeNodeList non-recursive (Nick Wellnhofer),<br/> 1170 Make xmlFreeNodeList non-recursive (Nick Wellnhofer),<br/> 1171 Make xmlParseContent and xmlParseElement non-recursive (Nick Wellnhofer),<br/> 1172 Remove executable bit from non-executable files (Nick Wellnhofer),<br/> 1173 Fix expected output of test/schemas/any4 (Nick Wellnhofer),<br/> 1174 Optimize build instructions in README (zhouzhongyuan),<br/> 1175 xml2-config.in: Output CFLAGS and LIBS on the same line (Hugh McMaster),<br/> 1176 xml2-config: Add a --dynamic switch to print only shared libraries (Hugh McMaster),<br/> 1177 Annotate functions with __attribute__((no_sanitize)) (Nick Wellnhofer),<br/> 1178 Fix warnings when compiling without reader or push parser (Nick Wellnhofer),<br/> 1179 Remove unused member `doc` in xmlSaveCtxt (Nick Wellnhofer),<br/> 1180 Limit recursion depth in xmlXPathCompOpEvalPredicate (Nick Wellnhofer),<br/> 1181 Remove -Wno-array-bounds (Nick Wellnhofer),<br/> 1182 Remove unreachable code in xmlXPathCountFunction (Nick Wellnhofer),<br/> 1183 Improve XPath predicate and filter evaluation (Nick Wellnhofer),<br/> 1184 Limit recursion depth in xmlXPathOptimizeExpression (Nick Wellnhofer),<br/> 1185 Disable hash randomization when fuzzing (Nick Wellnhofer),<br/> 1186 Optional recursion limit when parsing XPath expressions (Nick Wellnhofer),<br/> 1187 Optional recursion limit when evaluating XPath expressions (Nick Wellnhofer),<br/> 1188 Use break statements in xmlXPathCompOpEval (Nick Wellnhofer),<br/> 1189 Optional XPath operation limit (Nick Wellnhofer),<br/> 1190 Fix compilation with --with-minimum (Nick Wellnhofer),<br/> 1191 Check XPath stack after calling functions (Nick Wellnhofer),<br/> 1192 Remove debug printf in xmlreader.c (Nick Wellnhofer),<br/> 1193 Always define LIBXML_THREAD_ENABLED when enabled (Michael Haubenwallner),<br/> 1194 Regenerate NEWS (Nick Wellnhofer),<br/> 1195 Change git repo URL (Nick Wellnhofer),<br/> 1196 Change bug tracker URL (Nick Wellnhofer),<br/> 1197 Remove outdated HTML file (Nick Wellnhofer),<br/> 1198 Fix unused function warning in testapi.c (Nick Wellnhofer),<br/> 1199 Add some generated test files to .gitignore (Nick Wellnhofer),<br/> 1200 Remove unneeded function pointer casts (Nick Wellnhofer),<br/> 1201 Fix -Wcast-function-type warnings (GCC 8) (Nick Wellnhofer),<br/> 1202 Fix -Wformat-truncation warnings (GCC 8) (Nick Wellnhofer)<br/> 1203 </li> 1204 1205 <li>Cleanups:<br/> 1206 Rebuild docs (Nick Wellnhofer),<br/> 1207 Disable xmlExp regex code (Nick Wellnhofer),<br/> 1208 Remove redundant code in xmlRelaxNGValidateState (Nick Wellnhofer),<br/> 1209 Remove redundant code in xmlXPathCompRelationalExpr (Nick Wellnhofer)<br/> 1210 </li> 1211</ul> 1212 1213<h3>v2.9.9: Jan 03 2019</h3> 1214<ul> 1215 <li>Security:<br/> 1216 CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression (Nick Wellnhofer),<br/> 1217 CVE-2018-14404 Fix nullptr deref with XPath logic ops (Nick Wellnhofer),<br/> 1218 </li> 1219 1220 <li>Documentation:<br/> 1221 reader: Fix documentation comment (Mohammed Sadiq)<br/> 1222 </li> 1223 1224 <li>Portability:<br/> 1225 Fix MSVC build with lzma (Nick Wellnhofer),<br/> 1226 Variables need 'extern' in static lib on Cygwin (Michael Haubenwallner),<br/> 1227 Really declare dllexport/dllimport for Cygwin (Michael Haubenwallner),<br/> 1228 Merge branch 'patch-2' into 'master' (Nick Wellnhofer),<br/> 1229 Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 in $srcdir (Vitaly Buka),<br/> 1230 Improve error message if pkg.m4 couldn't be found (Nick Wellnhofer),<br/> 1231 NaN and Inf fixes for pre-C99 compilers (Nick Wellnhofer)<br/> 1232 </li> 1233 1234 <li>Bug Fixes:<br/> 1235 Revert "Support xmlTextReaderNextSibling w/o preparsed doc" (Nick Wellnhofer),<br/> 1236 Fix building relative URIs (Thomas Holder),<br/> 1237 Problem with data in interleave in RelaxNG validation (Nikolai Weibull),<br/> 1238 Fix memory leak in xmlSwitchInputEncodingInt error path (Nick Wellnhofer),<br/> 1239 Set doc on element obtained from freeElems (Nick Wellnhofer),<br/> 1240 Fix HTML serialization with UTF-8 encoding (Nick Wellnhofer),<br/> 1241 Use actual doc in xmlTextReaderRead*Xml (Nick Wellnhofer),<br/> 1242 Unlink node before freeing it in xmlSAX2StartElement (Nick Wellnhofer),<br/> 1243 Check return value of nodePush in xmlSAX2StartElement (Nick Wellnhofer),<br/> 1244 Free input buffer in xmlHaltParser (Nick Wellnhofer),<br/> 1245 Reset HTML parser input pointers on encoding failure (Nick Wellnhofer),<br/> 1246 Don't run icu_parse_test if EUC-JP is unsupported (Nick Wellnhofer),<br/> 1247 Fix xmlSchemaValidCtxtPtr reuse memory leak (Greg Hildstrom),<br/> 1248 Fix xmlTextReaderNext with preparsed document (Felix Bünemann),<br/> 1249 Remove stray character from comment (Nick Wellnhofer),<br/> 1250 Remove a misleading line from xmlCharEncOutput (Andrey Bienkowski),<br/> 1251 HTML noscript should not close p (Daniel Veillard),<br/> 1252 Don't change context node in xmlXPathRoot (Nick Wellnhofer),<br/> 1253 Stop using XPATH_OP_RESET (Nick Wellnhofer),<br/> 1254 Revert "Change calls to xmlCharEncInput to set flush false" (Nick Wellnhofer)<br/> 1255 </li> 1256 1257 <li>Improvements:<br/> 1258 Fix "Problem with data in interleave in RelaxNG validation" (Nikolai Weibull),<br/> 1259 cleanup: remove some unreachable code (Thomas Holder),<br/> 1260 add --relative to testURI (Thomas Holder),<br/> 1261 Remove redefined starts and defines inside include elements (Nikolai Weibull),<br/> 1262 Allow choice within choice in nameClass in RELAX NG (Nikolai Weibull),<br/> 1263 Look inside divs for starts and defines inside include (Nikolai Weibull),<br/> 1264 Add compile and libxml2-config.cmake to .gitignore (Nikolai Weibull),<br/> 1265 Stop using doc->charset outside parser code (Nick Wellnhofer),<br/> 1266 Add newlines to 'xmllint --xpath' output (Nick Wellnhofer),<br/> 1267 Don't include SAX.h from globals.h (Nick Wellnhofer),<br/> 1268 Support xmlTextReaderNextSibling w/o preparsed doc (Felix Bünemann),<br/> 1269 Don't instruct user to run make when autogen.sh failed (林博仁(Buo-ren Lin)),<br/> 1270 Run Travis ASan tests with "sudo: required" (Nick Wellnhofer),<br/> 1271 Improve restoring of context size and position (Nick Wellnhofer),<br/> 1272 Simplify and harden nodeset filtering (Nick Wellnhofer),<br/> 1273 Avoid unnecessary backups of the context node (Nick Wellnhofer),<br/> 1274 Fix inconsistency in xmlXPathIsInf (Nick Wellnhofer)<br/> 1275 </li> 1276 1277 <li>Cleanups:<br/> 1278 </li> 1279</ul> 1280<h3>v2.9.8: Mar 05 2018</h3> 1281<ul> 1282 <li>Portability:<br/> 1283 python: remove single use of _PyVerify_fd (Patrick Welche),<br/> 1284 Build more test executables on Windows/MSVC (Nick Wellnhofer),<br/> 1285 Stop including ansidecl.h (Nick Wellnhofer),<br/> 1286 Fix libz and liblzma detection (Nick Wellnhofer),<br/> 1287 Revert "Compile testapi with -Wno-unused-function" (Nick Wellnhofer)<br/> 1288 </li> 1289 1290 <li>Bug Fixes:<br/> 1291 Fix xmlParserEntityCheck (Nick Wellnhofer),<br/> 1292 Halt parser in case of encoding error (Nick Wellnhofer),<br/> 1293 Clear entity content in case of errors (Nick Wellnhofer),<br/> 1294 Change calls to xmlCharEncInput to set flush false when not final call. Having flush incorrectly set to true causes errors for ICU. (Joel Hockey),<br/> 1295 Fix buffer over-read in xmlParseNCNameComplex (Nick Wellnhofer),<br/> 1296 Fix ICU library filenames on Windows/MSVC (Nick Wellnhofer),<br/> 1297 Fix xmlXPathIsNaN broken by recent commit (Nick Wellnhofer),<br/> 1298 Fix -Wenum-compare warnings (Nick Wellnhofer),<br/> 1299 Fix callback signature in testapi.c (Nick Wellnhofer),<br/> 1300 Fix unused parameter warning without ICU (Nick Wellnhofer),<br/> 1301 Fix IO callback signatures (Nick Wellnhofer),<br/> 1302 Fix misc callback signatures (Nick Wellnhofer),<br/> 1303 Fix list callback signatures (Nick Wellnhofer),<br/> 1304 Fix hash callback signatures (Nick Wellnhofer),<br/> 1305 Refactor name and type signature for xmlNop (Vlad Tsyrklevich),<br/> 1306 Fixed ICU to set flush correctly and provide pivot buffer. (Joel Hockey),<br/> 1307 Skip EBCDIC tests if EBCDIC isn't supported (Nick Wellnhofer)<br/> 1308 </li> 1309 1310 <li>Improvements:<br/> 1311 Disable pointer-overflow UBSan checks under Travis (Nick Wellnhofer),<br/> 1312 Improve handling of context input_id (Daniel Veillard),<br/> 1313 Add resource file to Windows DLL (ccpaging),<br/> 1314 Run Travis tests with -Werror (Nick Wellnhofer),<br/> 1315 Build with "-Wall -Wextra" (Nick Wellnhofer),<br/> 1316 Fix -Wtautological-pointer-compare warnings (Nick Wellnhofer),<br/> 1317 Remove unused AC_CHECKs (Nick Wellnhofer),<br/> 1318 Update information about contributing (Nick Wellnhofer),<br/> 1319 Fix -Wmisleading-indentation warnings (Nick Wellnhofer),<br/> 1320 Don't touch CFLAGS in configure.ac (Nick Wellnhofer),<br/> 1321 Ignore function pointer cast warnings (Nick Wellnhofer),<br/> 1322 Simplify XPath NaN, inf and -0 handling (Nick Wellnhofer),<br/> 1323 Introduce xmlPosixStrdup and update xmlMemStrdup (Nick Wellnhofer),<br/> 1324 Add test for ICU flush and pivot buffer (Nick Wellnhofer),<br/> 1325 Compile testapi with -Wno-unused-function (Nick Wellnhofer)<br/> 1326 </li> 1327</ul> 1328<h3>2.9.7: Nov 02 2017</h3> 1329<ul> 1330 <li>Documentation:<br/> 1331 xmlcatalog: refresh man page wrt. querying system catalog easily (Jan Pokorný)<br/> 1332 </li> 1333 1334 <li>Portability:<br/> 1335 Fix deprecated Travis compiler flag (Nick Wellnhofer),<br/> 1336 Add declaration for DllMain (J. Peter Mugaas),<br/> 1337 Fix preprocessor conditional in threads.h (J. Peter Mugaas),<br/> 1338 Fix pointer comparison warnings on 64-bit Windows (J. Peter Mugaas),<br/> 1339 Fix macro redefinition warning (J. Peter Mugaas),<br/> 1340 Default to native threads on MinGW-w64 (Nick Wellnhofer),<br/> 1341 Simplify Windows IO functions (Nick Wellnhofer),<br/> 1342 Fix runtest on Windows (Nick Wellnhofer),<br/> 1343 socklen_t is always int on Windows (Nick Wellnhofer),<br/> 1344 Don't redefine socket error codes on Windows (Nick Wellnhofer),<br/> 1345 Fix pointer/int cast warnings on 64-bit Windows (Nick Wellnhofer),<br/> 1346 Fix Windows compiler warnings in xmlCanonicPath (Nick Wellnhofer)<br/> 1347 </li> 1348 1349 <li>Bug Fixes:<br/> 1350 xmlcatalog: restore ability to query system catalog easily (Jan Pokorný),<br/> 1351 Fix comparison of nodesets to strings (Nick Wellnhofer)<br/> 1352 </li> 1353 1354 <li>Improvements:<br/> 1355 Add Makefile rules to rebuild HTML man pages (Nick Wellnhofer),<br/> 1356 Fix mixed decls and code in timsort.h (Nick Wellnhofer),<br/> 1357 Rework handling of return values in thread tests (Nick Wellnhofer),<br/> 1358 Fix unused variable warnings in testrecurse (Nick Wellnhofer),<br/> 1359 Fix -Wimplicit-fallthrough warnings (J. Peter Mugaas),<br/> 1360 Upgrade timsort.h to latest revision (Nick Wellnhofer),<br/> 1361 Increase warning level to /W3 under MSVC (Nick Wellnhofer),<br/> 1362 Fix a couple of warnings in dict.c and threads.c (Nick Wellnhofer),<br/> 1363 Update .gitignore for Windows (Nick Wellnhofer),<br/> 1364 Fix unused variable warnings in nanohttp.c (Nick Wellnhofer),<br/> 1365 Fix the Windows header mess (Nick Wellnhofer),<br/> 1366 Don't include winsock2.h in xmllint.c (Nick Wellnhofer),<br/> 1367 Remove generated file python/setup.py from version control (Nick Wellnhofer),<br/> 1368 Use __linux__ macro in generated code (Nick Wellnhofer)<br/> 1369 </li> 1370 1371</ul> 1372<h3>v2.9.6: Oct 06 2017</h3> 1373<ul> 1374 <li>Portability:<br/> 1375 Change preprocessor OS tests to __linux__ (Nick Wellnhofer)<br/> 1376 </li> 1377 1378 <li>Bug Fixes:<br/> 1379 Fix XPath stack frame logic (Nick Wellnhofer),<br/> 1380 Report undefined XPath variable error message (Nick Wellnhofer),<br/> 1381 Fix regression with librsvg (Nick Wellnhofer),<br/> 1382 Handle more invalid entity values in recovery mode (Nick Wellnhofer),<br/> 1383 Fix structured validation errors (Nick Wellnhofer),<br/> 1384 Fix memory leak in LZMA decompressor (Nick Wellnhofer),<br/> 1385 Set memory limit for LZMA decompression (Nick Wellnhofer),<br/> 1386 Handle illegal entity values in recovery mode (Nick Wellnhofer),<br/> 1387 Fix debug dump of streaming XPath expressions (Nick Wellnhofer),<br/> 1388 Fix memory leak in nanoftp (Nick Wellnhofer),<br/> 1389 Fix memory leaks in SAX1 parser (Nick Wellnhofer)<br/> 1390 </li> 1391</ul> 1392<h3>v2.9.5: Sep 04 2017</h3> 1393<ul> 1394 1395 <li>Security:<br/> 1396 Detect infinite recursion in parameter entities (Nick Wellnhofer),<br/> 1397 Fix handling of parameter-entity references (Nick Wellnhofer),<br/> 1398 Disallow namespace nodes in XPointer ranges (Nick Wellnhofer),<br/> 1399 Fix XPointer paths beginning with range-to (Nick Wellnhofer)<br/> 1400 </li> 1401 1402 <li>Documentation:<br/> 1403 Documentation fixes (Nick Wellnhofer),<br/> 1404 Spelling and grammar fixes (Nick Wellnhofer)<br/> 1405 </li> 1406 1407 <li>Portability:<br/> 1408 Adding README.zOS to list of extra files for the release (Daniel Veillard),<br/> 1409 Description of work needed to compile on zOS (Stéphane Michaut),<br/> 1410 Porting libxml2 on zOS encoding of code (Stéphane Michaut),<br/> 1411 small changes for OS/400 (Patrick Monnerat),<br/> 1412 relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers (Chun-wei Fan)<br/> 1413 </li> 1414 1415 <li>Bug Fixes:<br/> 1416 Problem resolving relative URIs (Daniel Veillard),<br/> 1417 Fix unwanted warnings when switching encodings (Nick Wellnhofer),<br/> 1418 Fix signature of xmlSchemaAugmentImportedIDC (Daniel Veillard),<br/> 1419 Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup (David Kilzer),<br/> 1420 Fix NULL pointer deref in xmlFAParseCharClassEsc (Nick Wellnhofer),<br/> 1421 Fix infinite loops with push parser in recovery mode (Nick Wellnhofer),<br/> 1422 Send xmllint usage error to stderr (Nick Wellnhofer),<br/> 1423 Fix NULL deref in xmlParseExternalEntityPrivate (Nick Wellnhofer),<br/> 1424 Make sure not to call IS_BLANK_CH when parsing the DTD (Nick Wellnhofer),<br/> 1425 Fix xmlHaltParser (Nick Wellnhofer),<br/> 1426 Fix pathological performance when outputting charrefs (Nick Wellnhofer),<br/> 1427 Fix invalid-source-encoding warnings in testWriter.c (Nick Wellnhofer),<br/> 1428 Fix duplicate SAX callbacks for entity content (David Kilzer),<br/> 1429 Treat URIs with scheme as absolute in C14N (Nick Wellnhofer),<br/> 1430 Fix copy-paste errors in error messages (Nick Wellnhofer),<br/> 1431 Fix sanity check in htmlParseNameComplex (Nick Wellnhofer),<br/> 1432 Fix potential infinite loop in xmlStringLenDecodeEntities (Nick Wellnhofer),<br/> 1433 Reset parser input pointers on encoding failure (Nick Wellnhofer),<br/> 1434 Fix memory leak in xmlParseEntityDecl error path (Nick Wellnhofer),<br/> 1435 Fix xmlBuildRelativeURI for URIs starting with './' (Nick Wellnhofer),<br/> 1436 Fix type confusion in xmlValidateOneNamespace (Nick Wellnhofer),<br/> 1437 Fix memory leak in xmlStringLenGetNodeList (Nick Wellnhofer),<br/> 1438 Fix NULL pointer deref in xmlDumpElementContent (Daniel Veillard),<br/> 1439 Fix memory leak in xmlBufAttrSerializeTxtContent (Nick Wellnhofer),<br/> 1440 Stop parser on unsupported encodings (Nick Wellnhofer),<br/> 1441 Check for integer overflow in memory debug code (Nick Wellnhofer),<br/> 1442 Fix buffer size checks in xmlSnprintfElementContent (Nick Wellnhofer),<br/> 1443 Avoid reparsing in xmlParseStartTag2 (Nick Wellnhofer),<br/> 1444 Fix undefined behavior in xmlRegExecPushStringInternal (Nick Wellnhofer),<br/> 1445 Check XPath exponents for overflow (Nick Wellnhofer),<br/> 1446 Check for overflow in xmlXPathIsPositionalPredicate (Nick Wellnhofer),<br/> 1447 Fix spurious error message (Nick Wellnhofer),<br/> 1448 Fix memory leak in xmlCanonicPath (Nick Wellnhofer),<br/> 1449 Fix memory leak in xmlXPathCompareNodeSetValue (Nick Wellnhofer),<br/> 1450 Fix memory leak in pattern error path (Nick Wellnhofer),<br/> 1451 Fix memory leak in parser error path (Nick Wellnhofer),<br/> 1452 Fix memory leaks in XPointer error paths (Nick Wellnhofer),<br/> 1453 Fix memory leak in xmlXPathNodeSetMergeAndClear (Nick Wellnhofer),<br/> 1454 Fix memory leak in XPath filter optimizations (Nick Wellnhofer),<br/> 1455 Fix memory leaks in XPath error paths (Nick Wellnhofer),<br/> 1456 Do not leak the new CData node if adding fails (David Tardon),<br/> 1457 Prevent unwanted external entity reference (Neel Mehta),<br/> 1458 Increase buffer space for port in HTTP redirect support (Daniel Veillard),<br/> 1459 Fix more NULL pointer derefs in xpointer.c (Nick Wellnhofer),<br/> 1460 Avoid function/data pointer conversion in xpath.c (Nick Wellnhofer),<br/> 1461 Fix format string warnings (Nick Wellnhofer),<br/> 1462 Disallow namespace nodes in XPointer points (Nick Wellnhofer),<br/> 1463 Fix comparison with root node in xmlXPathCmpNodes (Nick Wellnhofer),<br/> 1464 Fix attribute decoding during XML schema validation (Alex Henrie),<br/> 1465 Fix NULL pointer deref in XPointer range-to (Nick Wellnhofer)<br/> 1466 </li> 1467 1468 <li>Improvements:<br/> 1469 Updating the spec file to reflect Fedora 24 (Daniel Veillard),<br/> 1470 Add const in five places to move 1 KiB to .rdata (Bruce Dawson),<br/> 1471 Fix missing part of comment for function xmlXPathEvalExpression() (Daniel Veillard),<br/> 1472 Get rid of "blanks wrapper" for parameter entities (Nick Wellnhofer),<br/> 1473 Simplify handling of parameter entity references (Nick Wellnhofer),<br/> 1474 Deduplicate code in encoding.c (Nick Wellnhofer),<br/> 1475 Make HTML parser functions take const pointers (Nick Wellnhofer),<br/> 1476 Build test programs only when needed (Nick Wellnhofer),<br/> 1477 Fix doc/examples/index.py (Nick Wellnhofer),<br/> 1478 Fix compiler warnings in threads.c (Nick Wellnhofer),<br/> 1479 Fix empty-body warning in nanohttp.c (Nick Wellnhofer),<br/> 1480 Fix cast-align warnings (Nick Wellnhofer),<br/> 1481 Fix unused-parameter warnings (Nick Wellnhofer),<br/> 1482 Rework entity boundary checks (Nick Wellnhofer),<br/> 1483 Don't switch encoding for internal parameter entities (Nick Wellnhofer),<br/> 1484 Merge duplicate code paths handling PE references (Nick Wellnhofer),<br/> 1485 Test SAX2 callbacks with entity substitution (Nick Wellnhofer),<br/> 1486 Support catalog and threads tests under --without-sax1 (Nick Wellnhofer),<br/> 1487 Misc fixes for 'make tests' (Nick Wellnhofer),<br/> 1488 Initialize keepBlanks in HTML parser (Nick Wellnhofer),<br/> 1489 Add test cases for bug 758518 (David Kilzer),<br/> 1490 Fix compiler warning in htmlParseElementInternal (Nick Wellnhofer),<br/> 1491 Remove useless check in xmlParseAttributeListDecl (Nick Wellnhofer),<br/> 1492 Allow zero sized memory input buffers (Nick Wellnhofer),<br/> 1493 Add TODO comment in xmlSwitchEncoding (Nick Wellnhofer),<br/> 1494 Check for integer overflow in xmlXPathFormatNumber (Nick Wellnhofer),<br/> 1495 Make Travis print UBSan stacktraces (Nick Wellnhofer),<br/> 1496 Add .travis.yml (Nick Wellnhofer),<br/> 1497 Fix expected error output in Python tests (Nick Wellnhofer),<br/> 1498 Simplify control flow in xmlParseStartTag2 (Nick Wellnhofer),<br/> 1499 Disable LeakSanitizer when running API tests (Nick Wellnhofer),<br/> 1500 Avoid out-of-bound array access in API tests (Nick Wellnhofer),<br/> 1501 Avoid spurious UBSan errors in parser.c (Nick Wellnhofer),<br/> 1502 Parse small XPath numbers more accurately (Nick Wellnhofer),<br/> 1503 Rework XPath rounding functions (Nick Wellnhofer),<br/> 1504 Fix white space in test output (Nick Wellnhofer),<br/> 1505 Fix axis traversal from attribute and namespace nodes (Nick Wellnhofer),<br/> 1506 Check for trailing characters in XPath expressions earlier (Nick Wellnhofer),<br/> 1507 Rework final handling of XPath results (Nick Wellnhofer),<br/> 1508 Make xmlXPathEvalExpression call xmlXPathEval (Nick Wellnhofer),<br/> 1509 Remove unused variables (Nick Wellnhofer),<br/> 1510 Don't print generic error messages in XPath tests (Nick Wellnhofer)<br/> 1511 </li> 1512 1513 <li>Cleanups:<br/> 1514 Fix a couple of misleading indentation errors (Daniel Veillard),<br/> 1515 Remove unnecessary calls to xmlPopInput (Nick Wellnhofer)<br/> 1516 </li> 1517</ul> 1518<h3>2.9.4: May 23 2016</h3> 1519<ul> 1520 <li>Security:<br/> 1521 More format string warnings with possible format string vulnerability (David Kilzer),<br/> 1522 Avoid building recursive entities (Daniel Veillard),<br/> 1523 Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde),<br/> 1524 Heap-based buffer-underreads due to xmlParseName (David Kilzer),<br/> 1525 Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde),<br/> 1526 Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde),<br/> 1527 Fix some format string warnings with possible format string vulnerability (David Kilzer),<br/> 1528 Detect change of encoding when parsing HTML names (Hugh Davenport),<br/> 1529 Fix inappropriate fetch of entities content (Daniel Veillard),<br/> 1530 Bug 759398: Heap use-after-free in xmlDictComputeFastKey <https://bugzilla.gnome.org/show_bug.cgi?id=759398> (Pranjal Jumde),<br/> 1531 Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> (Pranjal Jumde),<br/> 1532 Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal <https://bugzilla.gnome.org/show_bug.cgi?id=758588> (David Kilzer),<br/> 1533 Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> (Pranjal Jumde),<br/> 1534 Add missing increments of recursion depth counter to XML parser. (Peter Simons)<br/> 1535 </li> 1536 1537 <li>Documentation:<br/> 1538 Fix typo: s{ ec -> cr }cipt (Jan Pokorný),<br/> 1539 Fix typos: dictio{ nn -> n }ar{y,ies} (Jan Pokorný),<br/> 1540 Fix typos: PATH_{ SEAPARATOR -> SEPARATOR } (Jan Pokorný),<br/> 1541 Correct a typo. (Shlomi Fish)<br/> 1542 </li> 1543 1544 <li>Portability:<br/> 1545 Correct the usage of LDFLAGS (Mattias Hansson),<br/> 1546 Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson),<br/> 1547 libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger),<br/> 1548 Fix apibuild for a recently added construct (Daniel Veillard),<br/> 1549 Use pkg-config to locate zlib when possible (Stewart Brodie),<br/> 1550 Use pkg-config to locate ICU when possible (Stewart Brodie),<br/> 1551 Portability to non C99 compliant compilers (Patrick Monnerat),<br/> 1552 dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. (Patrick Monnerat),<br/> 1553 os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat),<br/> 1554 os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat),<br/> 1555 os400: implement CL command XMLCATALOG. (Patrick Monnerat),<br/> 1556 os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat),<br/> 1557 os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat),<br/> 1558 os400: implement CL command XMLLINT. (Patrick Monnerat),<br/> 1559 os400: compile and install program xmllint (qshell-only). (Patrick Monnerat),<br/> 1560 os400: initscript make_module(): Use options instead of positional parameters. (Patrick Monnerat),<br/> 1561 os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick Monnerat),<br/> 1562 os400: use like() for double type. (Patrick Monnerat),<br/> 1563 os400: use like() for int type. (Patrick Monnerat),<br/> 1564 os400: use like() for unsigned int type. (Patrick Monnerat),<br/> 1565 os400: use like() for enum types. (Patrick Monnerat),<br/> 1566 Add xz to xml2-config --libs output (Baruch Siach),<br/> 1567 Bug 760190: configure.ac should be able to build --with-icu without icu-config tool <https://bugzilla.gnome.org/show_bug.cgi?id=760190> (David Kilzer),<br/> 1568 win32\VC10\config.h and VS 2015 (Bruce Dawson),<br/> 1569 Add configure maintainer mode (orzen)<br/> 1570 </li> 1571 1572 <li>Bug Fixes:<br/> 1573 Avoid an out of bound access when serializing malformed strings (Daniel Veillard),<br/> 1574 Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer),<br/> 1575 Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer),<br/> 1576 Bug 763071: heap-buffer-overflow in xmlStrncat <https://bugzilla.gnome.org/show_bug.cgi?id=763071> (Pranjal Jumde),<br/> 1577 Integer overflow parsing port number in URI (Michael Paddon),<br/> 1578 Fix an error with regexp on nullable counted char transition (Daniel Veillard),<br/> 1579 Fix memory leak with XPath namespace nodes (Nick Wellnhofer),<br/> 1580 Fix namespace axis traversal (Nick Wellnhofer),<br/> 1581 Fix null pointer deref in docs with no root element (Hugh Davenport),<br/> 1582 Fix XSD validation of URIs with ampersands (Alex Henrie),<br/> 1583 xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of day" and should not cause an error. (Patrick Monnerat),<br/> 1584 xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat),<br/> 1585 xmllint: flush stdout before interactive shell input. (Patrick Monnerat),<br/> 1586 Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer),<br/> 1587 Fix namespace::node() XPath expression (Nick Wellnhofer),<br/> 1588 Fix OOB write in xmlXPathEmptyNodeSet (Nick Wellnhofer),<br/> 1589 Fix parsing of NCNames in XPath (Nick Wellnhofer),<br/> 1590 Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer),<br/> 1591 Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht),<br/> 1592 Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" <https://bugzilla.gnome.org/show_bug.cgi?id=760921> (David Kilzer),<br/> 1593 Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd <https://bugzilla.gnome.org/show_bug.cgi?id=760861> (David Kilzer),<br/> 1594 error.c: *input->cur == 0 does not mean no error (Pavel Raiskup),<br/> 1595 Add missing RNG test files (David Kilzer),<br/> 1596 Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte character in large CDATA section is split across buffer <https://bugzilla.gnome.org/show_bug.cgi?id=760183> (David Kilzer),<br/> 1597 Bug 758572: ASAN crash in make check <https://bugzilla.gnome.org/show_bug.cgi?id=758572> (David Kilzer),<br/> 1598 Bug 721158: Missing ICU string when doing --version on xmllint <https://bugzilla.gnome.org/show_bug.cgi?id=721158> (David Kilzer),<br/> 1599 python 3: libxml2.c wrappers create Unicode str already (Michael Stahl),<br/> 1600 Add autogen.sh to distrib (orzen),<br/> 1601 Heap-based buffer overread in xmlNextChar (Daniel Veillard)<br/> 1602 </li> 1603 1604 <li>Improvements:<br/> 1605 Add more debugging info to runtest (Daniel Veillard),<br/> 1606 Implement "runtest -u" mode (David Kilzer),<br/> 1607 Add a make rule to rebuild for ASAN (Daniel Veillard)<br/> 1608 </li> 1609</ul> 1610<h3>v2.9.3: Nov 20 2015</h3> 1611<ul> 1612 <li>Security:<br/> 1613 CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),<br/> 1614 CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),<br/> 1615 CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),<br/> 1616 CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),<br/> 1617 CVE-2015-5312 Another entity expansion issue (David Drysdale),<br/> 1618 CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),<br/> 1619 CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),<br/> 1620 CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),<br/> 1621 CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),<br/> 1622 CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),<br/> 1623 CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)<br/> 1624 CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),<br/> 1625 CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),<br/> 1626 </li> 1627 1628 <li>Documentation:<br/> 1629 Correct spelling of "calling" (Alex Henrie),<br/> 1630 Fix a small error in xmllint --format description (Fabien Degomme),<br/> 1631 Avoid XSS on the search of xmlsoft.org (Daniel Veillard)<br/> 1632 </li> 1633 1634 <li>Portability:<br/> 1635 threads: use forward declarations only for glibc (Michael Heimpold),<br/> 1636 Update Win32 configure.js to search for configure.ac (Daniel Veillard)<br/> 1637 </li> 1638 1639 <li>Bug Fixes:<br/> 1640 Bug on creating new stream from entity (Daniel Veillard),<br/> 1641 Fix some loop issues embedding NEXT (Daniel Veillard),<br/> 1642 Do not print error context when there is none (Daniel Veillard),<br/> 1643 Avoid extra processing of MarkupDecl when EOF (Hugh Davenport),<br/> 1644 Fix parsing short unclosed comment uninitialized access (Daniel Veillard),<br/> 1645 Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta),<br/> 1646 Fix a bug in CData error handling in the push parser (Daniel Veillard),<br/> 1647 Fix a bug on name parsing at the end of current input buffer (Daniel Veillard),<br/> 1648 Fix the spurious ID already defined error (Daniel Veillard),<br/> 1649 Fix previous change to node sort order (Nick Wellnhofer),<br/> 1650 Fix a self assignment issue raised by clang (Scott Graham),<br/> 1651 Fail parsing early on if encoding conversion failed (Daniel Veillard),<br/> 1652 Do not process encoding values if the declaration if broken (Daniel Veillard),<br/> 1653 Silence clang's -Wunknown-attribute (Michael Catanzaro),<br/> 1654 xmlMemUsed is not thread-safe (Martin von Gagern),<br/> 1655 Fix support for except in nameclasses (Daniel Veillard),<br/> 1656 Fix order of root nodes (Nick Wellnhofer),<br/> 1657 Allow attributes on descendant-or-self axis (Nick Wellnhofer),<br/> 1658 Fix the fix to Windows locking (Steve Nairn),<br/> 1659 Fix timsort invariant loop re: Envisage article (Christopher Swenson),<br/> 1660 Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer),<br/> 1661 Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer),<br/> 1662 Remove various unused value assignments (Philip Withnall),<br/> 1663 Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),<br/> 1664 Revert "Missing initialization for the catalog module" (Daniel Veillard)<br/> 1665 </li> 1666 1667 <li>Improvements:<br/> 1668 Reuse xmlHaltParser() where it makes sense (Daniel Veillard),<br/> 1669 xmlStopParser reset errNo (Daniel Veillard),<br/> 1670 Re-enable xz support by default (Daniel Veillard),<br/> 1671 Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),<br/> 1672 Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance),<br/> 1673 Regression test for bug #695699 (Nick Wellnhofer),<br/> 1674 Add a couple of XPath tests (Nick Wellnhofer),<br/> 1675 Add Python 3 rpm subpackage (Tomas Radej),<br/> 1676 libxml2-config.cmake.in: update include directories (Samuel Martin),<br/> 1677 Adding example from bugs 738805 to regression tests (Daniel Veillard)<br/> 1678 </li> 1679 1680 <li>Cleanups:<br/> 1681 </li> 1682</ul> 1683<h3>2.9.2: Oct 16 2014</h3> 1684<ul> 1685 <li>Security:<br/> 1686 Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),<br/> 1687 CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)<br/> 1688 </li> 1689 1690 <li>Bug Fixes:<br/> 1691 fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),<br/> 1692 xmlmemory: handle realloc properly (Yegor Yefremov),<br/> 1693 Python generator bug raised by the const change (Daniel Veillard),<br/> 1694 Windows Critical sections not released correctly (Daniel Veillard),<br/> 1695 Parser error on repeated recursive entity expansion containing &lt; (Daniel Veillard),<br/> 1696 xpointer : fixing Null Pointers (Gaurav Gupta),<br/> 1697 Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),<br/> 1698 parser bug on misformed namespace attributes (Dennis Filder),<br/> 1699 Pointer dereferenced before null check (Daniel Veillard),<br/> 1700 Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),<br/> 1701 Possible overflow in HTMLParser.c (Daniel Veillard),<br/> 1702 python/tests/sync.py assumes Python dictionaries are ordered (John Beck),<br/> 1703 Fix Enum check and missing break (Gaurav Gupta),<br/> 1704 xmlIO: Handle error returns from dup() (Philip Withnall),<br/> 1705 Fix a problem properly saving URIs (Daniel Veillard),<br/> 1706 wrong error column in structured error when parsing attribute values (Juergen Keil),<br/> 1707 wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),<br/> 1708 no error column in structured error handler for xml schema validation errors (Juergen Keil),<br/> 1709 Couple of Missing Null checks (Gaurav Gupta),<br/> 1710 Add couple of missing Null checks (Daniel Veillard),<br/> 1711 xmlschemastypes: Fix potential array overflow (Philip Withnall),<br/> 1712 runtest: Fix a memory leak on parse failure (Philip Withnall),<br/> 1713 xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),<br/> 1714 xmlcatalog: Fix a memory leak on quit (Philip Withnall),<br/> 1715 HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),<br/> 1716 Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),<br/> 1717 Avoid Possible Null Pointer in trio.c (Gaurav Gupta),<br/> 1718 Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),<br/> 1719 XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),<br/> 1720 Fix various Missing Null checks (Gaurav Gupta),<br/> 1721 Fix a potential NULL dereference (Daniel Veillard),<br/> 1722 Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),<br/> 1723 Add a missing argument check (Gaurav Gupta),<br/> 1724 Adding a check in case of allocation error (Gaurav Gupta),<br/> 1725 xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),<br/> 1726 Adding some missing NULL checks (Gaurav),<br/> 1727 Fixes for xmlInitParserCtxt (Daniel Veillard),<br/> 1728 Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),<br/> 1729 erroneously ignores a validation error if no error callback set (Daniel Veillard),<br/> 1730 xmllint was not parsing the --c14n11 flag (Sérgio Batista),<br/> 1731 Avoid Possible null pointer dereference in memory debug mode (Gaurav),<br/> 1732 Avoid Double Null Check (Gaurav),<br/> 1733 Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),<br/> 1734 Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),<br/> 1735 Avoid a possible NULL pointer dereference (Gaurav),<br/> 1736 Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),<br/> 1737 Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),<br/> 1738 fixing a ptotential uninitialized access (Daniel Veillard),<br/> 1739 Fix an fd leak in an error case (Daniel Veillard),<br/> 1740 Missing initialization for the catalog module (Daniel Veillard),<br/> 1741 Handling of XPath function arguments in error case (Nick Wellnhofer),<br/> 1742 Fix a couple of missing NULL checks (Gaurav),<br/> 1743 Avoid a possibility of dangling encoding handler (Gaurav),<br/> 1744 Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),<br/> 1745 Fix a bug loading some compressed files (Mike Alexander),<br/> 1746 Fix XPath node comparison bug (Gaurav),<br/> 1747 Type mismatch in xmlschemas.c (Gaurav),<br/> 1748 Type mismatch in xmlschemastypes.c (Gaurav),<br/> 1749 Avoid a deadcode in catalog.c (Daniel Veillard),<br/> 1750 run close socket on Solaris, same as we do on other platforms (Denis Pauk),<br/> 1751 Fix pointer dereferenced before null check (Gaurav),<br/> 1752 Fix a potential NULL dereference in tree code (Daniel Veillard),<br/> 1753 Fix potential NULL pointer dereferences in regexp code (Gaurav),<br/> 1754 xmllint --pretty crashed without following numeric argument (Tim Galeckas),<br/> 1755 Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),<br/> 1756 Fix XPath '//' optimization with predicates (Nick Wellnhofer),<br/> 1757 Clear up a potential NULL dereference (Daniel Veillard),<br/> 1758 Fix a possible NULL dereference (Gaurav),<br/> 1759 Avoid crash if allocation fails (Daniel Veillard),<br/> 1760 Remove occasional leading space in XPath number formatting (Daniel Veillard),<br/> 1761 Fix handling of mmap errors (Daniel Veillard),<br/> 1762 Catch malloc error and exit accordingly (Daniel Veillard),<br/> 1763 missing else in xlink.c (Ami Fischman),<br/> 1764 Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),<br/> 1765 Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),<br/> 1766 properly quote the namespace uris written out during c14n (Aleksey Sanin),<br/> 1767 Remove premature XInclude check on URI being relative (Alexey Neyman),<br/> 1768 Fix missing break on last() function for attributes (dcb),<br/> 1769 Do not URI escape in server side includes (Romain Bondue),<br/> 1770 Fix an error in xmlCleanupParser (Alexander Pastukhov)<br/> 1771 </li> 1772 1773 <li>Documentation:<br/> 1774 typo in error messages "colon are forbidden from..." (Daniel Veillard),<br/> 1775 Fix a link to James SAX documentation old page (Daniel Veillard),<br/> 1776 Fix typos in relaxng.c (Jan Pokorný),<br/> 1777 Fix a doc typo (Daniel Veillard),<br/> 1778 Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),<br/> 1779 Add limitations about encoding conversion (Daniel Veillard),<br/> 1780 Fix typos in xmlschemas{,types}.c (Jan Pokorný),<br/> 1781 Fix incorrect spelling entites->entities (Jan Pokorný),<br/> 1782 Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)<br/> 1783 </li> 1784 1785 <li>Portability:<br/> 1786 AC_CONFIG_FILES and executable bit (Roumen Petrov),<br/> 1787 remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),<br/> 1788 fix some tabs mixing incompatible with python3 (Roumen Petrov),<br/> 1789 Visual Studio 14 CTP defines snprintf() (Francis Dupont),<br/> 1790 OS400: do not try to copy unexisting doc files (Patrick Monnerat),<br/> 1791 OS400: use either configure.ac or configure.in. (Patrick Monnerat),<br/> 1792 os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),<br/> 1793 OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),<br/> 1794 OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),<br/> 1795 OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),<br/> 1796 OS400: include in distribution tarball. (Patrick Monnerat),<br/> 1797 OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),<br/> 1798 OS400: Add compilation scripts. (Patrick Monnerat),<br/> 1799 OS400: ILE RPG language header files. (Patrick Monnerat),<br/> 1800 OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),<br/> 1801 OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat),<br/> 1802 OS400: Easy character transcoding support (Patrick Monnerat),<br/> 1803 OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),<br/> 1804 OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),<br/> 1805 Fix building when configuring without xpath and xptr (Daniel Veillard),<br/> 1806 configure: Add --with-python-install-dir (Jonas Eriksson),<br/> 1807 Fix compilation with minimum and xinclude. (Nicolas Le Cam),<br/> 1808 Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),<br/> 1809 Fix compilation with minimum and schematron. (Nicolas Le Cam),<br/> 1810 Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),<br/> 1811 Don't use xmlValidateName() when not available. (Nicolas Le Cam),<br/> 1812 Fix a portability issue on Windows (Longstreth Jon),<br/> 1813 Various portability patches for OpenVMS (Jacob (Jouk) Jansen),<br/> 1814 Use specific macros for portability to OS/400 (Patrick Monnerat),<br/> 1815 Add macros needed for OS/400 portability (Patrick Monnerat),<br/> 1816 Portability patch for fopen on OS/400 (Patrick Monnerat),<br/> 1817 Portability fixes for OS/400 (Patrick Monnerat),<br/> 1818 Improve va_list portability (Patrick Monnerat),<br/> 1819 Portability fix (Patrick Monnerat),<br/> 1820 Portability fix (Patrick Monnerat),<br/> 1821 Generic portability fix (Patrick Monnerat),<br/> 1822 Shortening lines in headers (Patrick Monnerat),<br/> 1823 build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),<br/> 1824 build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),<br/> 1825 fix some tabs mixing incompatible with python3 (Daniel Veillard),<br/> 1826 add additional defines checks for support "./configure --with-minimum" (Denis Pauk),<br/> 1827 Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),<br/> 1828 python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),<br/> 1829 python: Fix compiler warnings when building python3 bindings (Armin K),<br/> 1830 Fix for compilation with python 2.6.8 (Petr Sumbera)<br/> 1831 </li> 1832 1833 <li>Improvements:<br/> 1834 win32/libxml2.def.src after rebuild in doc (Roumen Petrov),<br/> 1835 elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),<br/> 1836 elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),<br/> 1837 Provide cmake module (Samuel Martin),<br/> 1838 Fix a couple of issues raised by make dist (Daniel Veillard),<br/> 1839 Fix and add const qualifiers (Kurt Roeckx),<br/> 1840 Preparing for upcoming release of 2.9.2 (Daniel Veillard),<br/> 1841 Fix zlib and lzma libraries check via command line (Dmitriy),<br/> 1842 wrong error column in structured error when parsing end tag (Juergen Keil),<br/> 1843 doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),<br/> 1844 Add methods for python3 iterator (Ron Angeles),<br/> 1845 Support element node traversal in document fragments. (Kyle VanderBeek),<br/> 1846 xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),<br/> 1847 Added macros for argument casts (Eric Zurcher),<br/> 1848 adding init calls to xml and html Read parsing entry points (Daniel Veillard),<br/> 1849 Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),<br/> 1850 Implement choice for name classes on attributes (Shaun McCance),<br/> 1851 Two small namespace tweaks (Daniel Veillard),<br/> 1852 xmllint --memory should fail on empty files (Daniel Veillard),<br/> 1853 Cast encoding name to char pointer to match arg type (Nikolay Sivov)<br/> 1854 </li> 1855 1856 <li>Cleanups:<br/> 1857 Removal of old configure.in (Daniel Veillard),<br/> 1858 Unreachable code in tree.c (Gaurav Gupta),<br/> 1859 Remove a couple of dead conditions (Gaurav Gupta),<br/> 1860 Avoid some dead code and cleanup in relaxng.c (Gaurav),<br/> 1861 Drop not needed checks (Denis Pauk),<br/> 1862 Fix a wrong test (Daniel Veillard)<br/> 1863 </li> 1864</ul> 1865<h3>2.9.1: Apr 19 2013</h3> 1866<ul> 1867 <li> Features:<br/> 1868 Support for Python3 (Daniel Veillard),<br/> 1869 Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)<br/> 1870 </li> 1871 1872 <li> Documentation:<br/> 1873 Add documentation for xmllint --xpath (Daniel Veillard),<br/> 1874 Fix the URL of the SAX documentation from James (Daniel Veillard),<br/> 1875 Fix spelling of "length". (Michael Wood)<br/> 1876 </li> 1877 1878 <li> Portability:<br/> 1879 Fix python bindings with versions older than 2.7 (Daniel Veillard),<br/> 1880 rebuild docs:Makefile.am (Roumen Petrov),<br/> 1881 elfgcchack.h after rebuild in doc (Roumen Petrov),<br/> 1882 elfgcchack for buf module (Roumen Petrov),<br/> 1883 Fix a uneeded and wrong extra link parameter (Daniel Veillard),<br/> 1884 Few cleanup patches for Windows (Denis Pauk),<br/> 1885 Fix rpmbuild --nocheck (Mark Salter),<br/> 1886 Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),<br/> 1887 Fix Broken multi-arch support in xml2-config (Daniel Veillard),<br/> 1888 Fix a portability issue for GCC < 3.4.0 (Daniel Veillard),<br/> 1889 Windows build fixes (Daniel Richard),<br/> 1890 Fix a thread portability problem (Friedrich Haubensak),<br/> 1891 Downgrade autoconf requirement to 2.63 (Daniel Veillard)<br/> 1892 </li> 1893 1894 <li> Bug Fixes:<br/> 1895 Fix a linking error for python bindings (Daniel Veillard),<br/> 1896 Fix a couple of return without value (Jüri Aedla),<br/> 1897 Improve the hashing functions (Daniel Franke),<br/> 1898 Improve handling of xmlStopParser() (Daniel Veillard),<br/> 1899 Remove risk of lockup in dictionary initialization (Daniel Veillard),<br/> 1900 Activate detection of encoding in external subset (Daniel Veillard),<br/> 1901 Fix an output buffer flushing conversion bug (Mikhail Titov),<br/> 1902 Fix an old bug in xmlSchemaValidateOneElement (Csaba László),<br/> 1903 Fix configure cannot remove messages (Gilles Espinasse),<br/> 1904 fix schema validation in combination with xsi:nil (Daniel Veillard),<br/> 1905 xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),<br/> 1906 Fix a few problems with setEntityLoader (Alexey Neyman),<br/> 1907 Detect excessive entities expansion upon replacement (Daniel Veillard),<br/> 1908 Fix the flushing out of raw buffers on encoding conversions (Daniel,<br/> 1909Veillard),<br/> 1910 Fix some buffer conversion issues (Daniel Veillard),<br/> 1911 When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,<br/> 1912Veillard),<br/> 1913 Fix an error in the progressive DTD parsing code (Dan Winship),<br/> 1914 xmllint should not load DTD by default when using the reader (Daniel,<br/> 1915Veillard),<br/> 1916 Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),<br/> 1917 Fix potential out of bound access (Daniel Veillard),<br/> 1918 Fix large parse of file from memory (Daniel Veillard),<br/> 1919 Fix a bug in the nsclean option of the parser (Daniel Veillard),<br/> 1920 Fix a regression in 2.9.0 breaking validation while streaming (Daniel,<br/> 1921Veillard),<br/> 1922 Remove potential calls to exit() (Daniel Veillard)<br/> 1923 </li> 1924 1925 <li> Improvements:<br/> 1926 Regenerated API, and testapi, rebuild documentation (Daniel Veillard),<br/> 1927 Fix tree iterators broken by 2to3 script (Daniel Veillard),<br/> 1928 update all tests for Python3 and Python2 (Daniel Veillard),<br/> 1929 A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),<br/> 1930 Fix compilation on Python3 (Daniel Veillard),<br/> 1931 Converting apibuild.py to python3 (Daniel Veillard),<br/> 1932 First pass at starting porting to python3 (Daniel Veillard),<br/> 1933 updated configure.in for python3 (Daniel Veillard),<br/> 1934 Add support for xpathRegisterVariable in Python (Shaun McCance),<br/> 1935 Added a regression tests from bug 694228 data (Daniel Veillard),<br/> 1936 Cache presence of '<' in entities content (Daniel Veillard),<br/> 1937 Avoid extra processing on entities (Daniel Veillard),<br/> 1938 Python binding for xmlRegisterInputCallback (Alexey Neyman),<br/> 1939 Python bindings: DOM casts everything to xmlNode (Alexey Neyman),<br/> 1940 Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),<br/> 1941 Adding streaming validation to runtest checks (Daniel Veillard),<br/> 1942 Add a --pushsmall option to xmllint (Daniel Veillard)<br/> 1943 </li> 1944 1945 <li> Cleanups:<br/> 1946 Switched comment in file to UTF-8 encoding (Daniel Veillard),<br/> 1947 Extend gitignore (Daniel Veillard),<br/> 1948 Silent the new python test on input (Alexey Neyman),<br/> 1949 Cleanup of a duplicate test (Daniel Veillard),<br/> 1950 Cleanup on duplicate test expressions (Daniel Veillard),<br/> 1951 Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,<br/> 1952Gansterer),<br/> 1953 Spec cleanups and a fix for multiarch support (Daniel Veillard),<br/> 1954 Silence a clang warning (Daniel Veillard),<br/> 1955 Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),<br/> 1956 rand_seed should be static in dict.c (Wouter Van Rooy),<br/> 1957 Fix typos in parser comments (Jan Pokorný)<br/> 1958 </li> 1959</ul> 1960<h3>2.9.0: Sep 11 2012</h3> 1961<ul> 1962 <li> Features:<br/> 1963 A few new API entry points,<br/> 1964 More resilient push parser mode,<br/> 1965 A lot of portability improvement,<br/> 1966 Faster XPath evaluation<br/> 1967 </li> 1968 1969 <li> Documentation:<br/> 1970 xml2-config.1 markup error (Christian Weisgerber),<br/> 1971 libxml(3) manpage typo fix (John Bradshaw),<br/> 1972 More cleanups to the documentation part of libxml2 (Daniel Richard G)<br/> 1973 </li> 1974 1975 <li> Portability:<br/> 1976 Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),<br/> 1977 fix builds not having stdint.h (Rob Richards),<br/> 1978 GetProcAddressA is available only on WinCE (Daniel Veillard),<br/> 1979 More updates and cleanups on autotools and Makefiles (Daniel Richard G),<br/> 1980 More changes for Win32 compilation (Eric Zurcher),<br/> 1981 Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),<br/> 1982 Bundles all generated files for python into the distribution (Daniel Richard G),<br/> 1983 Fix compiler warnings of wincecompat.c (Patrick Gansterer),<br/> 1984 Fix non __GNUC__ build (Patrick Gansterer),<br/> 1985 Fix windows unicode build (Patrick Gansterer),<br/> 1986 clean redefinition of {v}snprintf in C-source (Roumen Petrov),<br/> 1987 use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),<br/> 1988 fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),<br/> 1989 Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),<br/> 1990 Various "make distcheck" and portability fixups (Daniel Richard G),<br/> 1991 Fix compilation on older Visual Studio (Daniel Veillard)<br/> 1992 </li> 1993 1994 <li> Bug Fixes:<br/> 1995 Change the XPath code to percolate allocation errors (Daniel Veillard),<br/> 1996 Fix reuse of xmlInitParser (Daniel Veillard),<br/> 1997 Fix potential crash on entities errors (Daniel Veillard),<br/> 1998 initialize var (Rob Richards),<br/> 1999 Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),<br/> 2000 Fix problem with specific and generic error handlers (Pietro Cerutti),<br/> 2001 Avoid a potential infinite recursion (Daniel Veillard),<br/> 2002 Fix an XSD error when generating internal automata (Daniel Veillard),<br/> 2003 Patch for xinclude of text using multibyte characters (Vitaly Ostanin),<br/> 2004 Fix a segfault on XSD validation on pattern error (Daniel Veillard),<br/> 2005 Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),<br/> 2006 Add a missing element check (Daniel Veillard),<br/> 2007 Adding various checks on node type though the API (Daniel Veillard),<br/> 2008 Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),<br/> 2009 Fix make dist to include new private header files (Daniel Veillard),<br/> 2010 More fixups on the push parser behaviour (Daniel Veillard),<br/> 2011 Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),<br/> 2012 Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),<br/> 2013 Fixup limits parser (Daniel Veillard),<br/> 2014 Do not fetch external parsed entities (Daniel Veillard),<br/> 2015 Fix an error in previous commit (Aron Xu),<br/> 2016 Fix entities local buffers size problems (Daniel Veillard),<br/> 2017 Fix parser local buffers size problems (Daniel Veillard),<br/> 2018 Fix a failure to report xmlreader parsing failures (Daniel Veillard)<br/> 2019 </li> 2020 2021 <li> Improvements:<br/> 2022 Keep libxml2.syms when running "make distclean" (Daniel Veillard),<br/> 2023 Allow to set the quoting character of an xmlWriter (Csaba Raduly),<br/> 2024 Keep non-significant blanks node in HTML parser (Daniel Veillard),<br/> 2025 Add a forbidden variable error number and message to XPath (Daniel Veillard),<br/> 2026 Support long path names on WNT (Michael Stahl),<br/> 2027 Improve HTML escaping of attribute on output (Daniel Veillard),<br/> 2028 Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),<br/> 2029 Switching XPath node sorting to Timsort (Vojtech Fried),<br/> 2030 Optimizing '//' in XPath expressions (Nick Wellnhofer),<br/> 2031 Expose xmlBufShrink in the public tree API (Daniel Veillard),<br/> 2032 Visible HTML elements close the head tag (Conrad Irwin),<br/> 2033 Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),<br/> 2034 Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),<br/> 2035 minimize use of HAVE_CONFIG_H (Roumen Petrov),<br/> 2036 fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),<br/> 2037 Add support for big line numbers in error reporting (Daniel Veillard),<br/> 2038 Avoid using xmlBuffer for serialization (Daniel Veillard),<br/> 2039 Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),<br/> 2040 Provide new accessors for xmlOutputBuffer (Daniel Veillard),<br/> 2041 Improvements for old buffer compatibility (Daniel Veillard),<br/> 2042 Expand the limit test program (Daniel Veillard),<br/> 2043 Improve error reporting on parser errors (Daniel Veillard),<br/> 2044 Implement some default limits in the XPath module (Daniel Veillard),<br/> 2045 Introduce some default parser limits (Daniel Veillard),<br/> 2046 Cleanups and new limit APIs for dictionaries (Daniel Veillard),<br/> 2047 Fixup for buf.c (Daniel Veillard),<br/> 2048 Cleanup URI module memory allocation code (Daniel Veillard),<br/> 2049 Extend testlimits (Daniel Veillard),<br/> 2050 More avoid quadratic behaviour (Daniel Veillard),<br/> 2051 Impose a reasonable limit on PI size (Daniel Veillard),<br/> 2052 first version of testlimits new test (Daniel Veillard),<br/> 2053 Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),<br/> 2054 Impose a reasonable limit on comment size (Daniel Veillard),<br/> 2055 Impose a reasonable limit on attribute size (Daniel Veillard),<br/> 2056 Harden the buffer code and make it more compatible (Daniel Veillard),<br/> 2057 More cleanups for input/buffers code (Daniel Veillard),<br/> 2058 Cleanup function xmlBufResetInput(),<br/> to set input from Buffer (Daniel Veillard) 2059 Switch the test program for characters to new input buffers (Daniel Veillard),<br/> 2060 Convert the HTML tree module to the new buffers (Daniel Veillard),<br/> 2061 Convert of the HTML parser to new input buffers (Daniel Veillard),<br/> 2062 Convert the writer to new output buffer and save APIs (Daniel Veillard),<br/> 2063 Convert XMLReader to the new input buffers (Daniel Veillard),<br/> 2064 New saving functions using xmlBuf and conversion (Daniel Veillard),<br/> 2065 Provide new xmlBuf based saving functions (Daniel Veillard),<br/> 2066 Convert XInclude to the new input buffers (Daniel Veillard),<br/> 2067 Convert catalog code to the new input buffers (Daniel Veillard),<br/> 2068 Convert C14N to the new Input buffer (Daniel Veillard),<br/> 2069 Convert xmlIO.c to the new input and output buffers (Daniel Veillard),<br/> 2070 Convert XML parser to the new input buffers (Daniel Veillard),<br/> 2071 Incompatible change to the Input and Output buffers (Daniel Veillard),<br/> 2072 Adding new encoding function to deal with the new structures (Daniel Veillard),<br/> 2073 Convert XPath to xmlBuf (Daniel Veillard),<br/> 2074 Adding a new buf module for buffers (Daniel Veillard),<br/> 2075 Memory error within SAX2 reuse common framework (Daniel Veillard),<br/> 2076 Fix xmllint --xpath node initialization (Daniel Veillard)<br/> 2077 </li> 2078 2079 <li> Cleanups:<br/> 2080 Various cleanups to avoid compiler warnings (Daniel Veillard),<br/> 2081 Big space and tab cleanup (Daniel Veillard),<br/> 2082 Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),<br/> 2083 Second round of cleanups for LibXML2 docs/examples (Daniel Richard),<br/> 2084 Remove all .cvsignore as they are not used anymore (Daniel Veillard),<br/> 2085 Fix a Timsort function helper comment (Daniel Veillard),<br/> 2086 Small cleanup for valgrind target (Daniel Veillard),<br/> 2087 Patch for portability of latin characters in C files (Daniel Veillard),<br/> 2088 Cleanup some of the parser code (Daniel Veillard),<br/> 2089 Fix a variable name in comment (Daniel Veillard),<br/> 2090 Regenerated testapi.c (Daniel Veillard),<br/> 2091 Regenerating docs and API files (Daniel Veillard),<br/> 2092 Small cleanup of unused variables in test (Daniel Veillard),<br/> 2093 Expand .gitignore with more files (Daniel Veillard)<br/> 2094 </li> 2095</ul> 2096<h3>2.8.0: May 23 2012</h3> 2097<ul> 2098 <li>Features: 2099 add lzma compression support (Anders F Bjorklund) 2100 </li> 2101 2102 <li>Documentation: 2103 xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä), 2104 Update README.tests (Daniel Veillard), 2105 URI handling code is not OOM resilient (Daniel Veillard), 2106 Fix an error in comment (Daniel Veillard), 2107 Fixed bug #617016 (Daniel Mustieles), 2108 Fixed two typos in the README document (Daniel Neel), 2109 add generated html files (Anders F Bjorklund), 2110 Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard), 2111 Improve documentation a bit (Daniel Veillard), 2112 Updated URL for lxml python bindings (Daniel Veillard) 2113 </li> 2114 2115 <li>Portability: 2116 Restore code for Windows compilation (Daniel Veillard), 2117 Remove git error message during configure (Christian Dywan), 2118 xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer), 2119 remove a bashism in confgure.in (John Hein), 2120 undef ERROR if already defined (Patrick R. Gansterer), 2121 Fix library problems with mingw-w64 (Michael Cronenworth), 2122 fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards), 2123 prefer native threads on win32 (Sam Thursfield), 2124 Allow to compile with Visual Studio 2010 (Thomas Lemm), 2125 Fix mingw's snprintf configure check (Andoni Morales), 2126 fixed a 64bit big endian issue (Marcus Meissner), 2127 Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard), 2128 Fix windows build from lzma addition (Rob Richards), 2129 autogen: Only check for libtoolize (Colin Walters), 2130 Fix the Windows build files (Patrick von Reth), 2131 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard), 2132 599241 fix an initialization problem on Win64 (Andrew W. Nosenko), 2133 fix win build (Rob Richards) 2134 </li> 2135 2136 <li>Bug fixes: 2137 Part for rand_r checking missing (Daniel Veillard), 2138 Cleanup on randomization (Daniel Veillard), 2139 Fix undefined reference in python module (Pacho Ramos), 2140 Fix a race in xmlNewInputStream (Daniel Veillard), 2141 Fix weird streaming RelaxNG errors (Noam), 2142 Fix various bugs in new code raised by the API checking (Daniel Veillard), 2143 Fix various problems with "make dist" (Daniel Veillard), 2144 Fix a memory leak in the xzlib code (Daniel Veillard), 2145 HTML parser error with <noscript> in the <head> (Denis Pauk), 2146 XSD: optional element in complex type extension (Remi Gacogne), 2147 Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard), 2148 Fix a wrong return value in previous patch (Daniel Veillard), 2149 Fix an uninitialized variable use (Daniel Veillard), 2150 Fix a compilation problem with --minimum (Brandon Slack), 2151 Remove redundant and ungarded include of resolv.h (Daniel Veillard), 2152 xinclude with parse="text" does not use the entity loader (Shaun McCance), 2153 Allow to parse 1 byte HTML files (Denis Pauk), 2154 Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder), 2155 Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li), 2156 Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott), 2157 xmlParseNodeInContext problems with an empty document (Tim Elliott), 2158 HTML element position is not detected properly (Pavel Andrejs), 2159 Fix an off by one pointer access (Jüri Aedla), 2160 Try to fix a problem with entities in SAX mode (Daniel Veillard), 2161 Fix a crash with xmllint --path on empty results (Daniel Veillard), 2162 Fixed bug #667946 (Daniel Mustieles), 2163 Fix a logic error in Schemas Component Constraints (Ryan Sleevi), 2164 Fix a wrong enum type use in Schemas Types (Nico Weber), 2165 Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard), 2166 Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard), 2167 fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan), 2168 fix a pair of possible out of array char references (Daniel Veillard), 2169 Fix an allocation error when copying entities (Daniel Veillard), 2170 Make sure the parser returns when getting a Stop order (Chris Evans), 2171 Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng), 2172 Fix a schema type duration comparison overflow (Daniel Veillard), 2173 Fix an unimplemented part in RNG value validation (Daniel Veillard), 2174 Fix missing error status in XPath evaluation (Daniel Veillard), 2175 Hardening of XPath evaluation (Daniel Veillard), 2176 Fix an off by one error in encoding (Daniel Veillard), 2177 Fix RELAX NG include bug #655288 (Shaun McCance), 2178 Fix XSD validation bug #630130 (Toyoda Eizi), 2179 Fix some potential problems on reallocation failures (Chris Evans), 2180 __xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin), 2181 __xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin), 2182 Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards), 2183 Small fix for previous commit (Daniel Veillard), 2184 Fix a potential freeing error in XPath (Daniel Veillard), 2185 Fix a potential memory access error (Daniel Veillard), 2186 Reactivate the shared library versioning script (Daniel Veillard) 2187 </li> 2188 2189 <li>Improvements: 2190 use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov), 2191 New symbols added for the next release (Daniel Veillard), 2192 xmlTextReader bails too quickly on error (Andy Lutomirski), 2193 Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin), 2194 Use buffers when constructing string node lists. (Conrad Irwin), 2195 Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk), 2196 wrong message for double hyphen in comment XML error (Bryan Henderson), 2197 Fix "make tst" to grab lzma lib too (Daniel Veillard), 2198 Add "whereis" command to xmllint shell (Ryan), 2199 Improve xmllint shell (Ryan), 2200 add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky), 2201 Add --system support to autogen.sh (Daniel Veillard), 2202 Add hash randomization to hash and dict structures (Daniel Veillard), 2203 included xzlib in dist (Anders F Bjorklund), 2204 move xz/lzma helpers to separate included files (Anders F Bjorklund), 2205 add generated devhelp files (Anders F Bjorklund), 2206 add XML_WITH_LZMA to api (Anders F Bjorklund), 2207 autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters), 2208 Improve the error report on undefined REFs (Daniel Veillard), 2209 Add exception for new W3C PI xml-model (Daniel Veillard), 2210 Add options to ignore the internal encoding (Daniel Veillard), 2211 testapi: use the right type for the check (Stefan Kost), 2212 various: handle return values of write calls (Stefan Kost), 2213 testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost), 2214 runxmlconf: update to latest testsuite version (Stefan Kost), 2215 configure: add -Wno-long-long to CFLAGS (Stefan Kost), 2216 configure: support silent automake rules if possible (Stefan Kost), 2217 xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost), 2218 __xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin), 2219 __xmlRaiseError: do cheap code check early (Dmitry V. Levin) 2220 </li> 2221 2222 <li>Cleanups: 2223 Cleanups before 2.8.0-rc2 (Daniel Veillard), 2224 Avoid an extra operation (Daniel Veillard), 2225 Remove vestigial de-ANSI-fication support. (Javier Jardón), 2226 autogen.sh: Fix typo (Javier Jardón), 2227 Do not use unsigned but unsigned int (Daniel Veillard), 2228 Remove two references to u_short (Daniel Veillard), 2229 Fix -Wempty-body warning from clang (Nico Weber), 2230 Cleanups of lzma support (Daniel Veillard), 2231 Augment the list of ignored files (Daniel Veillard), 2232 python: remove unused variable (Stefan Kost), 2233 python: flag two unused args (Stefan Kost), 2234 configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost), 2235 xpath: remove unused variable (Stefan Kost) 2236 </li> 2237</ul> 2238<h3>2.7.8: Nov 4 2010</h3> 2239<ul> 2240 <li> Features: 2241 480323 add code to plug in ICU converters by default (Giuseppe Iuculano), 2242 Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg) 2243 </li> 2244 <li> Documentation: 2245 Fix devhelp documentation installation (Mike Hommey), 2246 Fix web site encoding problems (Daniel Veillard), 2247 Fix a couple of typo in HTML parser error messages (Michael Day), 2248 Forgot to update the news page for 0.7.7 (Daniel Veillard) 2249 </li> 2250 <li> Portability: 2251 607273 Fix python detection on MSys/Windows (LRN), 2252 614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer), 2253 Fix compilation with Clang (Koop Mast), 2254 Fix Win32 build (Rob Richards) 2255 </li> 2256 <li> Bug Fixes: 2257 595789 fix a remaining potential Solaris problem (Daniel Veillard), 2258 617468 fix progressive HTML parsing with style using "'" (Denis Pauk), 2259 616478 Fix xmllint shell write command (Gwenn Kahz), 2260 614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile), 2261 627987 Fix XSD IDC errors in imported schemas (Jim Panetta), 2262 629325 XPath rounding errors first cleanup (Phil Shafer), 2263 630140 fix iso995x encoding error (Daniel Veillard), 2264 make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard), 2265 Fix a change of semantic on XPath preceding and following axis (Daniel Veillard), 2266 Fix a potential segfault due to weak symbols on pthreads (Mike Hommey), 2267 Fix a leak in XPath compilation (Daniel Veillard), 2268 Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard), 2269 Avoid a descriptor leak in catalog loading code (Carlo Bramini), 2270 Fix a small bug in XPath evaluation code (Marius Wachtler), 2271 Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard), 2272 Fix errors in XSD double validation check (Csaba Raduly), 2273 Fix handling of apos in URIs (Daniel Veillard), 2274 xmlTextReaderReadOuterXml should handle DTD (Rob Richards), 2275 Autogen.sh needs to create m4 directory (Rob Richards) 2276 </li> 2277 <li> Improvements: 2278 606592 update language ID parser to RFC 5646 (Daniel Veillard), 2279 Sort python generated stubs (Mike Hommey), 2280 Add an HTML parser option to avoid a default doctype (Daniel Veillard) 2281 </li> 2282 <li> Cleanups: 2283 618831 don't ship generated files in git (Adrian Bunk), 2284 Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk), 2285 Various cleanups on encoding handling (Daniel Veillard), 2286 Fix xmllint to use format=1 for default formatting (Adam Spragg), 2287 Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg), 2288 Cleanup encoding pointer comparison (Nikolay Sivov), 2289 Small code cleanup on previous patch (Daniel Veillard) 2290 </li> 2291</ul> 2292<h3>2.7.7: Mar 15 2010</h3> 2293<ul> 2294 <li> Improvements: 2295 Adding a --xpath option to xmllint (Daniel Veillard), 2296 Make HTML parser non-recursive (Eugene Pimenov) 2297 </li> 2298 <li> Portability: 2299 relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton), 2300 Fix build failure on Sparc solaris (Roumen Petrov), 2301 use autoreconf in autogen.sh (Daniel Veillard), 2302 Fix build with mingw (Roumen Petrov), 2303 Upgrade some of the configure and autogen (Daniel Veillard), 2304 Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards), 2305 Fix a const warning in xmlNodeSetBase (Martin Trappel), 2306 Fix python generator to not use deprecated xmllib (Daniel Veillard), 2307 Update some automake files (Daniel Veillard), 2308 598785 Fix nanohttp on Windows (spadix) 2309 </li> 2310 <li> Bug Fixes: 2311 libxml violates the zlib interface and crashes (Mark Adler), 2312 Fix broken escape behaviour in regexp ranges (Daniel Veillard), 2313 Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch), 2314 Fix detection of python linker flags (Daniel Macks), 2315 fix build error in libxml2/python (Paul Smith), 2316 ChunkParser: Incorrect decoding of small xml files (Raul Hudea), 2317 htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov), 2318 Fix a missing #ifdef (Daniel Veillard), 2319 Fix encoding selection for xmlParseInNodeContext (Daniel Veillard), 2320 xmlPreviousElementSibling mistake (François Delyon), 2321 608773 add a missing check in xmlGROW (Daniel Veillard), 2322 Fix xmlParseInNodeContext for HTML content (Daniel Veillard), 2323 Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards), 2324 Fix some missing commas in HTML element lists (Eugene Pimenov), 2325 Correct variable type to unsigned (Nikolay Sivov), 2326 Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard), 2327 Fix memory leak in xmlXPathEvalExpression() (Martin), 2328 Fix an init bug in global.c (Kai Henning), 2329 Fix xmlNodeSetBase() comment (Daniel Veillard), 2330 Fix broken escape behaviour in regexp ranges (Daniel Veillard), 2331 Don't give default HTML boolean attribute values in parser (Daniel Veillard), 2332 xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard) 2333 </li> 2334 <li> Cleanups: 2335 Cleanup a couple of weirdness in HTML parser (Eugene Pimenov) 2336 </li> 2337</ul> 2338<h3>2.7.6: Oct 6 2009</h3> 2339<ul> 2340 <li> Bug Fixes: 2341 Restore thread support in default configuration (Andrew W. Nosenko), 2342 URI with no path parsing problem (Daniel Veillard), 2343 Minor patch for conditional defines in threads.c (Eric Zurcher) 2344 </li> 2345</ul> 2346<h3>2.7.5: Sep 24 2009</h3> 2347<ul> 2348 <li> Bug Fixes: 2349 Restore behavior of --with-threads without argument (Andrew W. Nosenko), 2350 Fix memory leak when doc is NULL (Rob Richards), 2351 595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard), 2352 Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard), 2353 Fix a parsing problem with little data at startup (Daniel Veillard), 2354 link python module with python library (Frederic Crozat), 2355 594874 Forgot an fclose in xmllint (Daniel Veillard) 2356 </li> 2357 <li> Cleanup: 2358 Adding symbols.xml to EXTRA_DIST (Daniel Veillard) 2359 </li> 2360</ul> 2361<h3>2.7.4: Sep 10 2009</h3> 2362<ul> 2363 <li>Improvements: 2364 Switch to GIT (GNOME), 2365 Add symbol versioning to libxml2 shared libs (Daniel Veillard) 2366 </li> 2367 <li>Portability: 2368 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard), 2369 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard), 2370 Fix Windows build * relaxng.c: fix windows build (Rob Richards), 2371 Fix the globals.h to use XMLPUBFUN (Paul Smith), 2372 Problem with extern extern in header (Daniel Veillard), 2373 Add -lnetwork for compiling on Haiku (Scott McCreary), 2374 Runtest portability patch for Solaris (Tim Rice), 2375 Small patch to accommodate the Haiku OS (Scott McCreary), 2376 584605 package VxWorks folder in the distribution (Daniel Veillard), 2377 574017 Realloc too expensive on most platform (Daniel Veillard), 2378 Fix windows build (Rob Richards), 2379 545579 doesn't compile without schema support (Daniel Veillard), 2380 xmllint use xmlGetNodePath when not compiled in (Daniel Veillard), 2381 Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard), 2382 Allow to select the threading system on Windows (LRN), 2383 Fix Solaris binary links, cleanups (Daniel Veillard), 2384 Bug 571059 â MSVC doesn't work with the bakefile (Intron), 2385 fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey), 2386 fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher) 2387 </li> 2388 <li>Documentation: 2389 544910 typo: "renciliateNs" (Leonid Evdokimov), 2390 Add VxWorks to list of OSes (Daniel Veillard), 2391 Regenerate the documentation and update for git (Daniel Veillard), 2392 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard), 2393 Added sponsoring by AOE media for the server (Daniel Veillard), 2394 updated URLs for GNOME (Vincent Lefevre), 2395 more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard) 2396 </li> 2397 <li>Bug fixes: 2398 594514 memory leaks - duplicate initialization (MOD), 2399 Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard), 2400 492317 Fix Relax-NG validation problems (Daniel Veillard), 2401 558452 fight with reg test and error report (Daniel Veillard), 2402 558452 RNG compilation of optional multiple child (Daniel Veillard), 2403 579746 XSD validation not correct / nilable groups (Daniel Veillard), 2404 502960 provide namespace stack when parsing entity (Daniel Veillard), 2405 566012 part 2 fix regression tests and push mode (Daniel Veillard), 2406 566012 autodetected encoding and encoding conflict (Daniel Veillard), 2407 584220 xpointer(/) and xinclude problems (Daniel Veillard), 2408 587663 Incorrect Attribute-Value Normalization (Daniel Veillard), 2409 444994 HTML chunked failure for attribute with <> (Daniel Veillard), 2410 Fix end of buffer char being split in XML parser (Daniel Veillard), 2411 Non ASCII character may be split at buffer end (Adiel Mittmann), 2412 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel), 2413 572129 speed up parsing of large HTML text nodes (Markus Kull), 2414 Fix HTML parsing with 0 character in CDATA (Daniel Veillard), 2415 Fix SetGenericErrorFunc and SetStructured clash (Wang Lam), 2416 566012 Incomplete EBCDIC parsing support (Martin Kogler), 2417 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard), 2418 541237 error correcting missing end tags in HTML (Daniel Veillard), 2419 583439 missing line numbers in push mode (Daniel Veillard), 2420 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard), 2421 559501 avoid select and use poll for nanohttp (Raphael Prevost), 2422 559410 - Regexp bug on (...)? constructs (Daniel Veillard), 2423 Fix a small problem on previous HTML parser patch (Daniel Veillard), 2424 592430 - HTML parser runs into endless loop (Daniel Veillard), 2425 447899 potential double free in xmlFreeTextReader (Daniel Veillard), 2426 446613 small validation bug mixed content with NS (Daniel Veillard), 2427 Fix the problem of revalidating a doc with RNG (Daniel Veillard), 2428 Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer), 2429 512131 refs from externalRef part need to be added (Daniel Veillard), 2430 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard), 2431 588441 allow '.' in HTML Names even if invalid (Daniel Veillard), 2432 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard), 2433 579317 Try to find the HTML encoding information (Daniel Veillard), 2434 575875 don't output charset=html (Daniel Veillard), 2435 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard), 2436 570702 fix a bug in regexp determinism checking (Daniel Veillard), 2437 567619 xmlValidateNotationUse missing param test (Daniel Veillard), 2438 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer), 2439 Fix a couple of problems in the parser (Daniel Veillard), 2440 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen), 2441 582906 XSD validating multiple imports of the same schema (Jason Childs), 2442 Bug 582887 ¿ problems validating complex schemas (Jason Childs), 2443 Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos), 2444 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky), 2445 Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre), 2446 Preserve attributes of include start on tree copy (Petr Pajas), 2447 Skip silently unrecognized XPointer schemes (Jakub Wilk), 2448 Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard), 2449 potential NULL dereference on non-glibc (Jim Meyering), 2450 Fix an XSD validation crash (Daniel Veillard), 2451 Fix a regression in streaming entities support (Daniel Veillard), 2452 Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin), 2453 Aleksey Sanin support for c14n 1.1 (Aleksey Sanin), 2454 reader bug fix with entities (Daniel Veillard), 2455 use options from current parser ctxt for external entities (Rob Richards), 2456 581612 use %s to printf strings (Christian Persch), 2457 584605 change the threading initialization sequence (Igor Novoseltsev), 2458 580705 keep line numbers in HTML parser (Aaron Patterson), 2459 581803 broken HTML table attributes init (Roland Steiner), 2460 do not set error code in xmlNsWarn (Rob Richards), 2461 564217 fix structured error handling problems, 2462 reuse options from current parser for entities (Rob Richards), 2463 xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard), 2464 add a missing check in xmlAddSibling (Kris Breuker), 2465 avoid leaks on errors (Jinmei Tatuya) 2466 </li> 2467 <li>Cleanup: 2468 Chasing dead assignments reported by clang-scan (Daniel Veillard), 2469 A few more safety cleanup raised by scan (Daniel Veillard), 2470 Fixing assorted potential problems raised by scan (Daniel Veillard), 2471 Potential uninitialized arguments raised by scan (Daniel Veillard), 2472 Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard), 2473 Remove a pedantic warning (Daniel Veillard), 2474 555833 always use rm -f in uninstall-local (Daniel Veillard), 2475 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard), 2476 Autoregenerate libxml2.syms automated checkings (Daniel Veillard), 2477 Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard), 2478 Both args of xmlStrcasestr are const (Daniel Veillard), 2479 hide the nbParse* variables used for debugging (Mike Hommey), 2480 570806 changed include of config.h (William M. Brack), 2481 cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya) 2482 </li> 2483</ul> 2484<h3>2.7.3: Jan 18 2009</h3> 2485<ul> 2486 <li>Build fix: fix build when HTML support is not included.</li> 2487 <li>Bug fixes: avoid memory overflow in gigantic text nodes, 2488 indentation problem on the writed (Rob Richards), 2489 xmlAddChildList pointer problem (Rob Richards and Kevin Milburn), 2490 xmlAddChild problem with attribute (Rob Richards and Kris Breuker), 2491 avoid a memory leak in an edge case (Daniel Zimmermann), 2492 deallocate some pthread data (Alex Ott).</li> 2493 <li>Improvements: configure option to avoid rebuilding docs (Adrian Bunk), 2494 limit text nodes to 10MB max by default, add element traversal 2495 APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards), 2496 add gcc malloc checking (Marcus Meissner), add gcc printf like functions 2497 parameters checking (Marcus Meissner).</li> 2498</ul> 2499<h3>2.7.2: Oct 3 2008</h3> 2500<ul> 2501 <li>Portability fix: fix solaris compilation problem, fix compilation 2502 if XPath is not configured in</li> 2503 <li>Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour 2504 when saving an HTML doc with an xml dump function, HTML UTF-8 parsing 2505 bug, fix reader custom error handlers (Riccardo Scussat) 2506 <li>Improvement: xmlSave options for more flexibility to save as 2507 XML/HTML/XHTML, handle leading BOM in HTML documents</li> 2508</ul> 2509 2510<h3>2.7.1: Sep 1 2008</h3> 2511<ul> 2512 <li>Portability fix: Borland C fix (Moritz Both)</li> 2513 <li>Bug fixes: python serialization wrappers, XPath QName corner 2514 case handking and leaks (Martin)</li> 2515 <li>Improvement: extend the xmlSave to handle HTML documents and trees</li> 2516 <li>Cleanup: python serialization wrappers</li> 2517</ul> 2518 2519<h3>2.7.0: Aug 30 2008</h3> 2520<ul> 2521 <li>Documentation: switch ChangeLog to UTF-8, improve mutithreads and 2522 xmlParserCleanup docs</li> 2523 <li>Portability fixes: Older Win32 platforms (Rob Richards), MSVC 2524 porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg), 2525 non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber) 2526 </li> 2527 <li>Bug fixes: various realloc problems (Ashwin), potential double-free 2528 (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob 2529 Richards), pattern fix when streaming (William Brack), various XML 2530 parsing and validation fixes based on the W3C regression tests, reader 2531 tree skipping function fix (Ashwin), Schemas regexps escaping fix 2532 (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown 2533 when encoder can't serialize characters on output</li> 2534 <li>Code cleanup: compilation fix without the reader, without the output 2535 (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups, 2536 serious cleanup of the entity handling code</li> 2537 <li>Improvement: switch parser to XML-1.0 5th edition, add parsing flags 2538 for old versions, switch URI parsing to RFC 3986, 2539 add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer), 2540 new hashing functions for dictionaries (based on Stefan Behnel work), 2541 improve handling of misplaced html/head/body in HTML parser, better 2542 regression test tools and code coverage display, better algorithms 2543 to detect various versions of the billion laughts attacks, make 2544 arbitrary parser limits avoidable as a parser option</li> 2545</ul> 2546<h3>2.6.32: Apr 8 2008</h3> 2547<ul> 2548 <li>Documentation: returning heap memory to kernel (Wolfram Sang), 2549 trying to clarify xmlCleanupParser() use, xmlXPathContext improvement 2550 (Jack Jansen), improve the *Recover* functions documentation, 2551 XmlNodeType doc link fix (Martijn Arts)</li> 2552 <li>Bug fixes: internal subset memory leak (Ashwin), avoid problem with 2553 paths starting with // (Petr Sumbera), streaming XSD validation callback 2554 patches (Ashwin), fix redirection on port other than 80 (William Brack), 2555 SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan), 2556 regexp bug with '.' (Andrew Tosh), flush the writer at the end of the 2557 document (Alfred Mickautsch), output I/O bug fix (William Brack), 2558 writer CDATA output after a text node (Alex Khesin), UTF-16 encoding 2559 detection (William Brack), fix handling of empty CDATA nodes for Safari 2560 team, python binding problem with namespace nodes, improve HTML parsing 2561 (Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily 2562 Chekalkin), XSD test crash, weird system parameter entity parsing problem, 2563 allow save to file:///X:/ windows paths, various attribute normalisation 2564 problems, externalSubsetSplit fix (Ashwin), attribute redefinition in 2565 the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many 2566 out of memory handling fixes (Ashwin), XPath out of memory handling fixes 2567 (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding 2568 conversion buffer size (Christian Fruth), problems with EatName 2569 functions on memory errors, BOM handling in external parsed entities 2570 (Mark Rowe)</li> 2571 <li>Code cleanup: fix build under VS 2008 (David Wimsey), remove useless 2572 mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo 2573 Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need 2574 a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon), 2575 cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build 2576 fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards), 2577 duplicate code removal (Ashwin), missing malloc test and error reports 2578 (Ashwin), VMS makefile fix (Tycho Hilhorst)</li> 2579 <li>improvements: better plug of schematron in the normal error handling 2580 (Tobias Minich)</li> 2581</ul> 2582 2583<h3>2.6.31: Jan 11 2008</h3> 2584<ul> 2585 <li>Security fix: missing of checks in UTF-8 parsing</li> 2586 <li>Bug fixes: regexp bug, dump attribute from XHTML document, fix 2587 xmlFree(NULL) to not crash in debug mode, Schematron parsing crash 2588 (Rob Richards), global lock free on Windows (Marc-Antoine Ruel), 2589 XSD crash due to double free (Rob Richards), indentation fix in 2590 xmlTextWriterFullEndElement (Felipe Pena), error in attribute type 2591 parsing if attribute redeclared, avoid crash in hash list scanner if 2592 deleting elements, column counter bug fix (Christian Schmidt), 2593 HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib 2594 output from xml2-config (Fred Crozat), avoid an xmllint crash 2595 (Stefan Kost), don't stop HTML parsing on out of range chars. 2596 </li> 2597 <li>Code cleanup: fix open() call third argument, regexp cut'n paste 2598 copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder), 2599 some make distcheck related fixes (John Carr)</li> 2600 <li>Improvements: HTTP Header: includes port number (William Brack), 2601 testURI --debug option, </li> 2602</ul> 2603<h3>2.6.30: Aug 23 2007</h3> 2604<ul> 2605 <li>Portability: Solaris crash on error handling, windows path fixes 2606 (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)</li> 2607 <li>Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when 2608 reusing a writer for a new document (Dodji Seketeli), Schemas 2609 xsi:nil handling patch (Frank Gross), relative URI build problem 2610 (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment 2611 detection bug, fix disparity with xmlSAXUserParseMemory, automata 2612 generation for complex regexp counts problems, Schemas IDC import 2613 problems (Frank Gross), xpath predicate evailation error handling 2614 (William Brack)</li> 2615</ul> 2616<h3>2.6.29: Jun 12 2007</h3> 2617<ul> 2618 <li>Portability: patches from Andreas Stricke for WinCEi, 2619 fix compilation warnings (William Brack), avoid warnings on Apple OS/X 2620 (Wendy Doyle and Mark Rowe), Windows compilation and threading 2621 improvements (Rob Richards), compilation against old Python versions, 2622 new GNU tar changes (Ryan Hill)</li> 2623 <li>Documentation: xmlURIUnescapeString comment, </li> 2624 <li>Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind' 2625 flag fix (Richard Jones), regexp interpretation of \, 2626 htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in 2627 typo (Bjorn Reese), entity content failure, xmlListAppend() fix 2628 (Georges-André Silber), XPath number serialization (William Brack), 2629 nanohttp gzipped stream fix (William Brack and Alex Cornejo), 2630 xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon), 2631 XPath string value of PI nodes (William Brack), XPath node set 2632 sorting bugs (William Brack), avoid outputting namespace decl 2633 dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding 2634 error handling, recustion on next in catalogs, fix a Relax-NG crash, 2635 workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes, 2636 invalid character in attribute detection bug, big comments before 2637 internal subset streaming bug, HTML parsing of attributes with : in 2638 the name, IDness of name in HTML (Dagfinn I. MannsÃ¥ker) </li> 2639 <li>Improvement: keep URI query parts in raw form (Richard Jones), 2640 embed tag support in HTML (Michael Day) </li> 2641</ul> 2642 2643<h3>2.6.28: Apr 17 2007</h3> 2644<ul> 2645 <li>Documentation: comment fixes (Markus Keim), xpath comments fixes too 2646 (James Dennett)</li> 2647 <li>Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage 2648 (Usamah Malik), various regexp bug fixes (DV and William), path conversion 2649 on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath 2650 principal node of axis bug, HTML serialization of some codepoint 2651 (Steven Rainwater), user data propagation in XInclude (Michael Day), 2652 standalone and XML decl detection (Michael Day), Python id output 2653 for some id, fix the big python string memory leak, URI parsing fixes 2654 (Stéphane Bidoul and William), long comments parsing bug (William), 2655 concurrent threads initialization (Ted Phelps), invalid char 2656 in text XInclude (William), XPath memory leak (William), tab in 2657 python problems (Andreas Hanke), XPath node comparison error 2658 (Oleg Paraschenko), cleanup patch for reader (Julien Reichel), 2659 XML Schemas attribute group (William), HTML parsing problem (William), 2660 fix char 0x2d in regexps (William), regexp quantifier range with 2661 min occurs of 0 (William), HTML script/style parsing (Mike Day)</li> 2662 <li>Improvement: make xmlTextReaderSetup() public</li> 2663 <li>Compilation and postability: fix a missing include problem (William), 2664 __ss_family on AIX again (Björn Wiberg), compilation without zlib 2665 (Michael Day), catalog patch for Win32 (Christian Ehrlicher), 2666 Windows CE fixes (Andreas Stricke)</li> 2667 <li>Various CVS to SVN infrastructure changes</li> 2668</ul> 2669<h3>2.6.27: Oct 25 2006</h3> 2670<ul> 2671 <li>Portability fixes: file names on windows (Roland Schwingel, 2672 Emelyanov Alexey), windows compile fixup (Rob Richards), 2673 AIX iconv() is apparently case sensitive</li> 2674 <li>improvements: Python XPath types mapping (Nic Ferrier), XPath optimization 2675 (Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node 2676 equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest 2677 improvememt (Kasimier), expose if library was compiled with zlib 2678 support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs 2679 (Kasimier), xmlTextConcat should work with comments and PIs (Rob 2680 Richards), export htmlNewParserCtxt needed by Michael Day, refactoring 2681 of catalog entity loaders (Michael Day), add XPointer support to 2682 python bindings (Ross Reedstrom, Brian West and Stefan Anca), 2683 try to sort out most file path to URI conversions and xmlPathToUri, 2684 add --html --memory case to xmllint</li> 2685 <li>building fix: fix --with-minimum (Felipe Contreras), VMS fix, 2686 const'ification of HTML parser structures (Matthias Clasen), 2687 portability fix (Emelyanov Alexey), wget autodetection (Peter 2688 Breitenlohner), remove the build path recorded in the python 2689 shared module, separate library flags for shared and static builds 2690 (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix 2691 --with-minimum --with-schemas builds</li> 2692 <li>bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and 2693 attribute (Kasimier), crash when using the recover mode, 2694 xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier), 2695 missing destroy in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes 2696 (Kasimier), warning on entities processing, XHTML script and style 2697 serialization (Kasimier), python generator for long types, bug in 2698 xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate 2699 allocation bug (Marton Illes), error message end of line (Rob Richards), 2700 fix attribute serialization in writer (Rob Richards), PHP4 DTD validation 2701 crash, parser safety patch (Ben Darnell), _private context propagation 2702 when parsing entities (with Michael Day), fix entities behaviour when 2703 using SAX, URI to file path fix (Mikhail Zabaluev), disappearing validity 2704 context, arg error in SAX callback (Mike Hommey), fix mixed-content 2705 autodetect when using --noblanks, fix xmlIOParseDTD error handling, 2706 fix bug in xmlSplitQName on special Names, fix Relax-NG element content 2707 validation bug, fix xmlReconciliateNs bug, fix potential attribute 2708 XML parsing bug, fix line/column accounting in XML parser, chunking bug 2709 in the HTML parser on script, try to detect obviously buggy HTML 2710 meta encoding indications, bugs with encoding BOM and xmlSaveDoc, 2711 HTML entities in attributes parsing, HTML minimized attribute values, 2712 htmlReadDoc and htmlReadIO were broken, error handling bug in 2713 xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in 2714 htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer), 2715 bug on misformed SSD regexps (Christopher Boumenot) 2716 </li> 2717 <li>documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik), 2718 fix xmlXPathCastToString documentation, improve man pages for 2719 xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few 2720 functions</li> 2721</ul> 2722<h3>2.6.26: Jun 6 2006</h3> 2723<ul> 2724 <li>portability fixes: Python detection (Joseph Sacco), compilation 2725 error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)</li> 2726 <li>bug fixes: encoding buffer problem, mix of code and data in 2727 xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik), 2728 variousXSD validation fixes (Kasimier), memory leak in pattern (Rob 2729 Richards andKasimier), attribute with colon in name (Rob Richards), XPath 2730 leak inerror reporting (Aleksey Sanin), XInclude text include of 2731 selfdocument.</li> 2732 <li>improvements: Xpath optimizations (Kasimier), XPath object 2733 cache(Kasimier)</li> 2734</ul> 2735 2736<h3>2.6.25: Jun 6 2006:</h3> 2737 2738<p>Do not use or package 2.6.25</p> 2739 2740<h3>2.6.24: Apr 28 2006</h3> 2741<ul> 2742 <li>Portability fixes: configure on Windows, testapi compile on windows 2743 (Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher), 2744 HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1 2745 cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on 2746 Windows (Roland Schwingel). 2747 </li> 2748 <li>Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier 2749 Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.</li> 2750 <li>Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext() 2751 on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming 2752 bug, xmlParseComment (with William Brack), regexp bug fixes (DV & 2753 Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier), 2754 one Relax-NG interleave bug, xmllint --path and --valid, 2755 XSD bugfixes (Kasimier), remove debug 2756 left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole), 2757 xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large 2758 number of cleanups and small fixes based on Coverity reports, bug 2759 in character ranges, Unicode tables const (Aivars Kalvans), schemas 2760 fix (Stefan Kost), xmlRelaxNGParse error deallocation, 2761 xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed 2762 code point, ixmllint --nonet to never reach the net (Gary Coady), 2763 line break in writer after end PI (Jason Viers). </li> 2764 <li>Documentation: man pages updates and cleanups (Daniel Leidert).</li> 2765 <li>New features: Relax NG structure error handlers.</li> 2766</ul> 2767 2768<h3>2.6.23: Jan 5 2006</h3> 2769<ul> 2770 <li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows 2771 (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), 2772 --with-minimum compilation fixes (William Brack), error case handling fix 2773 on Solaris (Albert Chin), don't use 'list' as parameter name reported by 2774 Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), 2775 MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick 2776 Jones),</li> 2777 <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose 2778 (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring 2779 parsing code (Bjorn Reese)</li> 2780 <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack), 2781 combinatory explosion and performances in regexp code, leak in 2782 xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo 2783 Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), 2784 XPath pattern based evaluation bugs (DV & Kasimier), 2785 xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in 2786 xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of 2787 vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF 2788 split problem (William), issues with non-namespaced attributes in 2789 xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), 2790 HTML parsing of script, Python must not output to stdout (Nic Ferrier), 2791 exclusive C14N namespace visibility (Aleksey Sanin), XSD datatype 2792 totalDigits bug (Kasimier Buchcik), error handling when writing to an 2793 xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi 2794 Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix 2795 XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), 2796 fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml 2797 (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of 2798 runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs 2799 (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), 2800 compilation and build fixes (Michael Day), removed dependencies on 2801 xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath 2802 pattern based evaluation fixes (Kasimier)</li> 2803 <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier 2804 Buchcik), node copy checks and fix for attribute (Rob Richards), counted 2805 transition bug in regexps, ctxt->standalone = -2 to indicate no 2806 standalone attribute was found, add xmlSchemaSetParserStructuredErrors() 2807 (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API 2808 (Kasimier), handle gzipped HTTP resources (Gary Coady), add 2809 htmlDocDumpMemoryFormat. (Rob Richards),</li> 2810 <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save 2811 function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),</li> 2812</ul> 2813 2814<h3>2.6.22: Sep 12 2005</h3> 2815<ul> 2816 <li>build fixes: compile without schematron (Stéphane Bidoul)</li> 2817 <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, 2818 CDATA push parser bug, xmlElemDump problem with XHTML1 doc, 2819 XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some 2820 output formatting for meta element (Rob Richards), script and style 2821 XHTML1 serialization (David Madore), Attribute derivation fixups in XSD 2822 (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li> 2823 <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add 2824 XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for 2825 derive (Kasimier Buchcik).</li> 2826 <li>documentation: generation of gtk-doc like docs, integration with 2827 devhelp.</li> 2828</ul> 2829 2830<h3>2.6.21: Sep 4 2005</h3> 2831<ul> 2832 <li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling 2833 convention problems on Windows (Marcus Boerger), cleanups based on Linus' 2834 sparse tool, update of win32/configure.js (Rob Richards), remove warnings 2835 on Windows(Marcus Boerger), compilation without SAX1, detection of the 2836 Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), 2837 compilation/link with threads and old gcc, compile problem by C370 on 2838 Z/OS,</li> 2839 <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 2840 bug (Jiri Netolicky), XPath NaN compare bug (William Brack), 2841 htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 2842 Schemas comparisons NIST passes, automata build error xsd:all, 2843 xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas 2844 foreign namespaces handling, XML Schemas facet comparison (Kupriyanov 2845 Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: 2846 namespace ahndling in Schemas (Kasimier), empty model group in Schemas 2847 (Kasimier), wildcard in Schemas (Kasimier), URI composition (William), 2848 xs:anyType in Schemas (Kasimier), Python resolver emitting error 2849 messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to 2850 fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob 2851 Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 2852 serialization, streaming XPath, Schemas determinism detection problem, 2853 XInclude bug, Schemas context type (Dean Hill), validation fix (Derek 2854 Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas 2855 type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, 2856 xmlGetLineNo fixes, bug on entities handling, entity name extraction in 2857 error handling with XInclude, text nodes in HTML body tags (Gary Coady), 2858 xml:id and IDness at the treee level fixes, XPath streaming patterns 2859 bugs.</li> 2860 <li>improvements: structured interfaces for schemas and RNG error reports 2861 (Marcus Boerger), optimization of the char data inner loop parsing 2862 (thanks to Behdad Esfahbod for the idea), schematron validation though 2863 not finished yet, xmlSaveOption to omit XML declaration, keyref match 2864 error reports (Kasimier), formal expression handling code not plugged 2865 yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option 2866 for text nodes allocation.</li> 2867 <li>documentation: xmllint man page had --nonet duplicated</li> 2868</ul> 2869 2870<h3>2.6.20: Jul 10 2005</h3> 2871<ul> 2872 <li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor 2873 Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and 2874 andriy@google.com), use gcc weak references to pthread to avoid the 2875 pthread dependency on Linux, compilation problem (Steve Nairn), compiling 2876 of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), 2877 compilation when disabling parts of the library, standalone test 2878 distribution.</li> 2879 <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack), 2880 HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer 2881 overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup 2882 (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch 2883 (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup 2884 on XInclude (William), pattern fixes (William), attribute bug in 2885 exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob 2886 Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type 2887 QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug 2888 (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob 2889 Richards), a small RelaxNG leak, HTML parsing in push mode bug (James 2890 Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, 2891 areBlanks() heuristic failure, duplicate attributes in DTD bug 2892 (William).</li> 2893 <li>improvements: lot of work on Schemas by Kasimier Buchcik both on 2894 conformance and streaming, Schemas validation messages (Kasimier Buchcik, 2895 Matthew Burgess), namespace removal at the python level (Brent 2896 Hendricks), Update to new Schemas regression tests from W3C/Nist 2897 (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of 2898 xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), 2899 standalone test framework and programs, new DOM import APIs 2900 xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and 2901 xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and 2902 Schemas regression tests, xmlStopParser() available in pull mode too, 2903 ienhancement to xmllint --shell namespaces support, Windows port of the 2904 standalone testing tools (Kasimier and William), 2905 xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX 2906 Schemas APIs, Schemas xmlReader support.</li> 2907</ul> 2908 2909<h3>2.6.19: Apr 02 2005</h3> 2910<ul> 2911 <li>build fixes: drop .la from RPMs, --with-minimum build fix (William 2912 Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX 2913 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on 2914 Linux/ELF/gcc4</li> 2915 <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return 2916 code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY 2917 Fabrice), workaround "DAV:" namespace brokenness in c14n (Aleksey Sanin), 2918 segfault in Schemas (Kasimier Buchcik), Schemas attribute validation 2919 (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), 2920 HTML serialization of name attribute on a elements, Python error handlers 2921 leaks and improvement (Brent Hendricks), uninitialized variable in 2922 encoding code, Relax-NG validation bug, potential crash if 2923 gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, 2924 switched back to assuming UTF-8 in case no encoding is given at 2925 serialization time</li> 2926 <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets 2927 checking and also mixed handling.</li> 2928 <li></li> 2929</ul> 2930 2931<h3>2.6.18: Mar 13 2005</h3> 2932<ul> 2933 <li>build fixes: warnings (Peter Breitenlohner), testapi.c generation, 2934 Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), 2935 some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> 2936 <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and 2937 xmlreader stopping on non-fatal errors, thread support for dictionaries 2938 reference counting (Gary Coady), internal subset and push problem, URL 2939 saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths 2940 fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix 2941 (Mike Hommey), warning should not count as error (William Brack), 2942 xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup 2943 FTP and HTTP code to reuse the uri parsing and IPv6 (William), 2944 xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being 2945 empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows 2946 (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent 2947 Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug 2948 (Rob Richards), Schemas decimal type fixes (William Brack), 2949 xmlByteConsumed static buffer (Ben Maurer).</li> 2950 <li>improvement: speedup parsing comments and DTDs, dictionary support for 2951 hash tables, Schemas Identity constraints (Kasimier), streaming XPath 2952 subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical 2953 values handling (Kasimier), add xmlTextReaderByteConsumed (Aron 2954 Stansvik),</li> 2955 <li>Documentation: Wiki support (Joel Reed)</li> 2956</ul> 2957 2958<h3>2.6.17: Jan 16 2005</h3> 2959<ul> 2960 <li>build fixes: Windows, warnings removal (William Brack), 2961 maintainer-clean dependency(William), build in a different directory 2962 (William), fixing --with-minimum configure build (William), BeOS build 2963 (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan 2964 McNichol)</li> 2965 <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() 2966 to use the catalog(s), loop on output (William Brack), XPath memory leak, 2967 ID deallocation problem (Steve Shepard), debugDumpNode crash (William), 2968 warning not using error callback (William), xmlStopParser bug (William), 2969 UTF-16 with BOM on DTDs (William), namespace bug on empty elements in 2970 push mode (Rob Richards), line and col computations fixups (Aleksey 2971 Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), 2972 patterns with too many steps, bug in RNG choice optimization, line number 2973 sometimes missing.</li> 2974 <li>improvements: XSD Schemas (Kasimier Buchcik), python generator 2975 (William), xmlUTF8Strpos speedup (William), unicode Python strings 2976 (William), XSD error reports (Kasimier Buchcik), Python __str__ call 2977 serialize().</li> 2978 <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for 2979 the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel 2980 Reed), error extraction API from regexps, new XMLSave option for format 2981 (Phil Shafer)</li> 2982 <li>documentation: site improvement (John Fleck), FAQ entries 2983 (William).</li> 2984</ul> 2985 2986<h3>2.6.16: Nov 10 2004</h3> 2987<ul> 2988 <li>general hardening and bug fixing crossing all the API based on new 2989 automated regression testing</li> 2990 <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li> 2991 <li>bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding 2992 conversion functions return values, UTF-8 bug affecting XPath reported by 2993 Markus Bertheau, catalog problem with NULL entries (William Brack)</li> 2994 <li>documentation: fix to xmllint man page, some API function description 2995 were updated.</li> 2996 <li>improvements: DTD validation APIs provided at the Python level (Brent 2997 Hendricks)</li> 2998</ul> 2999 3000<h3>2.6.15: Oct 27 2004</h3> 3001<ul> 3002 <li>security fixes on the nanoftp and nanohttp modules</li> 3003 <li>build fixes: xmllint detection bug in configure, building outside the 3004 source tree (Thomas Fitzsimmons)</li> 3005 <li>bug fixes: HTML parser on broken ASCII chars in names (William), Python 3006 paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William), 3007 saving to python file objects (Malcolm Tredinnick), DTD lookup fix 3008 (Malcolm), save back <group> in catalogs (William), tree build 3009 fixes (DV and Rob Richards), Schemas memory bug, structured error handler 3010 on Python 64bits, thread local memory deallocation, memory leak reported 3011 by Volker Roth, xmlValidateDtd in the presence of an internal subset, 3012 entities and _private problem (William), xmlBuildRelativeURI error 3013 (William).</li> 3014 <li>improvements: better XInclude error reports (William), tree debugging 3015 module and tests, convenience functions at the Reader API (Graham 3016 Bennett), add support for PI in the HTML parser.</li> 3017</ul> 3018 3019<h3>2.6.14: Sep 29 2004</h3> 3020<ul> 3021 <li>build fixes: configure paths for xmllint and xsltproc, compilation 3022 without HTML parser, compilation warning cleanups (William Brack & 3023 Malcolm Tredinnick), VMS makefile update (Craig Berry),</li> 3024 <li>bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier 3025 Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x 3026 transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes 3027 (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc), 3028 handling of failed realloc(), out of bound array addressing in Schemas 3029 date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS 3030 E20 validation fix (Malcolm),</li> 3031 <li>improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add 3032 xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy 3033 (Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm 3034 Tredinnick), Schemas support for xsi:schemaLocation, 3035 xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)</li> 3036</ul> 3037 3038<h3>2.6.13: Aug 31 2004</h3> 3039<ul> 3040 <li>build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc, 3041 Solaris compiler warning, fixing RPM BuildRequires,</li> 3042 <li>fixes: DTD loading on Windows (Igor), Schemas error reports APIs 3043 (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack 3044 and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace 3045 problem (William), Schemas hexbinary empty values, encoding error could 3046 generate a serialization loop.</li> 3047 <li>Improvements: Schemas validity improvements (Kasimier), added --path 3048 and --load-trace options to xmllint</li> 3049 <li>documentation: tutorial update (John Fleck)</li> 3050</ul> 3051 3052<h3>2.6.12: Aug 22 2004</h3> 3053<ul> 3054 <li>build fixes: fix --with-minimum, elfgcchack.h fixes (Peter 3055 Breitenlohner), perl path lookup (William), diff on Solaris (Albert 3056 Chin), some 64bits cleanups.</li> 3057 <li>Python: avoid a warning with 2.3 (William Brack), tab and space mixes 3058 (William), wrapper generator fixes (William), Cygwin support (Gerrit P. 3059 Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support 3060 (Torkel Lyng)</li> 3061 <li>Schemas: a lot of bug fixes and improvements from Kasimier Buchcik</li> 3062 <li>fixes: RVT fixes (William), XPath context resets bug (William), memory 3063 debug (Steve Hay), catalog white space handling (Peter Breitenlohner), 3064 xmlReader state after attribute reading (William), structured error 3065 handler (William), XInclude generated xml:base fixup (William), Windows 3066 memory reallocation problem (Steve Hay), Out of Memory conditions 3067 handling (William and Olivier Andrieu), htmlNewDoc() charset bug, 3068 htmlReadMemory init (William), a posteriori validation DTD base 3069 (William), notations serialization missing, xmlGetNodePath (Dodji), 3070 xmlCheckUTF8 (Diego Tartara), missing line numbers on entity 3071 (William)</li> 3072 <li>improvements: DocBook catalog build scrip (William), xmlcatalog tool 3073 (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey), 3074 xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude 3075 to not generate start/end nodes, extend xmllint --version to include CVS 3076 tag (William)</li> 3077 <li>documentation: web pages fixes, validity API docs fixes (William) 3078 schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)</li> 3079</ul> 3080 3081<h3>2.6.11: July 5 2004</h3> 3082<ul> 3083 <li>Schemas: a lot of changes and improvements by Kasimier Buchcik for 3084 attributes, namespaces and simple types.</li> 3085 <li>build fixes: --with-minimum (William Brack), some gcc cleanup 3086 (William), --with-thread-alloc (William)</li> 3087 <li>portability: Windows binary package change (Igor Zlatkovic), Catalog 3088 path on Windows</li> 3089 <li>documentation: update to the tutorial (John Fleck), xmllint return code 3090 (John Fleck), man pages (Ville Skytta),</li> 3091 <li>bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX 3092 properly initialize the library (William), empty node set in XPath 3093 (William), xmlSchemas errors (William), invalid charref problem pointed 3094 by Morus Walter, XInclude xml:base generation (William), Relax-NG bug 3095 with div processing (William), XPointer and xml:base problem(William), 3096 Reader and entities, xmllint return code for schemas (William), reader 3097 streaming problem (Steve Ball), DTD serialization problem (William), 3098 libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on 3099 Python classes, xmlReader buffer bug, Python bindings memory interfaces 3100 improvement (with Stéphane Bidoul), Fixed the push parser to be back to 3101 synchronous behaviour.</li> 3102 <li>improvement: custom per-thread I/O enhancement (Rob Richards), register 3103 namespace in debug shell (Stefano Debenedetti), Python based regression 3104 test for non-Unix users (William), dynamically increase the number of 3105 XPath extension functions in Python and fix a memory leak (Marc-Antoine 3106 Parent and William)</li> 3107 <li>performance: hack done with Arjan van de Ven to reduce ELF footprint 3108 and generated code on Linux, plus use gcc runtime profiling to optimize 3109 the code generated in the RPM packages.</li> 3110</ul> 3111 3112<h3>2.6.10: May 17 2004</h3> 3113<ul> 3114 <li>Web page generated for ChangeLog</li> 3115 <li>build fixes: --without-html problems, make check without make all</li> 3116 <li>portability: problem with xpath.c on Windows (MSC and Borland), memcmp 3117 vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not 3118 use "list" as parameter name, make tests work with Python 1.5 (Ed 3119 Davis),</li> 3120 <li>improvements: made xmlTextReaderMode public, small buffers resizing 3121 (Morten Welinder), add --maxmem option to xmllint, add 3122 xmlPopInputCallback() for Matt Sergeant, refactoring of serialization 3123 escaping, added escaping customization</li> 3124 <li>bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William 3125 Brack), xmlReader end of stream problem, node deregistration with reader, 3126 URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp 3127 transition reduction (William), various XSD Schemas fixes (Kasimier 3128 Buchcik), XInclude fallback problem (William), weird problems with DTD 3129 (William), structured error handler callback context (William), reverse 3130 xmlEncodeSpecialChars() behaviour back to escaping '"'</li> 3131</ul> 3132 3133<h3>2.6.9: Apr 18 2004</h3> 3134<ul> 3135 <li>implement xml:id Working Draft, relaxed XPath id() checking</li> 3136 <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave 3137 Beckett), Relax-NG compilation (William Brack), Regexp patches (with 3138 William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with 3139 William), Relax-NG name classes compares (William), XInclude duplicate 3140 fallback (William), external DTD encoding detection (William), a DTD 3141 validation bug (William), xmlReader Close() fix, recursive extension 3142 schemas</li> 3143 <li>improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting 3144 save optimization, better handle IIS broken HTTP redirect behaviour (Ian 3145 Hummel), HTML parser frameset (James Bursa), libxml2-python RPM 3146 dependency, XML Schemas union support (Kasimier Buchcik), warning removal 3147 clanup (William), keep ChangeLog compressed when installing from RPMs</li> 3148 <li>documentation: examples and xmlDocDumpMemory docs (John Fleck), new 3149 example (load, xpath, modify, save), xmlCatalogDump() comments,</li> 3150 <li>Windows: Borland C++ builder (Eric Zurcher), work around Microsoft 3151 compiler NaN handling bug (Mark Vakoc)</li> 3152</ul> 3153 3154<h3>2.6.8: Mar 23 2004</h3> 3155<ul> 3156 <li>First step of the cleanup of the serialization code and APIs</li> 3157 <li>XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam 3158 Dickmeiss), anyURI for "" (John Belmonte)</li> 3159 <li>Python: Canonicalization C14N support added (Anthony Carrico)</li> 3160 <li>xmlDocCopyNode() extension (William)</li> 3161 <li>Relax-NG: fix when processing XInclude results (William), external 3162 reference in interleave (William), missing error on <choice> 3163 failure (William), memory leak in schemas datatype facets.</li> 3164 <li>xmlWriter: patch for better DTD support (Alfred Mickautsch)</li> 3165 <li>bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William 3166 Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to 3167 URI on SYSTEM lookup failure, XInclude parse flags inheritance (William), 3168 XInclude and XPointer fixes for entities (William), XML parser bug 3169 reported by Holger Rauch, nanohttp fd leak (William), regexps char 3170 groups '-' handling (William), dictionary reference counting problems, 3171 do not close stderr.</li> 3172 <li>performance patches from Petr Pajas</li> 3173 <li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li> 3174 <li>compilation and portability fixes: --without-valid, catalog cleanups 3175 (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation 3176 to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino 3177 Vidal), Windows build (Eric Zurcher)</li> 3178</ul> 3179 3180<h3>2.6.7: Feb 23 2004</h3> 3181<ul> 3182 <li>documentation: tutorial updates (John Fleck), benchmark results</li> 3183 <li>xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)</li> 3184 <li>XPath optimization (Petr Pajas)</li> 3185 <li>DTD ID handling optimization</li> 3186 <li>bugfixes: xpath number with > 19 fractional (William Brack), push 3187 mode with unescaped '>' characters, fix xmllint --stream --timing, fix 3188 xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent 3189 handling NULL, trying to fix Relax-NG/Perl interface.</li> 3190 <li>python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)</li> 3191 <li>Added relaxng option to xmllint --shell</li> 3192</ul> 3193 3194<h3>2.6.6: Feb 12 2004</h3> 3195<ul> 3196 <li>nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and 3197 William) reported by Yuuichi Teranishi</li> 3198 <li>bugfixes: make test and path issues, xmlWriter attribute serialization 3199 (William Brack), xmlWriter indentation (William), schemas validation 3200 (Eric Haszlakiewicz), XInclude dictionaries issues (William and Oleg 3201 Paraschenko), XInclude empty fallback (William), HTML warnings (William), 3202 XPointer in XInclude (William), Python namespace serialization, 3203 isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter 3204 entities in internal subset (William), internal subset bug in push mode, 3205 <xs:all> fix (Alexey Sarytchev)</li> 3206 <li>Build: fix for automake-1.8 (Alexander Winston), warnings removal 3207 (Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix 3208 --with-minimum configuration.</li> 3209 <li>XInclude: allow the 2001 namespace without warning.</li> 3210 <li>Documentation: missing example/index.html (John Fleck), version 3211 dependencies (John Fleck)</li> 3212 <li>reader API: structured error reporting (Steve Ball)</li> 3213 <li>Windows compilation: mingw, msys (Mikhail Grushinskiy), function 3214 prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_ 3215 patch</li> 3216 <li>Parsers: added xmlByteConsumed(ctxt) API to get the byte offset in 3217 input.</li> 3218</ul> 3219 3220<h3>2.6.5: Jan 25 2004</h3> 3221<ul> 3222 <li>Bugfixes: dictionaries for schemas (William Brack), regexp segfault 3223 (William), xs:all problem (William), a number of XPointer bugfixes 3224 (William), xmllint error go to stderr, DTD validation problem with 3225 namespace, memory leak (William), SAX1 cleanup and minimal options fixes 3226 (Mark Vadoc), parser context reset on error (Shaun McCance), XPath union 3227 evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin), 3228 XML Schemas double free (Steve Ball), XInclude with no href, argument 3229 callbacks order for XPath callbacks (Frederic Peters)</li> 3230 <li>Documentation: python scripts (William Brack), xslt stylesheets (John 3231 Fleck), doc (Sven Zimmerman), I/O example.</li> 3232 <li>Python bindings: fixes (William), enum support (Stéphane Bidoul), 3233 structured error reporting (Stéphane Bidoul)</li> 3234 <li>XInclude: various fixes for conformance, problem related to dictionary 3235 references (William & me), recursion (William)</li> 3236 <li>xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred 3237 Mickautsch),</li> 3238 <li>xmlSchemas: normalizedString datatype (John Belmonte)</li> 3239 <li>code cleanup for strings functions (William)</li> 3240 <li>Windows: compiler patches (Mark Vakoc)</li> 3241 <li>Parser optimizations, a few new XPath and dictionary APIs for future 3242 XSLT optimizations.</li> 3243</ul> 3244 3245<h3>2.6.4: Dec 24 2003</h3> 3246<ul> 3247 <li>Windows build fixes (Igor Zlatkovic)</li> 3248 <li>Some serious XInclude problems reported by Oleg Paraschenko and</li> 3249 <li>Unix and Makefile packaging fixes (me, William Brack,</li> 3250 <li>Documentation improvements (John Fleck, William Brack), example fix 3251 (Lucas Brasilino)</li> 3252 <li>bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of 3253 NULL strings (William Brack) , API building reader or parser from 3254 filedescriptor should not close it, changed XPath sorting to be stable 3255 again (William Brack), xmlGetNodePath() generating '(null)' (William 3256 Brack), DTD validation and namespace bug (William Brack), XML Schemas 3257 double inclusion behaviour</li> 3258</ul> 3259 3260<h3>2.6.3: Dec 10 2003</h3> 3261<ul> 3262 <li>documentation updates and cleanup (DV, William Brack, John Fleck)</li> 3263 <li>added a repository of examples, examples from Aleksey Sanin, Dodji 3264 Seketeli, Alfred Mickautsch</li> 3265 <li>Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw 3266 (Kenneth Haley)</li> 3267 <li>Unicode range checking (William Brack)</li> 3268 <li>code cleanup (William Brack)</li> 3269 <li>Python bindings: doc (John Fleck), bug fixes</li> 3270 <li>UTF-16 cleanup and BOM issues (William Brack)</li> 3271 <li>bug fixes: ID and xmlReader validation, XPath (William Brack), 3272 xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser 3273 (James Bursa), attribute defaulting and validation, some serialization 3274 cleanups, XML_GET_LINE macro, memory debug when using threads (William 3275 Brack), serialization of attributes and entities content, xmlWriter 3276 (Daniel Schulman)</li> 3277 <li>XInclude bugfix, new APIs and update to the last version including the 3278 namespace change.</li> 3279 <li>XML Schemas improvements: include (Robert Stepanek), import and 3280 namespace handling, fixed the regression tests troubles, added examples 3281 based on Eric van der Vlist book, regexp fixes</li> 3282 <li>preliminary pattern support for streaming (needed for schemas 3283 constraints), added xmlTextReaderPreservePattern() to collect subdocument 3284 when streaming.</li> 3285 <li>various fixes in the structured error handling</li> 3286</ul> 3287 3288<h3>2.6.2: Nov 4 2003</h3> 3289<ul> 3290 <li>XPath context unregistration fixes</li> 3291 <li>text node coalescing fixes (Mark Lilback)</li> 3292 <li>API to screate a W3C Schemas from an existing document (Steve Ball)</li> 3293 <li>BeOS patches (Marcin 'Shard' Konicki)</li> 3294 <li>xmlStrVPrintf function added (Aleksey Sanin)</li> 3295 <li>compilation fixes (Mark Vakoc)</li> 3296 <li>stdin parsing fix (William Brack)</li> 3297 <li>a posteriori DTD validation fixes</li> 3298 <li>xmlReader bug fixes: Walker fixes, python bindings</li> 3299 <li>fixed xmlStopParser() to really stop the parser and errors</li> 3300 <li>always generate line numbers when using the new xmlReadxxx 3301 functions</li> 3302 <li>added XInclude support to the xmlReader interface</li> 3303 <li>implemented XML_PARSE_NONET parser option</li> 3304 <li>DocBook XSLT processing bug fixed</li> 3305 <li>HTML serialization for <p> elements (William Brack and me)</li> 3306 <li>XPointer failure in XInclude are now handled as resource errors</li> 3307 <li>fixed xmllint --html to use the HTML serializer on output (added 3308 --xmlout to implement the previous behaviour of saving it using the XML 3309 serializer)</li> 3310</ul> 3311 3312<h3>2.6.1: Oct 28 2003</h3> 3313<ul> 3314 <li>Mostly bugfixes after the big 2.6.0 changes</li> 3315 <li>Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup 3316 (William Brack)</li> 3317 <li>Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor 3318 Zlatkovic)</li> 3319 <li>xmlWriter bugfix (Alfred Mickautsch)</li> 3320 <li>chvalid.[ch]: couple of fixes from Stephane Bidoul</li> 3321 <li>context reset: error state reset, push parser reset (Graham 3322 Bennett)</li> 3323 <li>context reuse: generate errors if file is not readable</li> 3324 <li>defaulted attributes for element coming from internal entities 3325 (Stephane Bidoul)</li> 3326 <li>Python: tab and spaces mix (William Brack)</li> 3327 <li>Error handler could crash in DTD validation in 2.6.0</li> 3328 <li>xmlReader: do not use the document or element _private field</li> 3329 <li>testSAX.c: avoid a problem with some PIs (Massimo Morara)</li> 3330 <li>general bug fixes: mandatory encoding in text decl, serializing 3331 Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik), 3332 XPath errors not reported, slow HTML parsing of large documents.</li> 3333</ul> 3334 3335<h3>2.6.0: Oct 20 2003</h3> 3336<ul> 3337 <li>Major revision release: should be API and ABI compatible but got a lot 3338 of change</li> 3339 <li>Increased the library modularity, far more options can be stripped out, 3340 a --with-minimum configuration will weight around 160KBytes</li> 3341 <li>Use per parser and per document dictionary, allocate names and small 3342 text nodes from the dictionary</li> 3343 <li>Switch to a SAX2 like parser rewrote most of the XML parser core, 3344 provides namespace resolution and defaulted attributes, minimize memory 3345 allocations and copies, namespace checking and specific error handling, 3346 immutable buffers, make predefined entities static structures, etc...</li> 3347 <li>rewrote all the error handling in the library, all errors can be 3348 intercepted at a structured level, with precise information 3349 available.</li> 3350 <li>New simpler and more generic XML and HTML parser APIs, allowing to 3351 easily modify the parsing options and reuse parser context for multiple 3352 consecutive documents.</li> 3353 <li>Similar new APIs for the xmlReader, for options and reuse, provided new 3354 functions to access content as const strings, use them for Python 3355 bindings</li> 3356 <li>a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin), 3357 Walker i.e. reader on a document tree based on Alfred Mickautsch code, 3358 make room in nodes for line numbers, reference counting and future PSVI 3359 extensions, generation of character ranges to be checked with faster 3360 algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer 3361 access</li> 3362 <li>New xmlWriter API provided by Alfred Mickautsch</li> 3363 <li>Schemas: base64 support by Anthony Carrico</li> 3364 <li>Parser<->HTTP integration fix, proper processing of the Mime-Type 3365 and charset information if available.</li> 3366 <li>Relax-NG: bug fixes including the one reported by Martijn Faassen and 3367 zeroOrMore, better error reporting.</li> 3368 <li>Python bindings (Stéphane Bidoul), never use stdout for errors 3369 output</li> 3370 <li>Portability: all the headers have macros for export and calling 3371 convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry), 3372 Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor), 3373 Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul), 3374 warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin 3375 'Shard' Konicki)</li> 3376 <li>Documentation fixes and README (William Brack), search fix (William), 3377 tutorial updates (John Fleck), namespace docs (Stefan Kost)</li> 3378 <li>Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized 3379 mutexes, HTML doctype lowercase, SAX/IO (William), compression detection 3380 and restore (William), attribute declaration in DTDs (William), namespace 3381 on attribute in HTML output (William), input filename (Rob Richards), 3382 namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks 3383 (Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter 3384 Derr), high codepoint charref like &#x10FFFF;, buffer access in push 3385 mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug 3386 (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP 3387 error handling.</li> 3388 <li>xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat 3389 testing, --nodict for building without tree dictionary, --nocdata to 3390 replace CDATA by text, --nsclean to remove surperfluous namespace 3391 declarations</li> 3392 <li>added xml2-config --libtool-libs option from Kevin P. Fleming</li> 3393 <li>a lot of profiling and tuning of the code, speedup patch for 3394 xmlSearchNs() by Luca Padovani. The xmlReader should do far less 3395 allocation and it speed should get closer to SAX. Chris Anderson worked 3396 on speeding and cleaning up repetitive checking code.</li> 3397 <li>cleanup of "make tests"</li> 3398 <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li> 3399 <li>deactivated the broken docBook SGML parser code and plugged the XML 3400 parser instead.</li> 3401</ul> 3402 3403<h3>2.5.11: Sep 9 2003</h3> 3404 3405<p>A bugfix only release:</p> 3406<ul> 3407 <li>risk of crash in Relax-NG</li> 3408 <li>risk of crash when using multithreaded programs</li> 3409</ul> 3410 3411<h3>2.5.10: Aug 15 2003</h3> 3412 3413<p>A bugfixes only release</p> 3414<ul> 3415 <li>Windows Makefiles (William Brack)</li> 3416 <li>UTF-16 support fixes (Mark Itzcovitz)</li> 3417 <li>Makefile and portability (William Brack) automake, Linux alpha, Mingw 3418 on Windows (Mikhail Grushinskiy)</li> 3419 <li>HTML parser (Oliver Stoeneberg)</li> 3420 <li>XInclude performance problem reported by Kevin Ruscoe</li> 3421 <li>XML parser performance problem reported by Grant Goodale</li> 3422 <li>xmlSAXParseDTD() bug fix from Malcolm Tredinnick</li> 3423 <li>and a couple other cleanup</li> 3424</ul> 3425 3426<h3>2.5.9: Aug 9 2003</h3> 3427<ul> 3428 <li>bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build 3429 (Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading 3430 (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli), 3431 xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean 3432 Griffin), HTML parsing problem (William Brack), DTD validation for mixed 3433 content + namespaces, HTML serialization, library initialization, 3434 progressive HTML parser</li> 3435 <li>better interfaces for Relax-NG error handling (Joachim Bauch, )</li> 3436 <li>adding xmlXIncludeProcessTree() for XInclud'ing in a subtree</li> 3437 <li>doc fixes and improvements (John Fleck)</li> 3438 <li>configure flag for -with-fexceptions when embedding in C++</li> 3439 <li>couple of new UTF-8 helper functions (William Brack)</li> 3440 <li>general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)</li> 3441 <li>xmlTextReader cleanup + enum for node types (Bjorn Reese)</li> 3442 <li>general compilation/warning cleanup Solaris/HP-UX/... (William 3443 Brack)</li> 3444</ul> 3445 3446<h3>2.5.8: Jul 6 2003</h3> 3447<ul> 3448 <li>bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark 3449 Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack), 3450 PI related memleak, compilation without schemas or without xpath (Joerg 3451 Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs, 3452 rpm problem on , i86_64, removed a few compilation problems from 2.5.7, 3453 xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)</li> 3454 <li>portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)</li> 3455 <li>William Brack fixed multithreading lock problems</li> 3456 <li>IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)</li> 3457 <li>Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane 3458 Bidoul)</li> 3459 <li>A few W3C Schemas Structure improvements</li> 3460 <li>W3C Schemas Datatype improvements (Charlie Bozeman)</li> 3461 <li>Python bindings for thread globals (Stéphane Bidoul), and method/class 3462 generator</li> 3463 <li>added --nonet option to xmllint</li> 3464 <li>documentation improvements (John Fleck)</li> 3465</ul> 3466 3467<h3>2.5.7: Apr 25 2003</h3> 3468<ul> 3469 <li>Relax-NG: Compiling to regexp and streaming validation on top of the 3470 xmlReader interface, added to xmllint --stream</li> 3471 <li>xmlReader: Expand(), Next() and DOM access glue, bug fixes</li> 3472 <li>Support for large files: RGN validated a 4.5GB instance</li> 3473 <li>Thread support is now configured in by default</li> 3474 <li>Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes 3475 (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser 3476 and zero bytes handling, some missing Windows file path conversions, 3477 behaviour of the parser and validator in the presence of "out of memory" 3478 error conditions</li> 3479 <li>extended the API to be able to plug a garbage collecting memory 3480 allocator, added xmlMallocAtomic() and modified the allocations 3481 accordingly.</li> 3482 <li>Performances: removed excessive malloc() calls, speedup of the push and 3483 xmlReader interfaces, removed excessive thread locking</li> 3484 <li>Documentation: man page (John Fleck), xmlReader documentation</li> 3485 <li>Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)</li> 3486</ul> 3487 3488<h3>2.5.6: Apr 1 2003</h3> 3489<ul> 3490 <li>Fixed W3C XML Schemas datatype, should be compliant now except for 3491 binHex and base64 which are not supported yet.</li> 3492 <li>bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and 3493 XInclude entities handling, encoding detection on external subsets, XML 3494 Schemas bugs and memory leaks, HTML parser (James Bursa)</li> 3495 <li>portability: python/trio (Albert Chin), Sun compiler warnings</li> 3496 <li>documentation: added --relaxng option to xmllint man page (John)</li> 3497 <li>improved error reporting: xml:space, start/end tag mismatches, Relax NG 3498 errors</li> 3499</ul> 3500 3501<h3>2.5.5: Mar 24 2003</h3> 3502<ul> 3503 <li>Lot of fixes on the Relax NG implementation. More testing including 3504 DocBook and TEI examples.</li> 3505 <li>Increased the support for W3C XML Schemas datatype</li> 3506 <li>Several bug fixes in the URI handling layer</li> 3507 <li>Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding 3508 conversion, line counting in the parser.</li> 3509 <li>Added support for $XMLLINT_INDENT environment variable, FTP delete</li> 3510 <li>Fixed the RPM spec file name</li> 3511</ul> 3512 3513<h3>2.5.4: Feb 20 2003</h3> 3514<ul> 3515 <li>Conformance testing and lot of fixes on Relax NG and XInclude 3516 implementation</li> 3517 <li>Implementation of XPointer element() scheme</li> 3518 <li>Bug fixes: XML parser, XInclude entities merge, validity checking on 3519 namespaces, 3520 <p>2 serialization bugs, node info generation problems, a DTD regexp 3521 generation problem.</p> 3522 </li> 3523 <li>Portability: windows updates and path canonicalization (Igor)</li> 3524 <li>A few typo fixes (Kjartan Maraas)</li> 3525 <li>Python bindings generator fixes (Stephane Bidoul)</li> 3526</ul> 3527 3528<h3>2.5.3: Feb 10 2003</h3> 3529<ul> 3530 <li>RelaxNG and XML Schemas datatypes improvements, and added a first 3531 version of RelaxNG Python bindings</li> 3532 <li>Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for 3533 serializing namespace nodes, encoding conversion bug, XHTML1 3534 serialization</li> 3535 <li>Portability fixes: Windows (Igor), AMD 64bits RPM spec file</li> 3536</ul> 3537 3538<h3>2.5.2: Feb 5 2003</h3> 3539<ul> 3540 <li>First implementation of RelaxNG, added --relaxng flag to xmllint</li> 3541 <li>Schemas support now compiled in by default.</li> 3542 <li>Bug fixes: DTD validation, namespace checking, XInclude and entities, 3543 delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul), 3544 XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory 3545 consumption, HTML parser, HTML serialization in the presence of 3546 namespaces</li> 3547 <li>added an HTML API to check elements and attributes.</li> 3548 <li>Documentation improvement, PDF for the tutorial (John Fleck), doc 3549 patches (Stefan Kost)</li> 3550 <li>Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)</li> 3551 <li>Added python bindings for XPointer, contextual error reporting 3552 (Stéphane Bidoul)</li> 3553 <li>URI/file escaping problems (Stefano Zacchiroli)</li> 3554</ul> 3555 3556<h3>2.5.1: Jan 8 2003</h3> 3557<ul> 3558 <li>Fixes a memory leak and configuration/compilation problems in 2.5.0</li> 3559 <li>documentation updates (John)</li> 3560 <li>a couple of XmlTextReader fixes</li> 3561</ul> 3562 3563<h3>2.5.0: Jan 6 2003</h3> 3564<ul> 3565 <li>New <a href="xmlreader.html">XmltextReader interface</a> based on C# 3566 API (with help of Stéphane Bidoul)</li> 3567 <li>Windows: more exports, including the new API (Igor)</li> 3568 <li>XInclude fallback fix</li> 3569 <li>Python: bindings for the new API, packaging (Stéphane Bidoul), 3570 drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup 3571 and iterators for Python-2.2 (Hannu Krosing)</li> 3572 <li>Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update 3573 (John)</li> 3574 <li>Fix an XML parser bug raised by Vyacheslav Pindyura</li> 3575 <li>Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)</li> 3576 <li>Entities handling fixes</li> 3577 <li>new API to optionally track node creation and deletion (Lukas 3578 Schroeder)</li> 3579 <li>Added documentation for the XmltextReader interface and some <a 3580 href="guidelines.html">XML guidelines</a></li> 3581</ul> 3582 3583<h3>2.4.30: Dec 12 2002</h3> 3584<ul> 3585 <li>2.4.29 broke the python bindings, rereleasing</li> 3586 <li>Improvement/fixes of the XML API generator, and couple of minor code 3587 fixes.</li> 3588</ul> 3589 3590<h3>2.4.29: Dec 11 2002</h3> 3591<ul> 3592 <li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings 3593 (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates</li> 3594 <li>Fix for prev in python bindings (ERDI Gergo)</li> 3595 <li>Fix for entities handling (Marcus Clarke)</li> 3596 <li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1 3597 dump</li> 3598 <li>Fix for URI parsing when handling URNs with fragment identifiers</li> 3599 <li>Fix for HTTP URL escaping problem</li> 3600 <li>added an TextXmlReader (C#) like API (work in progress)</li> 3601 <li>Rewrote the API in XML generation script, includes a C parser and saves 3602 more information needed for C# bindings</li> 3603</ul> 3604 3605<h3>2.4.28: Nov 22 2002</h3> 3606<ul> 3607 <li>a couple of python binding fixes</li> 3608 <li>2 bug fixes in the XML push parser</li> 3609 <li>potential memory leak removed (Martin Stoilov)</li> 3610 <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li> 3611 <li>added encoding support for XInclude parse="text"</li> 3612 <li>autodetection of XHTML1 and specific serialization rules added</li> 3613 <li>nasty threading bug fixed (William Brack)</li> 3614</ul> 3615 3616<h3>2.4.27: Nov 17 2002</h3> 3617<ul> 3618 <li>fixes for the Python bindings</li> 3619 <li>a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(), 3620 HTML parser, Schemas (Charles Bozeman), document fragment support 3621 (Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer, 3622 xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr 3623 Pajas), entities processing</li> 3624 <li>added grep to xmllint --shell</li> 3625 <li>VMS update patch from Craig A. Berry</li> 3626 <li>cleanup of the Windows build with support for more compilers (Igor), 3627 better thread support on Windows</li> 3628 <li>cleanup of Unix Makefiles and spec file</li> 3629 <li>Improvements to the documentation (John Fleck)</li> 3630</ul> 3631 3632<h3>2.4.26: Oct 18 2002</h3> 3633<ul> 3634 <li>Patches for Windows CE port, improvements on Windows paths handling</li> 3635 <li>Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() , 3636 HTML serialization, Namespace compliance, and a number of small 3637 problems</li> 3638</ul> 3639 3640<h3>2.4.25: Sep 26 2002</h3> 3641<ul> 3642 <li>A number of bug fixes: XPath, validation, Python bindings, DOM and 3643 tree, xmlI/O, Html</li> 3644 <li>Serious rewrite of XInclude</li> 3645 <li>Made XML Schemas regexp part of the default build and APIs, small fix 3646 and improvement of the regexp core</li> 3647 <li>Changed the validation code to reuse XML Schemas regexp APIs</li> 3648 <li>Better handling of Windows file paths, improvement of Makefiles (Igor, 3649 Daniel Gehriger, Mark Vakoc)</li> 3650 <li>Improved the python I/O bindings, the tests, added resolver and regexp 3651 APIs</li> 3652 <li>New logos from Marc Liyanage</li> 3653 <li>Tutorial improvements: John Fleck, Christopher Harris</li> 3654 <li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe 3655 Merlet)</li> 3656 <li>removal of all stderr/perror use for error reporting</li> 3657 <li>Better error reporting: XPath and DTD validation</li> 3658 <li>update of the trio portability layer (Bjorn Reese)</li> 3659</ul> 3660 3661<p><strong>2.4.24: Aug 22 2002</strong></p> 3662<ul> 3663 <li>XPath fixes (William), xf:escape-uri() (Wesley Terpstra)</li> 3664 <li>Python binding fixes: makefiles (William), generator, rpm build, x86-64 3665 (fcrozat)</li> 3666 <li>HTML <style> and boolean attributes serializer fixes</li> 3667 <li>C14N improvements by Aleksey</li> 3668 <li>doc cleanups: Rick Jones</li> 3669 <li>Windows compiler makefile updates: Igor and Elizabeth Barham</li> 3670 <li>XInclude: implementation of fallback and xml:base fixup added</li> 3671</ul> 3672 3673<h3>2.4.23: July 6 2002</h3> 3674<ul> 3675 <li>performances patches: Peter Jacobi</li> 3676 <li>c14n fixes, testsuite and performances: Aleksey Sanin</li> 3677 <li>added xmlDocFormatDump: Chema Celorio</li> 3678 <li>new tutorial: John Fleck</li> 3679 <li>new hash functions and performances: Sander Vesik, portability fix from 3680 Peter Jacobi</li> 3681 <li>a number of bug fixes: XPath (William Brack, Richard Jinks), XML and 3682 HTML parsers, ID lookup function</li> 3683 <li>removal of all remaining sprintf: Aleksey Sanin</li> 3684</ul> 3685 3686<h3>2.4.22: May 27 2002</h3> 3687<ul> 3688 <li>a number of bug fixes: configure scripts, base handling, parser, memory 3689 usage, HTML parser, XPath, documentation (Christian Cornelssen), 3690 indentation, URI parsing</li> 3691 <li>Optimizations for XMLSec, fixing and making public some of the network 3692 protocol handlers (Aleksey)</li> 3693 <li>performance patch from Gary Pennington</li> 3694 <li>Charles Bozeman provided date and time support for XML Schemas 3695 datatypes</li> 3696</ul> 3697 3698<h3>2.4.21: Apr 29 2002</h3> 3699 3700<p>This release is both a bug fix release and also contains the early XML 3701Schemas <a href="http://www.w3.org/TR/xmlschema-1/">structures</a> and <a 3702href="http://www.w3.org/TR/xmlschema-2/">datatypes</a> code, beware, all 3703interfaces are likely to change, there is huge holes, it is clearly a work in 3704progress and don't even think of putting this code in a production system, 3705it's actually not compiled in by default. The real fixes are: 3706</p> 3707 3708<ul> 3709 <li>a couple of bugs or limitations introduced in 2.4.20</li> 3710 <li>patches for Borland C++ and MSC by Igor</li> 3711 <li>some fixes on XPath strings and conformance patches by Richard 3712 Jinks</li> 3713 <li>patch from Aleksey for the ExcC14N specification</li> 3714 <li>OSF/1 bug fix by Bjorn</li> 3715</ul> 3716 3717<h3>2.4.20: Apr 15 2002</h3> 3718<ul> 3719 <li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li> 3720 <li>XPath conformance testing by Richard Jinks</li> 3721 <li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings, 3722 libxml.m4</li> 3723</ul> 3724 3725<h3>2.4.19: Mar 25 2002</h3> 3726<ul> 3727 <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8 3728 encoder</li> 3729 <li>portability fixes in the HTTP code</li> 3730 <li>memory allocation checks using valgrind, and profiling tests</li> 3731 <li>revamp of the Windows build and Makefiles</li> 3732</ul> 3733 3734<h3>2.4.18: Mar 18 2002</h3> 3735<ul> 3736 <li>bug fixes: tree, SAX, canonicalization, validation, portability, 3737 XPath</li> 3738 <li>removed the --with-buffer option it was becoming unmaintainable</li> 3739 <li>serious cleanup of the Python makefiles</li> 3740 <li>speedup patch to XPath very effective for DocBook stylesheets</li> 3741 <li>Fixes for Windows build, cleanup of the documentation</li> 3742</ul> 3743 3744<h3>2.4.17: Mar 8 2002</h3> 3745<ul> 3746 <li>a lot of bug fixes, including "namespace nodes have no parents in 3747 XPath"</li> 3748 <li>fixed/improved the Python wrappers, added more examples and more 3749 regression tests, XPath extension functions can now return node-sets</li> 3750 <li>added the XML Canonicalization support from Aleksey Sanin</li> 3751</ul> 3752 3753<h3>2.4.16: Feb 20 2002</h3> 3754<ul> 3755 <li>a lot of bug fixes, most of them were triggered by the XML Testsuite 3756 from OASIS and W3C. Compliance has been significantly improved.</li> 3757 <li>a couple of portability fixes too.</li> 3758</ul> 3759 3760<h3>2.4.15: Feb 11 2002</h3> 3761<ul> 3762 <li>Fixed the Makefiles, especially the python module ones</li> 3763 <li>A few bug fixes and cleanup</li> 3764 <li>Includes cleanup</li> 3765</ul> 3766 3767<h3>2.4.14: Feb 8 2002</h3> 3768<ul> 3769 <li>Change of License to the <a 3770 href="http://www.opensource.org/licenses/mit-license.html">MIT 3771 License</a> basically for integration in XFree86 codebase, and removing 3772 confusion around the previous dual-licensing</li> 3773 <li>added Python bindings, beta software but should already be quite 3774 complete</li> 3775 <li>a large number of fixes and cleanups, especially for all tree 3776 manipulations</li> 3777 <li>cleanup of the headers, generation of a reference API definition in 3778 XML</li> 3779</ul> 3780 3781<h3>2.4.13: Jan 14 2002</h3> 3782<ul> 3783 <li>update of the documentation: John Fleck and Charlie Bozeman</li> 3784 <li>cleanup of timing code from Justin Fletcher</li> 3785 <li>fixes for Windows and initial thread support on Win32: Igor and Serguei 3786 Narojnyi</li> 3787 <li>Cygwin patch from Robert Collins</li> 3788 <li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li> 3789</ul> 3790 3791<h3>2.4.12: Dec 7 2001</h3> 3792<ul> 3793 <li>a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman), 3794 XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups 3795 (robert)</li> 3796 <li>Eric Lavigne contributed project files for MacOS</li> 3797 <li>some makefiles cleanups</li> 3798</ul> 3799 3800<h3>2.4.11: Nov 26 2001</h3> 3801<ul> 3802 <li>fixed a couple of errors in the includes, fixed a few bugs, some code 3803 cleanups</li> 3804 <li>xmllint man pages improvement by Heiko Rupp</li> 3805 <li>updated VMS build instructions from John A Fotheringham</li> 3806 <li>Windows Makefiles updates from Igor</li> 3807</ul> 3808 3809<h3>2.4.10: Nov 10 2001</h3> 3810<ul> 3811 <li>URI escaping fix (Joel Young)</li> 3812 <li>added xmlGetNodePath() (for paths or XPointers generation)</li> 3813 <li>Fixes namespace handling problems when using DTD and validation</li> 3814 <li>improvements on xmllint: Morus Walter patches for --format and 3815 --encode, Stefan Kost and Heiko Rupp improvements on the --shell</li> 3816 <li>fixes for xmlcatalog linking pointed by Weiqi Gao</li> 3817 <li>fixes to the HTML parser</li> 3818</ul> 3819 3820<h3>2.4.9: Nov 6 2001</h3> 3821<ul> 3822 <li>fixes more catalog bugs</li> 3823 <li>avoid a compilation problem, improve xmlGetLineNo()</li> 3824</ul> 3825 3826<h3>2.4.8: Nov 4 2001</h3> 3827<ul> 3828 <li>fixed SGML catalogs broken in previous release, updated xmlcatalog 3829 tool</li> 3830 <li>fixed a compile errors and some includes troubles.</li> 3831</ul> 3832 3833<h3>2.4.7: Oct 30 2001</h3> 3834<ul> 3835 <li>exported some debugging interfaces</li> 3836 <li>serious rewrite of the catalog code</li> 3837 <li>integrated Gary Pennington thread safety patch, added configure option 3838 and regression tests</li> 3839 <li>removed an HTML parser bug</li> 3840 <li>fixed a couple of potentially serious validation bugs</li> 3841 <li>integrated the SGML DocBook support in xmllint</li> 3842 <li>changed the nanoftp anonymous login passwd</li> 3843 <li>some I/O cleanup and a couple of interfaces for Perl wrapper</li> 3844 <li>general bug fixes</li> 3845 <li>updated xmllint man page by John Fleck</li> 3846 <li>some VMS and Windows updates</li> 3847</ul> 3848 3849<h3>2.4.6: Oct 10 2001</h3> 3850<ul> 3851 <li>added an updated man pages by John Fleck</li> 3852 <li>portability and configure fixes</li> 3853 <li>an infinite loop on the HTML parser was removed (William)</li> 3854 <li>Windows makefile patches from Igor</li> 3855 <li>fixed half a dozen bugs reported for libxml or libxslt</li> 3856 <li>updated xmlcatalog to be able to modify SGML super catalogs</li> 3857</ul> 3858 3859<h3>2.4.5: Sep 14 2001</h3> 3860<ul> 3861 <li>Remove a few annoying bugs in 2.4.4</li> 3862 <li>forces the HTML serializer to output decimal charrefs since some 3863 version of Netscape can't handle hexadecimal ones</li> 3864</ul> 3865 3866<h3>1.8.16: Sep 14 2001</h3> 3867<ul> 3868 <li>maintenance release of the old libxml1 branch, couple of bug and 3869 portability fixes</li> 3870</ul> 3871 3872<h3>2.4.4: Sep 12 2001</h3> 3873<ul> 3874 <li>added --convert to xmlcatalog, bug fixes and cleanups of XML 3875 Catalog</li> 3876 <li>a few bug fixes and some portability changes</li> 3877 <li>some documentation cleanups</li> 3878</ul> 3879 3880<h3>2.4.3: Aug 23 2001</h3> 3881<ul> 3882 <li>XML Catalog support see the doc</li> 3883 <li>New NaN/Infinity floating point code</li> 3884 <li>A few bug fixes</li> 3885</ul> 3886 3887<h3>2.4.2: Aug 15 2001</h3> 3888<ul> 3889 <li>adds xmlLineNumbersDefault() to control line number generation</li> 3890 <li>lot of bug fixes</li> 3891 <li>the Microsoft MSC projects files should now be up to date</li> 3892 <li>inheritance of namespaces from DTD defaulted attributes</li> 3893 <li>fixes a serious potential security bug</li> 3894 <li>added a --format option to xmllint</li> 3895</ul> 3896 3897<h3>2.4.1: July 24 2001</h3> 3898<ul> 3899 <li>possibility to keep line numbers in the tree</li> 3900 <li>some computation NaN fixes</li> 3901 <li>extension of the XPath API</li> 3902 <li>cleanup for alpha and ia64 targets</li> 3903 <li>patch to allow saving through HTTP PUT or POST</li> 3904</ul> 3905 3906<h3>2.4.0: July 10 2001</h3> 3907<ul> 3908 <li>Fixed a few bugs in XPath, validation, and tree handling.</li> 3909 <li>Fixed XML Base implementation, added a couple of examples to the 3910 regression tests</li> 3911 <li>A bit of cleanup</li> 3912</ul> 3913 3914<h3>2.3.14: July 5 2001</h3> 3915<ul> 3916 <li>fixed some entities problems and reduce memory requirement when 3917 substituting them</li> 3918 <li>lots of improvements in the XPath queries interpreter can be 3919 substantially faster</li> 3920 <li>Makefiles and configure cleanups</li> 3921 <li>Fixes to XPath variable eval, and compare on empty node set</li> 3922 <li>HTML tag closing bug fixed</li> 3923 <li>Fixed an URI reference computation problem when validating</li> 3924</ul> 3925 3926<h3>2.3.13: June 28 2001</h3> 3927<ul> 3928 <li>2.3.12 configure.in was broken as well as the push mode XML parser</li> 3929 <li>a few more fixes for compilation on Windows MSC by Yon Derek</li> 3930</ul> 3931 3932<h3>1.8.14: June 28 2001</h3> 3933<ul> 3934 <li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li> 3935 <li>Small Makefile fix</li> 3936</ul> 3937 3938<h3>2.3.12: June 26 2001</h3> 3939<ul> 3940 <li>lots of cleanup</li> 3941 <li>a couple of validation fix</li> 3942 <li>fixed line number counting</li> 3943 <li>fixed serious problems in the XInclude processing</li> 3944 <li>added support for UTF8 BOM at beginning of entities</li> 3945 <li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0 3946 miscompile uri.c (William), Thomas Leitner provided a fix for the 3947 optimizer on Tru64</li> 3948 <li>incorporated Yon Derek and Igor Zlatkovic fixes and improvements for 3949 compilation on Windows MSC</li> 3950 <li>update of libxml-doc.el (Felix Natter)</li> 3951 <li>fixed 2 bugs in URI normalization code</li> 3952</ul> 3953 3954<h3>2.3.11: June 17 2001</h3> 3955<ul> 3956 <li>updates to trio, Makefiles and configure should fix some portability 3957 problems (alpha)</li> 3958 <li>fixed some HTML serialization problems (pre, script, and block/inline 3959 handling), added encoding aware APIs, cleanup of this code</li> 3960 <li>added xmlHasNsProp()</li> 3961 <li>implemented a specific PI for encoding support in the DocBook SGML 3962 parser</li> 3963 <li>some XPath fixes (-Infinity, / as a function parameter and namespaces 3964 node selection)</li> 3965 <li>fixed a performance problem and an error in the validation code</li> 3966 <li>fixed XInclude routine to implement the recursive behaviour</li> 3967 <li>fixed xmlFreeNode problem when libxml is included statically twice</li> 3968 <li>added --version to xmllint for bug reports</li> 3969</ul> 3970 3971<h3>2.3.10: June 1 2001</h3> 3972<ul> 3973 <li>fixed the SGML catalog support</li> 3974 <li>a number of reported bugs got fixed, in XPath, iconv detection, 3975 XInclude processing</li> 3976 <li>XPath string function should now handle unicode correctly</li> 3977</ul> 3978 3979<h3>2.3.9: May 19 2001</h3> 3980 3981<p>Lots of bugfixes, and added a basic SGML catalog support: 3982</p> 3983<ul> 3984 <li>HTML push bugfix #54891 and another patch from Jonas Borgstrom</li> 3985 <li>some serious speed optimization again</li> 3986 <li>some documentation cleanups</li> 3987 <li>trying to get better linking on Solaris (-R)</li> 3988 <li>XPath API cleanup from Thomas Broyer</li> 3989 <li>Validation bug fixed #54631, added a patch from Gary Pennington, fixed 3990 xmlValidGetValidElements()</li> 3991 <li>Added an INSTALL file</li> 3992 <li>Attribute removal added to API: #54433</li> 3993 <li>added a basic support for SGML catalogs</li> 3994 <li>fixed xmlKeepBlanksDefault(0) API</li> 3995 <li>bugfix in xmlNodeGetLang()</li> 3996 <li>fixed a small configure portability problem</li> 3997 <li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li> 3998</ul> 3999 4000<h3>1.8.13: May 14 2001</h3> 4001<ul> 4002 <li>bugfixes release of the old libxml1 branch used by Gnome</li> 4003</ul> 4004 4005<h3>2.3.8: May 3 2001</h3> 4006<ul> 4007 <li>Integrated an SGML DocBook parser for the Gnome project</li> 4008 <li>Fixed a few things in the HTML parser</li> 4009 <li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating 4010 point portability issue</li> 4011 <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for 4012 DOM+validation using the XML REC as input and a 700MHz celeron).</li> 4013 <li>incorporated more Windows cleanup</li> 4014 <li>added xmlSaveFormatFile()</li> 4015 <li>fixed problems in copying nodes with entities references (gdome)</li> 4016 <li>removed some troubles surrounding the new validation module</li> 4017</ul> 4018 4019<h3>2.3.7: April 22 2001</h3> 4020<ul> 4021 <li>lots of small bug fixes, corrected XPointer</li> 4022 <li>Non deterministic content model validation support</li> 4023 <li>added xmlDocCopyNode for gdome2</li> 4024 <li>revamped the way the HTML parser handles end of tags</li> 4025 <li>XPath: corrections of namespaces support and number formatting</li> 4026 <li>Windows: Igor Zlatkovic patches for MSC compilation</li> 4027 <li>HTML output fixes from P C Chow and William M. Brack</li> 4028 <li>Improved validation speed sensible for DocBook</li> 4029 <li>fixed a big bug with ID declared in external parsed entities</li> 4030 <li>portability fixes, update of Trio from Bjorn Reese</li> 4031</ul> 4032 4033<h3>2.3.6: April 8 2001</h3> 4034<ul> 4035 <li>Code cleanup using extreme gcc compiler warning options, found and 4036 cleared half a dozen potential problem</li> 4037 <li>the Eazel team found an XML parser bug</li> 4038 <li>cleaned up the user of some of the string formatting function. used the 4039 trio library code to provide the one needed when the platform is missing 4040 them</li> 4041 <li>xpath: removed a memory leak and fixed the predicate evaluation 4042 problem, extended the testsuite and cleaned up the result. XPointer seems 4043 broken ...</li> 4044</ul> 4045 4046<h3>2.3.5: Mar 23 2001</h3> 4047<ul> 4048 <li>Biggest change is separate parsing and evaluation of XPath expressions, 4049 there is some new APIs for this too</li> 4050 <li>included a number of bug fixes(XML push parser, 51876, notations, 4051 52299)</li> 4052 <li>Fixed some portability issues</li> 4053</ul> 4054 4055<h3>2.3.4: Mar 10 2001</h3> 4056<ul> 4057 <li>Fixed bugs #51860 and #51861</li> 4058 <li>Added a global variable xmlDefaultBufferSize to allow default buffer 4059 size to be application tunable.</li> 4060 <li>Some cleanup in the validation code, still a bug left and this part 4061 should probably be rewritten to support ambiguous content model :-\</li> 4062 <li>Fix a couple of serious bugs introduced or raised by changes in 2.3.3 4063 parser</li> 4064 <li>Fixed another bug in xmlNodeGetContent()</li> 4065 <li>Bjorn fixed XPath node collection and Number formatting</li> 4066 <li>Fixed a loop reported in the HTML parsing</li> 4067 <li>blank space are reported even if the Dtd content model proves that they 4068 are formatting spaces, this is for XML conformance</li> 4069</ul> 4070 4071<h3>2.3.3: Mar 1 2001</h3> 4072<ul> 4073 <li>small change in XPath for XSLT</li> 4074 <li>documentation cleanups</li> 4075 <li>fix in validation by Gary Pennington</li> 4076 <li>serious parsing performances improvements</li> 4077</ul> 4078 4079<h3>2.3.2: Feb 24 2001</h3> 4080<ul> 4081 <li>chasing XPath bugs, found a bunch, completed some TODO</li> 4082 <li>fixed a Dtd parsing bug</li> 4083 <li>fixed a bug in xmlNodeGetContent</li> 4084 <li>ID/IDREF support partly rewritten by Gary Pennington</li> 4085</ul> 4086 4087<h3>2.3.1: Feb 15 2001</h3> 4088<ul> 4089 <li>some XPath and HTML bug fixes for XSLT</li> 4090 <li>small extension of the hash table interfaces for DOM gdome2 4091 implementation</li> 4092 <li>A few bug fixes</li> 4093</ul> 4094 4095<h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3> 4096<ul> 4097 <li>Lots of XPath bug fixes</li> 4098 <li>Add a mode with Dtd lookup but without validation error reporting for 4099 XSLT</li> 4100 <li>Add support for text node without escaping (XSLT)</li> 4101 <li>bug fixes for xmlCheckFilename</li> 4102 <li>validation code bug fixes from Gary Pennington</li> 4103 <li>Patch from Paul D. Smith correcting URI path normalization</li> 4104 <li>Patch to allow simultaneous install of libxml-devel and 4105 libxml2-devel</li> 4106 <li>the example Makefile is now fixed</li> 4107 <li>added HTML to the RPM packages</li> 4108 <li>tree copying bugfixes</li> 4109 <li>updates to Windows makefiles</li> 4110 <li>optimization patch from Bjorn Reese</li> 4111</ul> 4112 4113<h3>2.2.11: Jan 4 2001</h3> 4114<ul> 4115 <li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li> 4116 <li>added htmlHandleOmittedElem()</li> 4117 <li>Applied Bjorn Reese's IPV6 first patch</li> 4118 <li>Applied Paul D. Smith patches for validation of XInclude results</li> 4119 <li>added XPointer xmlns() new scheme support</li> 4120</ul> 4121 4122<h3>2.2.10: Nov 25 2000</h3> 4123<ul> 4124 <li>Fix the Windows problems of 2.2.8</li> 4125 <li>integrate OpenVMS patches</li> 4126 <li>better handling of some nasty HTML input</li> 4127 <li>Improved the XPointer implementation</li> 4128 <li>integrate a number of provided patches</li> 4129</ul> 4130 4131<h3>2.2.9: Nov 25 2000</h3> 4132<ul> 4133 <li>erroneous release :-(</li> 4134</ul> 4135 4136<h3>2.2.8: Nov 13 2000</h3> 4137<ul> 4138 <li>First version of <a href="http://www.w3.org/TR/xinclude">XInclude</a> 4139 support</li> 4140 <li>Patch in conditional section handling</li> 4141 <li>updated MS compiler project</li> 4142 <li>fixed some XPath problems</li> 4143 <li>added an URI escaping function</li> 4144 <li>some other bug fixes</li> 4145</ul> 4146 4147<h3>2.2.7: Oct 31 2000</h3> 4148<ul> 4149 <li>added message redirection</li> 4150 <li>XPath improvements (thanks TOM !)</li> 4151 <li>xmlIOParseDTD() added</li> 4152 <li>various small fixes in the HTML, URI, HTTP and XPointer support</li> 4153 <li>some cleanup of the Makefile, autoconf and the distribution content</li> 4154</ul> 4155 4156<h3>2.2.6: Oct 25 2000:</h3> 4157<ul> 4158 <li>Added an hash table module, migrated a number of internal structure to 4159 those</li> 4160 <li>Fixed a posteriori validation problems</li> 4161 <li>HTTP module cleanups</li> 4162 <li>HTML parser improvements (tag errors, script/style handling, attribute 4163 normalization)</li> 4164 <li>coalescing of adjacent text nodes</li> 4165 <li>couple of XPath bug fixes, exported the internal API</li> 4166</ul> 4167 4168<h3>2.2.5: Oct 15 2000:</h3> 4169<ul> 4170 <li>XPointer implementation and testsuite</li> 4171 <li>Lot of XPath fixes, added variable and functions registration, more 4172 tests</li> 4173 <li>Portability fixes, lots of enhancements toward an easy Windows build 4174 and release</li> 4175 <li>Late validation fixes</li> 4176 <li>Integrated a lot of contributed patches</li> 4177 <li>added memory management docs</li> 4178 <li>a performance problem when using large buffer seems fixed</li> 4179</ul> 4180 4181<h3>2.2.4: Oct 1 2000:</h3> 4182<ul> 4183 <li>main XPath problem fixed</li> 4184 <li>Integrated portability patches for Windows</li> 4185 <li>Serious bug fixes on the URI and HTML code</li> 4186</ul> 4187 4188<h3>2.2.3: Sep 17 2000</h3> 4189<ul> 4190 <li>bug fixes</li> 4191 <li>cleanup of entity handling code</li> 4192 <li>overall review of all loops in the parsers, all sprintf usage has been 4193 checked too</li> 4194 <li>Far better handling of larges Dtd. Validating against DocBook XML Dtd 4195 works smoothly now.</li> 4196</ul> 4197 4198<h3>1.8.10: Sep 6 2000</h3> 4199<ul> 4200 <li>bug fix release for some Gnome projects</li> 4201</ul> 4202 4203<h3>2.2.2: August 12 2000</h3> 4204<ul> 4205 <li>mostly bug fixes</li> 4206 <li>started adding routines to access xml parser context options</li> 4207</ul> 4208 4209<h3>2.2.1: July 21 2000</h3> 4210<ul> 4211 <li>a purely bug fixes release</li> 4212 <li>fixed an encoding support problem when parsing from a memory block</li> 4213 <li>fixed a DOCTYPE parsing problem</li> 4214 <li>removed a bug in the function allowing to override the memory 4215 allocation routines</li> 4216</ul> 4217 4218<h3>2.2.0: July 14 2000</h3> 4219<ul> 4220 <li>applied a lot of portability fixes</li> 4221 <li>better encoding support/cleanup and saving (content is now always 4222 encoded in UTF-8)</li> 4223 <li>the HTML parser now correctly handles encodings</li> 4224 <li>added xmlHasProp()</li> 4225 <li>fixed a serious problem with &#38;</li> 4226 <li>propagated the fix to FTP client</li> 4227 <li>cleanup, bugfixes, etc ...</li> 4228 <li>Added a page about <a href="encoding.html">libxml Internationalization 4229 support</a></li> 4230</ul> 4231 4232<h3>1.8.9: July 9 2000</h3> 4233<ul> 4234 <li>fixed the spec the RPMs should be better</li> 4235 <li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve 4236 rpmfind users problem</li> 4237</ul> 4238 4239<h3>2.1.1: July 1 2000</h3> 4240<ul> 4241 <li>fixes a couple of bugs in the 2.1.0 packaging</li> 4242 <li>improvements on the HTML parser</li> 4243</ul> 4244 4245<h3>2.1.0 and 1.8.8: June 29 2000</h3> 4246<ul> 4247 <li>1.8.8 is mostly a commodity package for upgrading to libxml2 according 4248 to <a href="upgrade.html">new instructions</a>. It fixes a nasty problem 4249 about &#38; charref parsing</li> 4250 <li>2.1.0 also ease the upgrade from libxml v1 to the recent version. it 4251 also contains numerous fixes and enhancements: 4252 <ul> 4253 <li>added xmlStopParser() to stop parsing</li> 4254 <li>improved a lot parsing speed when there is large CDATA blocks</li> 4255 <li>includes XPath patches provided by Picdar Technology</li> 4256 <li>tried to fix as much as possible DTD validation and namespace 4257 related problems</li> 4258 <li>output to a given encoding has been added/tested</li> 4259 <li>lot of various fixes</li> 4260 </ul> 4261 </li> 4262</ul> 4263 4264<h3>2.0.0: Apr 12 2000</h3> 4265<ul> 4266 <li>First public release of libxml2. If you are using libxml, it's a good 4267 idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially 4268 scheduled for Apr 3 the release occurred only on Apr 12 due to massive 4269 workload.</li> 4270 <li>The include are now located under $prefix/include/libxml (instead of 4271 $prefix/include/gnome-xml), they also are referenced by 4272 <pre>#include <libxml/xxx.h></pre> 4273 <p>instead of</p> 4274 <pre>#include "xxx.h"</pre> 4275 </li> 4276 <li>a new URI module for parsing URIs and following strictly RFC 2396</li> 4277 <li>the memory allocation routines used by libxml can now be overloaded 4278 dynamically by using xmlMemSetup()</li> 4279 <li>The previously CVS only tool tester has been renamed 4280 <strong>xmllint</strong> and is now installed as part of the libxml2 4281 package</li> 4282 <li>The I/O interface has been revamped. There is now ways to plug in 4283 specific I/O modules, either at the URI scheme detection level using 4284 xmlRegisterInputCallbacks() or by passing I/O functions when creating a 4285 parser context using xmlCreateIOParserCtxt()</li> 4286 <li>there is a C preprocessor macro LIBXML_VERSION providing the version 4287 number of the libxml module in use</li> 4288 <li>a number of optional features of libxml can now be excluded at 4289 configure time (FTP/HTTP/HTML/XPath/Debug)</li> 4290</ul> 4291 4292<h3>2.0.0beta: Mar 14 2000</h3> 4293<ul> 4294 <li>This is a first Beta release of libxml version 2</li> 4295 <li>It's available only from<a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org 4296 FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and 4297 RPMs</li> 4298 <li>This version is now the head in the Gnome CVS base, the old one is 4299 available under the tag LIB_XML_1_X</li> 4300 <li>This includes a very large set of changes. From a programmatic point 4301 of view applications should not have to be modified too much, check the 4302 <a href="upgrade.html">upgrade page</a></li> 4303 <li>Some interfaces may changes (especially a bit about encoding).</li> 4304 <li>the updates includes: 4305 <ul> 4306 <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly 4307 handled now</li> 4308 <li>Better handling of entities, especially well-formedness checking 4309 and proper PEref extensions in external subsets</li> 4310 <li>DTD conditional sections</li> 4311 <li>Validation now correctly handle entities content</li> 4312 <li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change 4313 structures to accommodate DOM</a></li> 4314 </ul> 4315 </li> 4316 <li>Serious progress were made toward compliance, <a 4317 href="conf/result.html">here are the result of the test</a> against the 4318 OASIS testsuite (except the Japanese tests since I don't support that 4319 encoding yet). This URL is rebuilt every couple of hours using the CVS 4320 head version.</li> 4321</ul> 4322 4323<h3>1.8.7: Mar 6 2000</h3> 4324<ul> 4325 <li>This is a bug fix release:</li> 4326 <li>It is possible to disable the ignorable blanks heuristic used by 4327 libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note 4328 that for adherence to XML spec, this behaviour will be disabled by 4329 default in 2.x . The same function will allow to keep compatibility for 4330 old code.</li> 4331 <li>Blanks in <a> </a> constructs are not ignored anymore, 4332 avoiding heuristic is really the Right Way :-\</li> 4333 <li>The unchecked use of snprintf which was breaking libxml-1.8.6 4334 compilation on some platforms has been fixed</li> 4335 <li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing 4336 URIs</li> 4337</ul> 4338 4339<h3>1.8.6: Jan 31 2000</h3> 4340<ul> 4341 <li>added a nanoFTP transport module, debugged until the new version of <a 4342 href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a> can use 4343 it without troubles</li> 4344</ul> 4345 4346<h3>1.8.5: Jan 21 2000</h3> 4347<ul> 4348 <li>adding APIs to parse a well balanced chunk of XML (production <a 4349 href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the 4350 XML spec)</li> 4351 <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li> 4352 <li>Jody Goldberg <jgoldberg@home.com> provided another patch trying 4353 to solve the zlib checks problems</li> 4354 <li>The current state in gnome CVS base is expected to ship as 1.8.5 with 4355 gnumeric soon</li> 4356</ul> 4357 4358<h3>1.8.4: Jan 13 2000</h3> 4359<ul> 4360 <li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li> 4361 <li>all exit() call should have been removed from libxml</li> 4362 <li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li> 4363 <li>added newDocFragment()</li> 4364</ul> 4365 4366<h3>1.8.3: Jan 5 2000</h3> 4367<ul> 4368 <li>a Push interface for the XML and HTML parsers</li> 4369 <li>a shell-like interface to the document tree (try tester --shell :-)</li> 4370 <li>lots of bug fixes and improvement added over XMas holidays</li> 4371 <li>fixed the DTD parsing code to work with the xhtml DTD</li> 4372 <li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li> 4373 <li>Fixed bugs in xmlNewNs()</li> 4374 <li>External entity loading code has been revamped, now it uses 4375 xmlLoadExternalEntity(), some fix on entities processing were added</li> 4376 <li>cleaned up WIN32 includes of socket stuff</li> 4377</ul> 4378 4379<h3>1.8.2: Dec 21 1999</h3> 4380<ul> 4381 <li>I got another problem with includes and C++, I hope this issue is fixed 4382 for good this time</li> 4383 <li>Added a few tree modification functions: xmlReplaceNode, 4384 xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and 4385 xmlDocSetRootElement</li> 4386 <li>Tried to improve the HTML output with help from <a 4387 href="mailto:clahey@umich.edu">Chris Lahey</a></li> 4388</ul> 4389 4390<h3>1.8.1: Dec 18 1999</h3> 4391<ul> 4392 <li>various patches to avoid troubles when using libxml with C++ compilers 4393 the "namespace" keyword and C escaping in include files</li> 4394 <li>a problem in one of the core macros IS_CHAR was corrected</li> 4395 <li>fixed a bug introduced in 1.8.0 breaking default namespace processing, 4396 and more specifically the Dia application</li> 4397 <li>fixed a posteriori validation (validation after parsing, or by using a 4398 Dtd not specified in the original document)</li> 4399 <li>fixed a bug in</li> 4400</ul> 4401 4402<h3>1.8.0: Dec 12 1999</h3> 4403<ul> 4404 <li>cleanup, especially memory wise</li> 4405 <li>the parser should be more reliable, especially the HTML one, it should 4406 not crash, whatever the input !</li> 4407 <li>Integrated various patches, especially a speedup improvement for large 4408 dataset from <a href="mailto:cnygard@bellatlantic.net">Carl Nygard</a>, 4409 configure with --with-buffers to enable them.</li> 4410 <li>attribute normalization, oops should have been added long ago !</li> 4411 <li>attributes defaulted from DTDs should be available, xmlSetProp() now 4412 does entities escaping by default.</li> 4413</ul> 4414 4415<h3>1.7.4: Oct 25 1999</h3> 4416<ul> 4417 <li>Lots of HTML improvement</li> 4418 <li>Fixed some errors when saving both XML and HTML</li> 4419 <li>More examples, the regression tests should now look clean</li> 4420 <li>Fixed a bug with contiguous charref</li> 4421</ul> 4422 4423<h3>1.7.3: Sep 29 1999</h3> 4424<ul> 4425 <li>portability problems fixed</li> 4426 <li>snprintf was used unconditionally, leading to link problems on system 4427 were it's not available, fixed</li> 4428</ul> 4429 4430<h3>1.7.1: Sep 24 1999</h3> 4431<ul> 4432 <li>The basic type for strings manipulated by libxml has been renamed in 4433 1.7.1 from <strong>CHAR</strong> to <strong>xmlChar</strong>. The reason 4434 is that CHAR was conflicting with a predefined type on Windows. However 4435 on non WIN32 environment, compatibility is provided by the way of a 4436 <strong>#define </strong>.</li> 4437 <li>Changed another error : the use of a structure field called errno, and 4438 leading to troubles on platforms where it's a macro</li> 4439</ul> 4440 4441<h3>1.7.0: Sep 23 1999</h3> 4442<ul> 4443 <li>Added the ability to fetch remote DTD or parsed entities, see the <a 4444 href="html/libxml-nanohttp.html">nanohttp</a> module.</li> 4445 <li>Added an errno to report errors by another mean than a simple printf 4446 like callback</li> 4447 <li>Finished ID/IDREF support and checking when validation</li> 4448 <li>Serious memory leaks fixed (there is now a <a 4449 href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li> 4450 <li>Improvement of <a href="http://www.w3.org/TR/xpath">XPath</a> 4451 implementation</li> 4452 <li>Added an HTML parser front-end</li> 4453</ul> 4454 4455<h2><a name="XML">XML</a></h2> 4456 4457<p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for 4458markup-based structured documents. Here is <a name="example">an example XML 4459document</a>:</p> 4460<pre><?xml version="1.0"?> 4461<EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> 4462 <head> 4463 <title>Welcome to Gnome</title> 4464 </head> 4465 <chapter> 4466 <title>The Linux adventure</title> 4467 <p>bla bla bla ...</p> 4468 <image href="linus.gif"/> 4469 <p>...</p> 4470 </chapter> 4471</EXAMPLE></pre> 4472 4473<p>The first line specifies that it is an XML document and gives useful 4474information about its encoding. Then the rest of the document is a text 4475format whose structure is specified by tags between brackets. <strong>Each 4476tag opened has to be closed</strong>. XML is pedantic about this. However, if 4477a tag is empty (no content), a single tag can serve as both the opening and 4478closing tag if it ends with <code>/></code> rather than with 4479<code>></code>. Note that, for example, the image tag has no content (just 4480an attribute) and is closed by ending the tag with <code>/></code>.</p> 4481 4482<p>XML can be applied successfully to a wide range of tasks, ranging from 4483long term structured document maintenance (where it follows the steps of 4484SGML) to simple data encoding mechanisms like configuration file formatting 4485(glade), spreadsheets (gnumeric), or even shorter lived documents such as 4486WebDAV where it is used to encode remote calls between a client and a 4487server.</p> 4488 4489<h2><a name="XSLT">XSLT</a></h2> 4490 4491<p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p> 4492 4493<p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a 4494language for transforming XML documents into other XML documents (or 4495HTML/textual output).</p> 4496 4497<p>A separate library called libxslt is available implementing XSLT-1.0 for 4498libxml2. This module "libxslt" too can be found in the Gnome SVN base.</p> 4499 4500<p>You can check the progresses on the libxslt <a 4501href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p> 4502 4503<h2><a name="Python">Python and bindings</a></h2> 4504 4505<p>There are a number of language bindings and wrappers available for 4506libxml2, the list below is not exhaustive. Please contact the <a 4507href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a> 4508(<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in 4509order to get updates to this list or to discuss the specific topic of libxml2 4510or libxslt wrappers or bindings:</p> 4511<ul> 4512 <li><a href="https://libxmlplusplus.github.io/libxmlplusplus/">Libxml++</a> seems the 4513 most up-to-date C++ bindings for libxml2, check the <a 4514 href="https://developer-old.gnome.org/libxml++/">documentation</a> 4515 and the <a 4516 href="https://github.com/libxmlplusplus/libxmlplusplus/tree/master/examples">examples</a>.</li> 4517 <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper 4518 based on the gdome2 bindings</a> maintained by Tobias Peters.</li> 4519 <li>and a third C++ wrapper by Peter Jones <pjones@pmade.org> 4520 <p>Website: <a 4521 href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p> 4522 </li> 4523 <li>XML::LibXML <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl 4524 bindings</a> are available on CPAN, as well as XML::LibXSLT 4525 <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXSLT">Perl libxslt 4526 bindings</a>.</li> 4527 <li>If you're interested into scripting XML processing, have a look at <a 4528 href="http://xsh.sourceforge.net/">XSH</a> an XML editing shell based on 4529 Libxml2 Perl bindings.</li> 4530 <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an 4531 earlier version of the libxml/libxslt <a 4532 href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li> 4533 <li>Gopal.V and Peter Minten develop <a 4534 href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of 4535 C# libxml2 bindings.</li> 4536 <li>Petr Kozelka provides <a 4537 href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue 4538 libxml2</a> with Kylix, Delphi and other Pascal compilers.</li> 4539 <li>Uwe Fechner also provides <a 4540 href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 4541 implementation for Kylix2/D5/D6 from Borland.</li> 4542 <li>There is <a href="http://libxml.rubyforge.org/">bindings for Ruby</a> 4543 and libxml2 bindings are also available in Ruby through the <a 4544 href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module 4545 maintained by Tobias Peters.</li> 4546 <li>Steve Ball and contributors maintains <a 4547 href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for 4548 Tcl</a>.</li> 4549 <li>libxml2 and libxslt are the default XML libraries for PHP5.</li> 4550 <li><a href="http://savannah.gnu.org/projects/classpathx/">LibxmlJ</a> is 4551 an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and 4552 libxslt as part of GNU ClasspathX project.</li> 4553 <li>Patrick McPhee provides Rexx bindings for libxml2 and libxslt, look for 4554 <a href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li> 4555 <li><a 4556 href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a> 4557 provides <a 4558 href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLib 4559 osax</a>. This is an osax for Mac OS X with a set of commands to 4560 implement in AppleScript the XML DOM, XPATH and XSLT. Also includes 4561 commands for Property-lists (Apple's fast lookup table XML format.)</li> 4562 <li>Francesco Montorsi developed <a 4563 href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a> 4564 wrappers that interface libxml2, allowing wxWidgets applications to 4565 load/save/edit XML instances.</li> 4566</ul> 4567 4568<p>The distribution includes a set of Python bindings, which are guaranteed 4569to be maintained as part of the library in the future, though the Python 4570interface have not yet reached the completeness of the C API.</p> 4571 4572<p>Note that some of the Python purist dislike the default set of Python 4573bindings, rather than complaining I suggest they have a look at <a 4574href="http://lxml.de/">lxml the more pythonic bindings for libxml2 4575and libxslt</a> and <a 4576href="http://lxml.de/mailinglist/">check the mailing-list</a>.</p> 4577 4578<p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a> 4579maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port 4580of the Python bindings</a>.</p> 4581 4582<p>Note to people interested in building bindings, the API is formalized as 4583<a href="libxml2-api.xml">an XML API description file</a> which allows to 4584automate a large part of the Python bindings, this includes function 4585descriptions, enums, structures, typedefs, etc... The Python script used to 4586build the bindings is python/generator.py in the source distribution.</p> 4587 4588<p>To install the Python bindings there are 2 options:</p> 4589<ul> 4590 <li>If you use an RPM based distribution, simply install the <a 4591 href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python 4592 RPM</a> (and if needed the <a 4593 href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python 4594 RPM</a>).</li> 4595 <li>Otherwise use the <a href="ftp://xmlsoft.org/libxml2/python/">libxml2-python 4596 module distribution</a> corresponding to your installed version of 4597 libxml2 and libxslt. Note that to install it you will need both libxml2 4598 and libxslt installed and run "python setup.py build install" in the 4599 module tree.</li> 4600</ul> 4601 4602<p>The distribution includes a set of examples and regression tests for the 4603python bindings in the <code>python/tests</code> directory. Here are some 4604excerpts from those tests:</p> 4605 4606<h3>tst.py:</h3> 4607 4608<p>This is a basic test of the file interface and DOM navigation:</p> 4609<pre>import libxml2, sys 4610 4611doc = libxml2.parseFile("tst.xml") 4612if doc.name != "tst.xml": 4613 print "doc.name failed" 4614 sys.exit(1) 4615root = doc.children 4616if root.name != "doc": 4617 print "root.name failed" 4618 sys.exit(1) 4619child = root.children 4620if child.name != "foo": 4621 print "child.name failed" 4622 sys.exit(1) 4623doc.freeDoc()</pre> 4624 4625<p>The Python module is called libxml2; parseFile is the equivalent of 4626xmlParseFile (most of the bindings are automatically generated, and the xml 4627prefix is removed and the casing convention are kept). All node seen at the 4628binding level share the same subset of accessors:</p> 4629<ul> 4630 <li><code>name</code> : returns the node name</li> 4631 <li><code>type</code> : returns a string indicating the node type</li> 4632 <li><code>content</code> : returns the content of the node, it is based on 4633 xmlNodeGetContent() and hence is recursive.</li> 4634 <li><code>parent</code> , <code>children</code>, <code>last</code>, 4635 <code>next</code>, <code>prev</code>, <code>doc</code>, 4636 <code>properties</code>: pointing to the associated element in the tree, 4637 those may return None in case no such link exists.</li> 4638</ul> 4639 4640<p>Also note the need to explicitly deallocate documents with freeDoc() . 4641Reference counting for libxml2 trees would need quite a lot of work to 4642function properly, and rather than risk memory leaks if not implemented 4643correctly it sounds safer to have an explicit function to free a tree. The 4644wrapper python objects like doc, root or child are them automatically garbage 4645collected.</p> 4646 4647<h3>validate.py:</h3> 4648 4649<p>This test check the validation interfaces and redirection of error 4650messages:</p> 4651<pre>import libxml2 4652 4653#deactivate error messages from the validation 4654def noerr(ctx, str): 4655 pass 4656 4657libxml2.registerErrorHandler(noerr, None) 4658 4659ctxt = libxml2.createFileParserCtxt("invalid.xml") 4660ctxt.validate(1) 4661ctxt.parseDocument() 4662doc = ctxt.doc() 4663valid = ctxt.isValid() 4664doc.freeDoc() 4665if valid != 0: 4666 print "validity check failed"</pre> 4667 4668<p>The first thing to notice is the call to registerErrorHandler(), it 4669defines a new error handler global to the library. It is used to avoid seeing 4670the error messages when trying to validate the invalid document.</p> 4671 4672<p>The main interest of that test is the creation of a parser context with 4673createFileParserCtxt() and how the behaviour can be changed before calling 4674parseDocument() . Similarly the information resulting from the parsing phase 4675is also available using context methods.</p> 4676 4677<p>Contexts like nodes are defined as class and the libxml2 wrappers maps the 4678C function interfaces in terms of objects method as much as possible. The 4679best to get a complete view of what methods are supported is to look at the 4680libxml2.py module containing all the wrappers.</p> 4681 4682<h3>push.py:</h3> 4683 4684<p>This test show how to activate the push parser interface:</p> 4685<pre>import libxml2 4686 4687ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml") 4688ctxt.parseChunk("/>", 2, 1) 4689doc = ctxt.doc() 4690 4691doc.freeDoc()</pre> 4692 4693<p>The context is created with a special call based on the 4694xmlCreatePushParser() from the C library. The first argument is an optional 4695SAX callback object, then the initial set of data, the length and the name of 4696the resource in case URI-References need to be computed by the parser.</p> 4697 4698<p>Then the data are pushed using the parseChunk() method, the last call 4699setting the third argument terminate to 1.</p> 4700 4701<h3>pushSAX.py:</h3> 4702 4703<p>this test show the use of the event based parsing interfaces. In this case 4704the parser does not build a document, but provides callback information as 4705the parser makes progresses analyzing the data being provided:</p> 4706<pre>import libxml2 4707log = "" 4708 4709class callback: 4710 def startDocument(self): 4711 global log 4712 log = log + "startDocument:" 4713 4714 def endDocument(self): 4715 global log 4716 log = log + "endDocument:" 4717 4718 def startElement(self, tag, attrs): 4719 global log 4720 log = log + "startElement %s %s:" % (tag, attrs) 4721 4722 def endElement(self, tag): 4723 global log 4724 log = log + "endElement %s:" % (tag) 4725 4726 def characters(self, data): 4727 global log 4728 log = log + "characters: %s:" % (data) 4729 4730 def warning(self, msg): 4731 global log 4732 log = log + "warning: %s:" % (msg) 4733 4734 def error(self, msg): 4735 global log 4736 log = log + "error: %s:" % (msg) 4737 4738 def fatalError(self, msg): 4739 global log 4740 log = log + "fatalError: %s:" % (msg) 4741 4742handler = callback() 4743 4744ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml") 4745chunk = " url='tst'>b" 4746ctxt.parseChunk(chunk, len(chunk), 0) 4747chunk = "ar</foo>" 4748ctxt.parseChunk(chunk, len(chunk), 1) 4749 4750reference = "startDocument:startElement foo {'url': 'tst'}:" + \ 4751 "characters: bar:endElement foo:endDocument:" 4752if log != reference: 4753 print "Error got: %s" % log 4754 print "Expected: %s" % reference</pre> 4755 4756<p>The key object in that test is the handler, it provides a number of entry 4757points which can be called by the parser as it makes progresses to indicate 4758the information set obtained. The full set of callback is larger than what 4759the callback class in that specific example implements (see the SAX 4760definition for a complete list). The wrapper will only call those supplied by 4761the object when activated. The startElement receives the names of the element 4762and a dictionary containing the attributes carried by this element.</p> 4763 4764<p>Also note that the reference string generated from the callback shows a 4765single character call even though the string "bar" is passed to the parser 4766from 2 different call to parseChunk()</p> 4767 4768<h3>xpath.py:</h3> 4769 4770<p>This is a basic test of XPath wrappers support</p> 4771<pre>import libxml2 4772 4773doc = libxml2.parseFile("tst.xml") 4774ctxt = doc.xpathNewContext() 4775res = ctxt.xpathEval("//*") 4776if len(res) != 2: 4777 print "xpath query: wrong node set size" 4778 sys.exit(1) 4779if res[0].name != "doc" or res[1].name != "foo": 4780 print "xpath query: wrong node set value" 4781 sys.exit(1) 4782doc.freeDoc() 4783ctxt.xpathFreeContext()</pre> 4784 4785<p>This test parses a file, then create an XPath context to evaluate XPath 4786expression on it. The xpathEval() method execute an XPath query and returns 4787the result mapped in a Python way. String and numbers are natively converted, 4788and node sets are returned as a tuple of libxml2 Python nodes wrappers. Like 4789the document, the XPath context need to be freed explicitly, also not that 4790the result of the XPath query may point back to the document tree and hence 4791the document must be freed after the result of the query is used.</p> 4792 4793<h3>xpathext.py:</h3> 4794 4795<p>This test shows how to extend the XPath engine with functions written in 4796python:</p> 4797<pre>import libxml2 4798 4799def foo(ctx, x): 4800 return x + 1 4801 4802doc = libxml2.parseFile("tst.xml") 4803ctxt = doc.xpathNewContext() 4804libxml2.registerXPathFunction(ctxt._o, "foo", None, foo) 4805res = ctxt.xpathEval("foo(1)") 4806if res != 2: 4807 print "xpath extension failure" 4808doc.freeDoc() 4809ctxt.xpathFreeContext()</pre> 4810 4811<p>Note how the extension function is registered with the context (but that 4812part is not yet finalized, this may change slightly in the future).</p> 4813 4814<h3>tstxpath.py:</h3> 4815 4816<p>This test is similar to the previous one but shows how the extension 4817function can access the XPath evaluation context:</p> 4818<pre>def foo(ctx, x): 4819 global called 4820 4821 # 4822 # test that access to the XPath evaluation contexts 4823 # 4824 pctxt = libxml2.xpathParserContext(_obj=ctx) 4825 ctxt = pctxt.context() 4826 called = ctxt.function() 4827 return x + 1</pre> 4828 4829<p>All the interfaces around the XPath parser(or rather evaluation) context 4830are not finalized, but it should be sufficient to do contextual work at the 4831evaluation point.</p> 4832 4833<h3>Memory debugging:</h3> 4834 4835<p>last but not least, all tests starts with the following prologue:</p> 4836<pre>#memory debug specific 4837libxml2.debugMemory(1)</pre> 4838 4839<p>and ends with the following epilogue:</p> 4840<pre>#memory debug specific 4841libxml2.cleanupParser() 4842if libxml2.debugMemory(1) == 0: 4843 print "OK" 4844else: 4845 print "Memory leak %d bytes" % (libxml2.debugMemory(1)) 4846 libxml2.dumpMemory()</pre> 4847 4848<p>Those activate the memory debugging interface of libxml2 where all 4849allocated block in the library are tracked. The prologue then cleans up the 4850library state and checks that all allocated memory has been freed. If not it 4851calls dumpMemory() which saves that list in a <code>.memdump</code> file.</p> 4852 4853<h2><a name="architecture">libxml2 architecture</a></h2> 4854 4855<p>Libxml2 is made of multiple components; some of them are optional, and 4856most of the block interfaces are public. The main components are:</p> 4857<ul> 4858 <li>an Input/Output layer</li> 4859 <li>FTP and HTTP client layers (optional)</li> 4860 <li>an Internationalization layer managing the encodings support</li> 4861 <li>a URI module</li> 4862 <li>the XML parser and its basic SAX interface</li> 4863 <li>an HTML parser using the same SAX interface (optional)</li> 4864 <li>a SAX tree module to build an in-memory DOM representation</li> 4865 <li>a tree module to manipulate the DOM representation</li> 4866 <li>a validation module using the DOM representation (optional)</li> 4867 <li>an XPath module for global lookup in a DOM representation 4868 (optional)</li> 4869 <li>a debug module (optional)</li> 4870</ul> 4871 4872<p>Graphically this gives the following:</p> 4873 4874<p><img src="libxml.gif" alt="a graphical view of the various"></p> 4875 4876<p></p> 4877 4878<h2><a name="tree">The tree output</a></h2> 4879 4880<p>The parser returns a tree built during the document analysis. The value 4881returned is an <strong>xmlDocPtr</strong> (i.e., a pointer to an 4882<strong>xmlDoc</strong> structure). This structure contains information such 4883as the file name, the document type, and a <strong>children</strong> pointer 4884which is the root of the document (or more exactly the first child under the 4885root which is the document). The tree is made of <strong>xmlNode</strong>s, 4886chained in double-linked lists of siblings and with a children<->parent 4887relationship. An xmlNode can also carry properties (a chain of xmlAttr 4888structures). An attribute may have a value which is a list of TEXT or 4889ENTITY_REF nodes.</p> 4890 4891<p>Here is an example (erroneous with respect to the XML spec since there 4892should be only one ELEMENT under the root):</p> 4893 4894<p><img src="structure.gif" alt=" structure.gif "></p> 4895 4896<p>In the source package there is a small program (not installed by default) 4897called <strong>xmllint</strong> which parses XML files given as argument and 4898prints them back as parsed. This is useful for detecting errors both in XML 4899code and in the XML parser itself. It has an option <strong>--debug</strong> 4900which prints the actual in-memory structure of the document; here is the 4901result with the <a href="#example">example</a> given before:</p> 4902<pre>DOCUMENT 4903version=1.0 4904standalone=true 4905 ELEMENT EXAMPLE 4906 ATTRIBUTE prop1 4907 TEXT 4908 content=gnome is great 4909 ATTRIBUTE prop2 4910 ENTITY_REF 4911 TEXT 4912 content= linux too 4913 ELEMENT head 4914 ELEMENT title 4915 TEXT 4916 content=Welcome to Gnome 4917 ELEMENT chapter 4918 ELEMENT title 4919 TEXT 4920 content=The Linux adventure 4921 ELEMENT p 4922 TEXT 4923 content=bla bla bla ... 4924 ELEMENT image 4925 ATTRIBUTE href 4926 TEXT 4927 content=linus.gif 4928 ELEMENT p 4929 TEXT 4930 content=...</pre> 4931 4932<p>This should be useful for learning the internal representation model.</p> 4933 4934<h2><a name="interface">The SAX interface</a></h2> 4935 4936<p>Sometimes the DOM tree output is just too large to fit reasonably into 4937memory. In that case (and if you don't expect to save back the XML document 4938loaded using libxml), it's better to use the SAX interface of libxml. SAX is 4939a <strong>callback-based interface</strong> to the parser. Before parsing, 4940the application layer registers a customized set of callbacks which are 4941called by the library as it progresses through the XML input.</p> 4942 4943<p>To get more detailed step-by-step guidance on using the SAX interface of 4944libxml, see the <a 4945href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">nice 4946documentation</a>.written by <a href="mailto:james@daa.com.au">James 4947Henstridge</a>.</p> 4948 4949<p>You can debug the SAX behaviour by using the <strong>testSAX</strong> 4950program located in the gnome-xml module (it's usually not shipped in the 4951binary packages of libxml, but you can find it in the tar source 4952distribution). Here is the sequence of callbacks that would be reported by 4953testSAX when parsing the example XML document shown earlier:</p> 4954<pre>SAX.setDocumentLocator() 4955SAX.startDocument() 4956SAX.getEntity(amp) 4957SAX.startElement(EXAMPLE, prop1='gnome is great', prop2='&amp; linux too') 4958SAX.characters( , 3) 4959SAX.startElement(head) 4960SAX.characters( , 4) 4961SAX.startElement(title) 4962SAX.characters(Welcome to Gnome, 16) 4963SAX.endElement(title) 4964SAX.characters( , 3) 4965SAX.endElement(head) 4966SAX.characters( , 3) 4967SAX.startElement(chapter) 4968SAX.characters( , 4) 4969SAX.startElement(title) 4970SAX.characters(The Linux adventure, 19) 4971SAX.endElement(title) 4972SAX.characters( , 4) 4973SAX.startElement(p) 4974SAX.characters(bla bla bla ..., 15) 4975SAX.endElement(p) 4976SAX.characters( , 4) 4977SAX.startElement(image, href='linus.gif') 4978SAX.endElement(image) 4979SAX.characters( , 4) 4980SAX.startElement(p) 4981SAX.characters(..., 3) 4982SAX.endElement(p) 4983SAX.characters( , 3) 4984SAX.endElement(chapter) 4985SAX.characters( , 1) 4986SAX.endElement(EXAMPLE) 4987SAX.endDocument()</pre> 4988 4989<p>Most of the other interfaces of libxml2 are based on the DOM tree-building 4990facility, so nearly everything up to the end of this document presupposes the 4991use of the standard DOM tree build. Note that the DOM tree itself is built by 4992a set of registered default callbacks, without internal specific 4993interface.</p> 4994 4995<h2><a name="Validation">Validation & DTDs</a></h2> 4996 4997<p>Table of Content:</p> 4998<ol> 4999 <li><a href="#General5">General overview</a></li> 5000 <li><a href="#definition">The definition</a></li> 5001 <li><a href="#Simple">Simple rules</a> 5002 <ol> 5003 <li><a href="#reference">How to reference a DTD from a document</a></li> 5004 <li><a href="#Declaring">Declaring elements</a></li> 5005 <li><a href="#Declaring1">Declaring attributes</a></li> 5006 </ol> 5007 </li> 5008 <li><a href="#Some">Some examples</a></li> 5009 <li><a href="#validate">How to validate</a></li> 5010 <li><a href="#Other">Other resources</a></li> 5011</ol> 5012 5013<h3><a name="General5">General overview</a></h3> 5014 5015<p>Well what is validation and what is a DTD ?</p> 5016 5017<p>DTD is the acronym for Document Type Definition. This is a description of 5018the content for a family of XML files. This is part of the XML 1.0 5019specification, and allows one to describe and verify that a given document 5020instance conforms to the set of rules detailing its structure and content.</p> 5021 5022<p>Validation is the process of checking a document against a DTD (more 5023generally against a set of construction rules).</p> 5024 5025<p>The validation process and building DTDs are the two most difficult parts 5026of the XML life cycle. Briefly a DTD defines all the possible elements to be 5027found within your document, what is the formal shape of your document tree 5028(by defining the allowed content of an element; either text, a regular 5029expression for the allowed list of children, or mixed content i.e. both text 5030and children). The DTD also defines the valid attributes for all elements and 5031the types of those attributes.</p> 5032 5033<h3><a name="definition1">The definition</a></h3> 5034 5035<p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a 5036href="http://www.xml.com/axml/axml.html">Tim Bray's annotated version of 5037Rev1</a>):</p> 5038<ul> 5039 <li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring 5040 elements</a></li> 5041 <li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring 5042 attributes</a></li> 5043</ul> 5044 5045<p>(unfortunately) all this is inherited from the SGML world, the syntax is 5046ancient...</p> 5047 5048<h3><a name="Simple1">Simple rules</a></h3> 5049 5050<p>Writing DTDs can be done in many ways. The rules to build them if you need 5051something permanent or something which can evolve over time can be radically 5052different. Really complex DTDs like DocBook ones are flexible but quite 5053harder to design. I will just focus on DTDs for a formats with a fixed simple 5054structure. It is just a set of basic rules, and definitely not exhaustive nor 5055usable for complex DTD design.</p> 5056 5057<h4><a name="reference1">How to reference a DTD from a document</a>:</h4> 5058 5059<p>Assuming the top element of the document is <code>spec</code> and the dtd 5060is placed in the file <code>mydtd</code> in the subdirectory 5061<code>dtds</code> of the directory from where the document were loaded:</p> 5062 5063<p><code><!DOCTYPE spec SYSTEM "dtds/mydtd"></code></p> 5064 5065<p>Notes:</p> 5066<ul> 5067 <li>The system string is actually an URI-Reference (as defined in <a 5068 href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a 5069 full URL string indicating the location of your DTD on the Web. This is a 5070 really good thing to do if you want others to validate your document.</li> 5071 <li>It is also possible to associate a <code>PUBLIC</code> identifier (a 5072 magic string) so that the DTD is looked up in catalogs on the client side 5073 without having to locate it on the web.</li> 5074 <li>A DTD contains a set of element and attribute declarations, but they 5075 don't define what the root of the document should be. This is explicitly 5076 told to the parser/validator as the first element of the 5077 <code>DOCTYPE</code> declaration.</li> 5078</ul> 5079 5080<h4><a name="Declaring2">Declaring elements</a>:</h4> 5081 5082<p>The following declares an element <code>spec</code>:</p> 5083 5084<p><code><!ELEMENT spec (front, body, back?)></code></p> 5085 5086<p>It also expresses that the spec element contains one <code>front</code>, 5087one <code>body</code> and one optional <code>back</code> children elements in 5088this order. The declaration of one element of the structure and its content 5089are done in a single declaration. Similarly the following declares 5090<code>div1</code> elements:</p> 5091 5092<p><code><!ELEMENT div1 (head, (p | list | note)*, div2?)></code></p> 5093 5094<p>which means div1 contains one <code>head</code> then a series of optional 5095<code>p</code>, <code>list</code>s and <code>note</code>s and then an 5096optional <code>div2</code>. And last but not least an element can contain 5097text:</p> 5098 5099<p><code><!ELEMENT b (#PCDATA)></code></p> 5100 5101<p><code>b</code> contains text or being of mixed content (text and elements 5102in no particular order):</p> 5103 5104<p><code><!ELEMENT p (#PCDATA|a|ul|b|i|em)*></code></p> 5105 5106<p><code>p </code>can contain text or <code>a</code>, <code>ul</code>, 5107<code>b</code>, <code>i </code>or <code>em</code> elements in no particular 5108order.</p> 5109 5110<h4><a name="Declaring1">Declaring attributes</a>:</h4> 5111 5112<p>Again the attributes declaration includes their content definition:</p> 5113 5114<p><code><!ATTLIST termdef name CDATA #IMPLIED></code></p> 5115 5116<p>means that the element <code>termdef</code> can have a <code>name</code> 5117attribute containing text (<code>CDATA</code>) and which is optional 5118(<code>#IMPLIED</code>). The attribute value can also be defined within a 5119set:</p> 5120 5121<p><code><!ATTLIST list type (bullets|ordered|glossary) 5122"ordered"></code></p> 5123 5124<p>means <code>list</code> element have a <code>type</code> attribute with 3 5125allowed values "bullets", "ordered" or "glossary" and which default to 5126"ordered" if the attribute is not explicitly specified.</p> 5127 5128<p>The content type of an attribute can be text (<code>CDATA</code>), 5129anchor/reference/references 5130(<code>ID</code>/<code>IDREF</code>/<code>IDREFS</code>), entity(ies) 5131(<code>ENTITY</code>/<code>ENTITIES</code>) or name(s) 5132(<code>NMTOKEN</code>/<code>NMTOKENS</code>). The following defines that a 5133<code>chapter</code> element can have an optional <code>id</code> attribute 5134of type <code>ID</code>, usable for reference from attribute of type 5135IDREF:</p> 5136 5137<p><code><!ATTLIST chapter id ID #IMPLIED></code></p> 5138 5139<p>The last value of an attribute definition can be <code>#REQUIRED 5140</code>meaning that the attribute has to be given, <code>#IMPLIED</code> 5141meaning that it is optional, or the default value (possibly prefixed by 5142<code>#FIXED</code> if it is the only allowed).</p> 5143 5144<p>Notes:</p> 5145<ul> 5146 <li>Usually the attributes pertaining to a given element are declared in a 5147 single expression, but it is just a convention adopted by a lot of DTD 5148 writers: 5149 <pre><!ATTLIST termdef 5150 id ID #REQUIRED 5151 name CDATA #IMPLIED></pre> 5152 <p>The previous construct defines both <code>id</code> and 5153 <code>name</code> attributes for the element <code>termdef</code>.</p> 5154 </li> 5155</ul> 5156 5157<h3><a name="Some1">Some examples</a></h3> 5158 5159<p>The directory <code>test/valid/dtds/</code> in the libxml2 distribution 5160contains some complex DTD examples. The example in the file 5161<code>test/valid/dia.xml</code> shows an XML file where the simple DTD is 5162directly included within the document.</p> 5163 5164<h3><a name="validate1">How to validate</a></h3> 5165 5166<p>The simplest way is to use the xmllint program included with libxml. The 5167<code>--valid</code> option turns-on validation of the files given as input. 5168For example the following validates a copy of the first revision of the XML 51691.0 specification:</p> 5170 5171<p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p> 5172 5173<p>the -- noout is used to disable output of the resulting tree.</p> 5174 5175<p>The <code>--dtdvalid dtd</code> allows validation of the document(s) 5176against a given DTD.</p> 5177 5178<p>Libxml2 exports an API to handle DTDs and validation, check the <a 5179href="http://xmlsoft.org/html/libxml-valid.html">associated 5180description</a>.</p> 5181 5182<h3><a name="Other1">Other resources</a></h3> 5183 5184<p>DTDs are as old as SGML. So there may be a number of examples on-line, I 5185will just list one for now, others pointers welcome:</p> 5186<ul> 5187 <li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li> 5188</ul> 5189 5190<p>I suggest looking at the examples found under test/valid/dtd and any of 5191the large number of books available on XML. The dia example in test/valid 5192should be both simple and complete enough to allow you to build your own.</p> 5193 5194<p></p> 5195 5196<h2><a name="Memory">Memory Management</a></h2> 5197 5198<p>Table of Content:</p> 5199<ol> 5200 <li><a href="#General3">General overview</a></li> 5201 <li><a href="#setting">Setting libxml2 set of memory routines</a></li> 5202 <li><a href="#cleanup">Cleaning up after using the library</a></li> 5203 <li><a href="#Debugging">Debugging routines</a></li> 5204 <li><a href="#General4">General memory requirements</a></li> 5205 <li><a href="#Compacting">Returning memory to the kernel</a></li> 5206</ol> 5207 5208<h3><a name="General3">General overview</a></h3> 5209 5210<p>The module <code><a 5211href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code> 5212provides the interfaces to the libxml2 memory system:</p> 5213<ul> 5214 <li>libxml2 does not use the libc memory allocator directly but xmlFree(), 5215 xmlMalloc() and xmlRealloc()</li> 5216 <li>those routines can be reallocated to a specific set of routine, by 5217 default the libc ones i.e. free(), malloc() and realloc()</li> 5218 <li>the xmlmemory.c module includes a set of debugging routine</li> 5219</ul> 5220 5221<h3><a name="setting">Setting libxml2 set of memory routines</a></h3> 5222 5223<p>It is sometimes useful to not use the default memory allocator, either for 5224debugging, analysis or to implement a specific behaviour on memory management 5225(like on embedded systems). Two function calls are available to do so:</p> 5226<ul> 5227 <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet 5228 ()</a> which return the current set of functions in use by the parser</li> 5229 <li><a 5230 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a> 5231 which allow to set up a new set of memory allocation functions</li> 5232</ul> 5233 5234<p>Of course a call to xmlMemSetup() should probably be done before calling 5235any other libxml2 routines (unless you are sure your allocations routines are 5236compatibles).</p> 5237 5238<h3><a name="cleanup">Cleaning up after using the library</a></h3> 5239 5240<p>Libxml2 is not stateless, there is a few set of memory structures needing 5241allocation before the parser is fully functional (some encoding structures 5242for example). This also mean that once parsing is finished there is a tiny 5243amount of memory (a few hundred bytes) which can be recollected if you don't 5244reuse the library or any document built with it:</p> 5245<ul> 5246 <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlCleanupParser 5247 ()</a> is a centralized routine to free the library state and data. Note 5248 that it won't deallocate any produced tree if any (use the xmlFreeDoc() 5249 and related routines for this). This should be called only when the library 5250 is not used anymore.</li> 5251 <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser 5252 ()</a> is the dual routine allowing to preallocate the parsing state 5253 which can be useful for example to avoid initialization reentrancy 5254 problems when using libxml2 in multithreaded applications</li> 5255</ul> 5256 5257<p>Generally xmlCleanupParser() is safe assuming no parsing is ongoing and 5258no document is still being used, if needed the state will be rebuild at the 5259next invocation of parser routines (or by xmlInitParser()), but be careful 5260of the consequences in multithreaded applications.</p> 5261 5262<h3><a name="Debugging">Debugging routines</a></h3> 5263 5264<p>When configured using --with-mem-debug flag (off by default), libxml2 uses 5265a set of memory allocation debugging routines keeping track of all allocated 5266blocks and the location in the code where the routine was called. A couple of 5267other debugging routines allow to dump the memory allocated infos to a file 5268or call a specific routine when a given block number is allocated:</p> 5269<ul> 5270 <li><a 5271 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a> 5272 <a 5273 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a> 5274 and <a 5275 href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a> 5276 are the memory debugging replacement allocation routines</li> 5277 <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump 5278 ()</a> dumps all the information about the allocated memory block lefts 5279 in the <code>.memdump</code> file</li> 5280</ul> 5281 5282<p>When developing libxml2 memory debug is enabled, the tests programs call 5283xmlMemoryDump () and the "make test" regression tests will check for any 5284memory leak during the full regression test sequence, this helps a lot 5285ensuring that libxml2 does not leak memory and bullet proof memory 5286allocations use (some libc implementations are known to be far too permissive 5287resulting in major portability problems!).</p> 5288 5289<p>If the .memdump reports a leak, it displays the allocation function and 5290also tries to give some information about the content and structure of the 5291allocated blocks left. This is sufficient in most cases to find the culprit, 5292but not always. Assuming the allocation problem is reproducible, it is 5293possible to find more easily:</p> 5294<ol> 5295 <li>write down the block number xxxx not allocated</li> 5296 <li>export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest 5297 when using GDB is to simply give the command 5298 <p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p> 5299 <p>before running the program.</p> 5300 </li> 5301 <li>run the program under a debugger and set a breakpoint on 5302 xmlMallocBreakpoint() a specific function called when this precise block 5303 is allocated</li> 5304 <li>when the breakpoint is reached you can then do a fine analysis of the 5305 allocation an step to see the condition resulting in the missing 5306 deallocation.</li> 5307</ol> 5308 5309<p>I used to use a commercial tool to debug libxml2 memory problems but after 5310noticing that it was not detecting memory leaks that simple mechanism was 5311used and proved extremely efficient until now. Lately I have also used <a 5312href="http://developer.kde.org/~sewardj/">valgrind</a> with quite some 5313success, it is tied to the i386 architecture since it works by emulating the 5314processor and instruction set, it is slow but extremely efficient, i.e. it 5315spot memory usage errors in a very precise way.</p> 5316 5317<h3><a name="General4">General memory requirements</a></h3> 5318 5319<p>How much libxml2 memory require ? It's hard to tell in average it depends 5320of a number of things:</p> 5321<ul> 5322 <li>the parser itself should work in a fixed amount of memory, except for 5323 information maintained about the stacks of names and entities locations. 5324 The I/O and encoding handlers will probably account for a few KBytes. 5325 This is true for both the XML and HTML parser (though the HTML parser 5326 need more state).</li> 5327 <li>If you are generating the DOM tree then memory requirements will grow 5328 nearly linear with the size of the data. In general for a balanced 5329 textual document the internal memory requirement is about 4 times the 5330 size of the UTF8 serialization of this document (example the XML-1.0 5331 recommendation is a bit more of 150KBytes and takes 650KBytes of main 5332 memory when parsed). Validation will add a amount of memory required for 5333 maintaining the external Dtd state which should be linear with the 5334 complexity of the content model defined by the Dtd</li> 5335 <li>If you need to work with fixed memory requirements or don't need the 5336 full DOM tree then using the <a href="xmlreader.html">xmlReader 5337 interface</a> is probably the best way to proceed, it still allows to 5338 validate or operate on subset of the tree if needed.</li> 5339 <li>If you don't care about the advanced features of libxml2 like 5340 validation, DOM, XPath or XPointer, don't use entities, need to work with 5341 fixed memory requirements, and try to get the fastest parsing possible 5342 then the SAX interface should be used, but it has known restrictions.</li> 5343</ul> 5344 5345<p></p> 5346<h3><a name="Compacting">Returning memory to the kernel</a></h3> 5347 5348<p>You may encounter that your process using libxml2 does not have a 5349reduced memory usage although you freed the trees. This is because 5350libxml2 allocates memory in a number of small chunks. When freeing one 5351of those chunks, the OS may decide that giving this little memory back 5352to the kernel will cause too much overhead and delay the operation. As 5353all chunks are this small, they get actually freed but not returned to 5354the kernel. On systems using glibc, there is a function call 5355"malloc_trim" from malloc.h which does this missing operation (note that 5356it is allowed to fail). Thus, after freeing your tree you may simply try 5357"malloc_trim(0);" to really get the memory back. If your OS does not 5358provide malloc_trim, try searching for a similar function.</p> 5359<p></p> 5360 5361<h2><a name="Encodings">Encodings support</a></h2> 5362 5363<p>If you are not really familiar with Internationalization (usual shortcut 5364is I18N) , Unicode, characters and glyphs, I suggest you read a <a 5365href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> 5366by Tim Bray on Unicode and why you should care about it.</p> 5367 5368<p>If you don't understand why <b>it does not make sense to have a string 5369without knowing what encoding it uses</b>, then as Joel Spolsky said <a 5370href="http://www.joelonsoftware.com/articles/Unicode.html">please do not 5371write another line of code until you finish reading that article.</a>. It is 5372a prerequisite to understand this page, and avoid a lot of problems with 5373libxml2, XML or text processing in general.</p> 5374 5375<p>Table of Content:</p> 5376<ol> 5377 <li><a href="encoding.html#What">What does internationalization support 5378 mean ?</a></li> 5379 <li><a href="encoding.html#internal">The internal encoding, how and 5380 why</a></li> 5381 <li><a href="encoding.html#implemente">How is it implemented ?</a></li> 5382 <li><a href="encoding.html#Default">Default supported encodings</a></li> 5383 <li><a href="encoding.html#extend">How to extend the existing 5384 support</a></li> 5385</ol> 5386 5387<h3><a name="What">What does internationalization support mean ?</a></h3> 5388 5389<p>XML was designed from the start to allow the support of any character set 5390by using Unicode. Any conformant XML parser has to support the UTF-8 and 5391UTF-16 default encodings which can both express the full unicode ranges. UTF8 5392is a variable length encoding whose greatest points are to reuse the same 5393encoding for ASCII and to save space for Western encodings, but it is a bit 5394more complex to handle in practice. UTF-16 use 2 bytes per character (and 5395sometimes combines two pairs), it makes implementation easier, but looks a 5396bit overkill for Western languages encoding. Moreover the XML specification 5397allows the document to be encoded in other encodings at the condition that 5398they are clearly labeled as such. For example the following is a wellformed 5399XML document encoded in ISO-8859-1 and using accentuated letters that we 5400French like for both markup and content:</p> 5401<pre><?xml version="1.0" encoding="ISO-8859-1"?> 5402<très>là </très></pre> 5403 5404<p>Having internationalization support in libxml2 means the following:</p> 5405<ul> 5406 <li>the document is properly parsed</li> 5407 <li>information about it's encoding is saved</li> 5408 <li>it can be modified</li> 5409 <li>it can be saved in its original encoding</li> 5410 <li>it can also be saved in another encoding supported by libxml2 (for 5411 example straight UTF8 or even an ASCII form)</li> 5412</ul> 5413 5414<p>Another very important point is that the whole libxml2 API, with the 5415exception of a few routines to read with a specific encoding or save to a 5416specific encoding, is completely agnostic about the original encoding of the 5417document.</p> 5418 5419<p>It should be noted too that the HTML parser embedded in libxml2 now obey 5420the same rules too, the following document will be (as of 2.2.2) handled in 5421an internationalized fashion by libxml2 too:</p> 5422<pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 5423 "http://www.w3.org/TR/REC-html40/loose.dtd"> 5424<html lang="fr"> 5425<head> 5426 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> 5427</head> 5428<body> 5429<p>W3C crée des standards pour le Web.</body> 5430</html></pre> 5431 5432<h3><a name="internal">The internal encoding, how and why</a></h3> 5433 5434<p>One of the core decisions was to force all documents to be converted to a 5435default internal encoding, and that encoding to be UTF-8, here are the 5436rationales for those choices:</p> 5437<ul> 5438 <li>keeping the native encoding in the internal form would force the libxml 5439 users (or the code associated) to be fully aware of the encoding of the 5440 original document, for examples when adding a text node to a document, 5441 the content would have to be provided in the document encoding, i.e. the 5442 client code would have to check it before hand, make sure it's conformant 5443 to the encoding, etc ... Very hard in practice, though in some specific 5444 cases this may make sense.</li> 5445 <li>the second decision was which encoding. From the XML spec only UTF8 and 5446 UTF16 really makes sense as being the two only encodings for which there 5447 is mandatory support. UCS-4 (32 bits fixed size encoding) could be 5448 considered an intelligent choice too since it's a direct Unicode mapping 5449 support. I selected UTF-8 on the basis of efficiency and compatibility 5450 with surrounding software: 5451 <ul> 5452 <li>UTF-8 while a bit more complex to convert from/to (i.e. slightly 5453 more costly to import and export CPU wise) is also far more compact 5454 than UTF-16 (and UCS-4) for a majority of the documents I see it used 5455 for right now (RPM RDF catalogs, advogato data, various configuration 5456 file formats, etc.) and the key point for today's computer 5457 architecture is efficient uses of caches. If one nearly double the 5458 memory requirement to store the same amount of data, this will trash 5459 caches (main memory/external caches/internal caches) and my take is 5460 that this harms the system far more than the CPU requirements needed 5461 for the conversion to UTF-8</li> 5462 <li>Most of libxml2 version 1 users were using it with straight ASCII 5463 most of the time, doing the conversion with an internal encoding 5464 requiring all their code to be rewritten was a serious show-stopper 5465 for using UTF-16 or UCS-4.</li> 5466 <li>UTF-8 is being used as the de-facto internal encoding standard for 5467 related code like the <a href="http://www.pango.org/">pango</a> 5468 upcoming Gnome text widget, and a lot of Unix code (yet another place 5469 where Unix programmer base takes a different approach from Microsoft 5470 - they are using UTF-16)</li> 5471 </ul> 5472 </li> 5473</ul> 5474 5475<p>What does this mean in practice for the libxml2 user:</p> 5476<ul> 5477 <li>xmlChar, the libxml2 data type is a byte, those bytes must be assembled 5478 as UTF-8 valid strings. The proper way to terminate an xmlChar * string 5479 is simply to append 0 byte, as usual.</li> 5480 <li>One just need to make sure that when using chars outside the ASCII set, 5481 the values has been properly converted to UTF-8</li> 5482</ul> 5483 5484<h3><a name="implemente">How is it implemented ?</a></h3> 5485 5486<p>Let's describe how all this works within libxml, basically the I18N 5487(internationalization) support get triggered only during I/O operation, i.e. 5488when reading a document or saving one. Let's look first at the reading 5489sequence:</p> 5490<ol> 5491 <li>when a document is processed, we usually don't know the encoding, a 5492 simple heuristic allows to detect UTF-16 and UCS-4 from encodings where 5493 the ASCII range (0-0x7F) maps with ASCII</li> 5494 <li>the xml declaration if available is parsed, including the encoding 5495 declaration. At that point, if the autodetected encoding is different 5496 from the one declared a call to xmlSwitchEncoding() is issued.</li> 5497 <li>If there is no encoding declaration, then the input has to be in either 5498 UTF-8 or UTF-16, if it is not then at some point when processing the 5499 input, the converter/checker of UTF-8 form will raise an encoding error. 5500 You may end-up with a garbled document, or no document at all ! Example: 5501 <pre>~/XML -> ./xmllint err.xml 5502err.xml:1: error: Input is not proper UTF-8, indicate encoding ! 5503<très>là </très> 5504 ^ 5505err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C 5506<très>là </très> 5507 ^</pre> 5508 </li> 5509 <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and 5510 then search the default registered encoding converters for that encoding. 5511 If it's not within the default set and iconv() support has been compiled 5512 it, it will ask iconv for such an encoder. If this fails then the parser 5513 will report an error and stops processing: 5514 <pre>~/XML -> ./xmllint err2.xml 5515err2.xml:1: error: Unsupported encoding UnsupportedEnc 5516<?xml version="1.0" encoding="UnsupportedEnc"?> 5517 ^</pre> 5518 </li> 5519 <li>From that point the encoder processes progressively the input (it is 5520 plugged as a front-end to the I/O module) for that entity. It captures 5521 and converts on-the-fly the document to be parsed to UTF-8. The parser 5522 itself just does UTF-8 checking of this input and process it 5523 transparently. The only difference is that the encoding information has 5524 been added to the parsing context (more precisely to the input 5525 corresponding to this entity).</li> 5526 <li>The result (when using DOM) is an internal form completely in UTF-8 5527 with just an encoding information on the document node.</li> 5528</ol> 5529 5530<p>Ok then what happens when saving the document (assuming you 5531collected/built an xmlDoc DOM like structure) ? It depends on the function 5532called, xmlSaveFile() will just try to save in the original encoding, while 5533xmlSaveFileTo() and xmlSaveFileEnc() can optionally save to a given 5534encoding:</p> 5535<ol> 5536 <li>if no encoding is given, libxml2 will look for an encoding value 5537 associated to the document and if it exists will try to save to that 5538 encoding, 5539 <p>otherwise everything is written in the internal form, i.e. UTF-8</p> 5540 </li> 5541 <li>so if an encoding was specified, either at the API level or on the 5542 document, libxml2 will again canonicalize the encoding name, lookup for a 5543 converter in the registered set or through iconv. If not found the 5544 function will return an error code</li> 5545 <li>the converter is placed before the I/O buffer layer, as another kind of 5546 buffer, then libxml2 will simply push the UTF-8 serialization to through 5547 that buffer, which will then progressively be converted and pushed onto 5548 the I/O layer.</li> 5549 <li>It is possible that the converter code fails on some input, for example 5550 trying to push an UTF-8 encoded Chinese character through the UTF-8 to 5551 ISO-8859-1 converter won't work. Since the encoders are progressive they 5552 will just report the error and the number of bytes converted, at that 5553 point libxml2 will decode the offending character, remove it from the 5554 buffer and replace it with the associated charRef encoding &#123; and 5555 resume the conversion. This guarantees that any document will be saved 5556 without losses (except for markup names where this is not legal, this is 5557 a problem in the current version, in practice avoid using non-ascii 5558 characters for tag or attribute names). A special "ascii" encoding name 5559 is used to save documents to a pure ascii form can be used when 5560 portability is really crucial</li> 5561</ol> 5562 5563<p>Here are a few examples based on the same test document and assumin a 5564terminal using ISO-8859-1 as the text encoding:</p> 5565<pre>~/XML -> ./xmllint isolat1 5566<?xml version="1.0" encoding="ISO-8859-1"?> 5567<très>là </très> 5568~/XML -> ./xmllint --encode UTF-8 isolat1 5569<?xml version="1.0" encoding="UTF-8"?> 5570<très>là </très> 5571~/XML -> </pre> 5572 5573<p>The same processing is applied (and reuse most of the code) for HTML I18N 5574processing. Looking up and modifying the content encoding is a bit more 5575difficult since it is located in a <meta> tag under the <head>, 5576so a couple of functions htmlGetMetaEncoding() and htmlSetMetaEncoding() have 5577been provided. The parser also attempts to switch encoding on the fly when 5578detecting such a tag on input. Except for that the processing is the same 5579(and again reuses the same code).</p> 5580 5581<h3><a name="Default">Default supported encodings</a></h3> 5582 5583<p>libxml2 has a set of default converters for the following encodings 5584(located in encoding.c):</p> 5585<ol> 5586 <li>UTF-8 is supported by default (null handlers)</li> 5587 <li>UTF-16, both little and big endian</li> 5588 <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li> 5589 <li>ASCII, useful mostly for saving</li> 5590 <li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML 5591 predefined entities like &copy; for the Copyright sign.</li> 5592</ol> 5593 5594<p>More over when compiled on an Unix platform with iconv support the full 5595set of encodings supported by iconv can be instantly be used by libxml. On a 5596linux machine with glibc-2.1 the list of supported encodings and aliases fill 55973 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the 5598various Japanese ones.</p> 5599 5600<p>To convert from the UTF-8 values returned from the API to another encoding 5601then it is possible to use the function provided from <a 5602href="html/libxml-encoding.html">the encoding module</a> like <a 5603href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the 5604POSIX <a 5605href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a> 5606API directly.</p> 5607 5608<h4>Encoding aliases</h4> 5609 5610<p>From 2.2.3, libxml2 has support to register encoding names aliases. The 5611goal is to be able to parse document whose encoding is supported but where 5612the name differs (for example from the default set of names accepted by 5613iconv). The following functions allow to register and handle new aliases for 5614existing encodings. Once registered libxml2 will automatically lookup the 5615aliases when handling a document:</p> 5616<ul> 5617 <li>int xmlAddEncodingAlias(const char *name, const char *alias);</li> 5618 <li>int xmlDelEncodingAlias(const char *alias);</li> 5619 <li>const char * xmlGetEncodingAlias(const char *alias);</li> 5620 <li>void xmlCleanupEncodingAliases(void);</li> 5621</ul> 5622 5623<h3><a name="extend">How to extend the existing support</a></h3> 5624 5625<p>Well adding support for new encoding, or overriding one of the encoders 5626(assuming it is buggy) should not be hard, just write input and output 5627conversion routines to/from UTF-8, and register them using 5628xmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they will be 5629called automatically if the parser(s) encounter such an encoding name 5630(register it uppercase, this will help). The description of the encoders, 5631their arguments and expected return values are described in the encoding.h 5632header.</p> 5633 5634<h2><a name="IO">I/O Interfaces</a></h2> 5635 5636<p>Table of Content:</p> 5637<ol> 5638 <li><a href="#General1">General overview</a></li> 5639 <li><a href="#basic">The basic buffer type</a></li> 5640 <li><a href="#Input">Input I/O handlers</a></li> 5641 <li><a href="#Output">Output I/O handlers</a></li> 5642 <li><a href="#entities">The entities loader</a></li> 5643 <li><a href="#Example2">Example of customized I/O</a></li> 5644</ol> 5645 5646<h3><a name="General1">General overview</a></h3> 5647 5648<p>The module <code><a 5649href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides 5650the interfaces to the libxml2 I/O system. This consists of 4 main parts:</p> 5651<ul> 5652 <li>Entities loader, this is a routine which tries to fetch the entities 5653 (files) based on their PUBLIC and SYSTEM identifiers. The default loader 5654 don't look at the public identifier since libxml2 do not maintain a 5655 catalog. You can redefine you own entity loader by using 5656 <code>xmlGetExternalEntityLoader()</code> and 5657 <code>xmlSetExternalEntityLoader()</code>. <a href="#entities">Check the 5658 example</a>.</li> 5659 <li>Input I/O buffers which are a commodity structure used by the parser(s) 5660 input layer to handle fetching the information to feed the parser. This 5661 provides buffering and is also a placeholder where the encoding 5662 converters to UTF8 are piggy-backed.</li> 5663 <li>Output I/O buffers are similar to the Input ones and fulfill similar 5664 task but when generating a serialization from a tree.</li> 5665 <li>A mechanism to register sets of I/O callbacks and associate them with 5666 specific naming schemes like the protocol part of the URIs. 5667 <p>This affect the default I/O operations and allows to use specific I/O 5668 handlers for certain names.</p> 5669 </li> 5670</ul> 5671 5672<p>The general mechanism used when loading http://rpmfind.net/xml.html for 5673example in the HTML parser is the following:</p> 5674<ol> 5675 <li>The default entity loader calls <code>xmlNewInputFromFile()</code> with 5676 the parsing context and the URI string.</li> 5677 <li>the URI string is checked against the existing registered handlers 5678 using their match() callback function, if the HTTP module was compiled 5679 in, it is registered and its match() function will succeeds</li> 5680 <li>the open() function of the handler is called and if successful will 5681 return an I/O Input buffer</li> 5682 <li>the parser will the start reading from this buffer and progressively 5683 fetch information from the resource, calling the read() function of the 5684 handler until the resource is exhausted</li> 5685 <li>if an encoding change is detected it will be installed on the input 5686 buffer, providing buffering and efficient use of the conversion 5687 routines</li> 5688 <li>once the parser has finished, the close() function of the handler is 5689 called once and the Input buffer and associated resources are 5690 deallocated.</li> 5691</ol> 5692 5693<p>The user defined callbacks are checked first to allow overriding of the 5694default libxml2 I/O routines.</p> 5695 5696<h3><a name="basic">The basic buffer type</a></h3> 5697 5698<p>All the buffer manipulation handling is done using the 5699<code>xmlBuffer</code> type define in <code><a 5700href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a> </code>which is a 5701resizable memory buffer. The buffer allocation strategy can be selected to be 5702either best-fit or use an exponential doubling one (CPU vs. memory use 5703trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and 5704<code>XML_BUFFER_ALLOC_DOUBLEIT</code>, and can be set individually or on a 5705system wide basis using <code>xmlBufferSetAllocationScheme()</code>. A number 5706of functions allows to manipulate buffers with names starting with the 5707<code>xmlBuffer...</code> prefix.</p> 5708 5709<h3><a name="Input">Input I/O handlers</a></h3> 5710 5711<p>An Input I/O handler is a simple structure 5712<code>xmlParserInputBuffer</code> containing a context associated to the 5713resource (file descriptor, or pointer to a protocol handler), the read() and 5714close() callbacks to use and an xmlBuffer. And extra xmlBuffer and a charset 5715encoding handler are also present to support charset conversion when 5716needed.</p> 5717 5718<h3><a name="Output">Output I/O handlers</a></h3> 5719 5720<p>An Output handler <code>xmlOutputBuffer</code> is completely similar to an 5721Input one except the callbacks are write() and close().</p> 5722 5723<h3><a name="entities">The entities loader</a></h3> 5724 5725<p>The entity loader resolves requests for new entities and create inputs for 5726the parser. Creating an input from a filename or an URI string is done 5727through the xmlNewInputFromFile() routine. The default entity loader do not 5728handle the PUBLIC identifier associated with an entity (if any). So it just 5729calls xmlNewInputFromFile() with the SYSTEM identifier (which is mandatory in 5730XML).</p> 5731 5732<p>If you want to hook up a catalog mechanism then you simply need to 5733override the default entity loader, here is an example:</p> 5734<pre>#include <libxml/xmlIO.h> 5735 5736xmlExternalEntityLoader defaultLoader = NULL; 5737 5738xmlParserInputPtr 5739xmlMyExternalEntityLoader(const char *URL, const char *ID, 5740 xmlParserCtxtPtr ctxt) { 5741 xmlParserInputPtr ret; 5742 const char *fileID = NULL; 5743 /* lookup for the fileID depending on ID */ 5744 5745 ret = xmlNewInputFromFile(ctxt, fileID); 5746 if (ret != NULL) 5747 return(ret); 5748 if (defaultLoader != NULL) 5749 ret = defaultLoader(URL, ID, ctxt); 5750 return(ret); 5751} 5752 5753int main(..) { 5754 ... 5755 5756 /* 5757 * Install our own entity loader 5758 */ 5759 defaultLoader = xmlGetExternalEntityLoader(); 5760 xmlSetExternalEntityLoader(xmlMyExternalEntityLoader); 5761 5762 ... 5763}</pre> 5764 5765<h3><a name="Example2">Example of customized I/O</a></h3> 5766 5767<p>This example come from <a href="http://xmlsoft.org/messages/0708.html">a 5768real use case</a>, xmlDocDump() closes the FILE * passed by the application 5769and this was a problem. The <a 5770href="http://xmlsoft.org/messages/0711.html">solution</a> was to redefine a 5771new output handler with the closing call deactivated:</p> 5772<ol> 5773 <li>First define a new I/O output allocator where the output don't close 5774 the file: 5775 <pre>xmlOutputBufferPtr 5776xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) { 5777 xmlOutputBufferPtr ret; 5778 5779 if (xmlOutputCallbackInitialized == 0) 5780 xmlRegisterDefaultOutputCallbacks(); 5781 5782 if (file == NULL) return(NULL); 5783 ret = xmlAllocOutputBuffer(encoder); 5784 if (ret != NULL) { 5785 ret->context = file; 5786 ret->writecallback = xmlFileWrite; 5787 ret->closecallback = NULL; /* No close callback */ 5788 } 5789 return(ret); 5790} </pre> 5791 </li> 5792 <li>And then use it to save the document: 5793 <pre>FILE *f; 5794xmlOutputBufferPtr output; 5795xmlDocPtr doc; 5796int res; 5797 5798f = ... 5799doc = .... 5800 5801output = xmlOutputBufferCreateOwn(f, NULL); 5802res = xmlSaveFileTo(output, doc, NULL); 5803 </pre> 5804 </li> 5805</ol> 5806 5807<h2><a name="Catalog">Catalog support</a></h2> 5808 5809<p>Table of Content:</p> 5810<ol> 5811 <li><a href="General2">General overview</a></li> 5812 <li><a href="#definition">The definition</a></li> 5813 <li><a href="#Simple">Using catalogs</a></li> 5814 <li><a href="#Some">Some examples</a></li> 5815 <li><a href="#reference">How to tune catalog usage</a></li> 5816 <li><a href="#validate">How to debug catalog processing</a></li> 5817 <li><a href="#Declaring">How to create and maintain catalogs</a></li> 5818 <li><a href="#implemento">The implementor corner quick review of the 5819 API</a></li> 5820 <li><a href="#Other">Other resources</a></li> 5821</ol> 5822 5823<h3><a name="General2">General overview</a></h3> 5824 5825<p>What is a catalog? Basically it's a lookup mechanism used when an entity 5826(a file or a remote resource) references another entity. The catalog lookup 5827is inserted between the moment the reference is recognized by the software 5828(XML parser, stylesheet processing, or even images referenced for inclusion 5829in a rendering) and the time where loading that resource is actually 5830started.</p> 5831 5832<p>It is basically used for 3 things:</p> 5833<ul> 5834 <li>mapping from "logical" names, the public identifiers and a more 5835 concrete name usable for download (and URI). For example it can associate 5836 the logical name 5837 <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p> 5838 <p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be 5839 downloaded</p> 5840 <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p> 5841 </li> 5842 <li>remapping from a given URL to another one, like an HTTP indirection 5843 saying that 5844 <p>"http://www.oasis-open.org/committes/tr.xsl"</p> 5845 <p>should really be looked at</p> 5846 <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p> 5847 </li> 5848 <li>providing a local cache mechanism allowing to load the entities 5849 associated to public identifiers or remote resources, this is a really 5850 important feature for any significant deployment of XML or SGML since it 5851 allows to avoid the aleas and delays associated to fetching remote 5852 resources.</li> 5853</ul> 5854 5855<h3><a name="definition">The definitions</a></h3> 5856 5857<p>Libxml, as of 2.4.3 implements 2 kind of catalogs:</p> 5858<ul> 5859 <li>the older SGML catalogs, the official spec is SGML Open Technical 5860 Resolution TR9401:1997, but is better understood by reading <a 5861 href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from 5862 James Clark. This is relatively old and not the preferred mode of 5863 operation of libxml.</li> 5864 <li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML 5865 Catalogs</a> is far more flexible, more recent, uses an XML syntax and 5866 should scale quite better. This is the default option of libxml.</li> 5867</ul> 5868 5869<p></p> 5870 5871<h3><a name="Simple">Using catalog</a></h3> 5872 5873<p>In a normal environment libxml2 will by default check the presence of a 5874catalog in /etc/xml/catalog, and assuming it has been correctly populated, 5875the processing is completely transparent to the document user. To take a 5876concrete example, suppose you are authoring a DocBook document, this one 5877starts with the following DOCTYPE definition:</p> 5878<pre><?xml version='1.0'?> 5879<!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN" 5880 "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"></pre> 5881 5882<p>When validating the document with libxml, the catalog will be 5883automatically consulted to lookup the public identifier "-//Norman Walsh//DTD 5884DocBk XML V3.1.4//EN" and the system identifier 5885"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have 5886been installed on your system and the catalogs actually point to them, libxml 5887will fetch them from the local disk.</p> 5888 5889<p style="font-size: 10pt"><strong>Note</strong>: Really don't use this 5890DOCTYPE example it's a really old version, but is fine as an example.</p> 5891 5892<p>Libxml2 will check the catalog each time that it is requested to load an 5893entity, this includes DTD, external parsed entities, stylesheets, etc ... If 5894your system is correctly configured all the authoring phase and processing 5895should use only local files, even if your document stays portable because it 5896uses the canonical public and system ID, referencing the remote document.</p> 5897 5898<h3><a name="Some">Some examples:</a></h3> 5899 5900<p>Here is a couple of fragments from XML Catalogs used in libxml2 early 5901regression tests in <code>test/catalogs</code> :</p> 5902<pre><?xml version="1.0"?> 5903<!DOCTYPE catalog PUBLIC 5904 "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 5905 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> 5906<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> 5907 <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" 5908 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> 5909...</pre> 5910 5911<p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are 5912written in XML, there is a specific namespace for catalog elements 5913"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this 5914catalog is a <code>public</code> mapping it allows to associate a Public 5915Identifier with an URI.</p> 5916<pre>... 5917 <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" 5918 rewritePrefix="file:///usr/share/xml/docbook/"/> 5919...</pre> 5920 5921<p>A <code>rewriteSystem</code> is a very powerful instruction, it says that 5922any URI starting with a given prefix should be looked at another URI 5923constructed by replacing the prefix with an new one. In effect this acts like 5924a cache system for a full area of the Web. In practice it is extremely useful 5925with a file prefix if you have installed a copy of those resources on your 5926local system.</p> 5927<pre>... 5928<delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //" 5929 catalog="file:///usr/share/xml/docbook.xml"/> 5930<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" 5931 catalog="file:///usr/share/xml/docbook.xml"/> 5932<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" 5933 catalog="file:///usr/share/xml/docbook.xml"/> 5934<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" 5935 catalog="file:///usr/share/xml/docbook.xml"/> 5936<delegateURI uriStartString="http://www.oasis-open.org/docbook/" 5937 catalog="file:///usr/share/xml/docbook.xml"/> 5938...</pre> 5939 5940<p>Delegation is the core features which allows to build a tree of catalogs, 5941easier to maintain than a single catalog, based on Public Identifier, System 5942Identifier or URI prefixes it instructs the catalog software to look up 5943entries in another resource. This feature allow to build hierarchies of 5944catalogs, the set of entries presented should be sufficient to redirect the 5945resolution of all DocBook references to the specific catalog in 5946<code>/usr/share/xml/docbook.xml</code> this one in turn could delegate all 5947references for DocBook 4.2.1 to a specific catalog installed at the same time 5948as the DocBook resources on the local machine.</p> 5949 5950<h3><a name="reference">How to tune catalog usage:</a></h3> 5951 5952<p>The user can change the default catalog behaviour by redirecting queries 5953to its own set of catalogs, this can be done by setting the 5954<code>XML_CATALOG_FILES</code> environment variable to a list of catalogs, an 5955empty one should deactivate loading the default <code>/etc/xml/catalog</code> 5956default catalog</p> 5957 5958<h3><a name="validate">How to debug catalog processing:</a></h3> 5959 5960<p>Setting up the <code>XML_DEBUG_CATALOG</code> environment variable will 5961make libxml2 output debugging information for each catalog operations, for 5962example:</p> 5963<pre>orchis:~/XML -> xmllint --memory --noout test/ent2 5964warning: failed to load external entity "title.xml" 5965orchis:~/XML -> export XML_DEBUG_CATALOG= 5966orchis:~/XML -> xmllint --memory --noout test/ent2 5967Failed to parse catalog /etc/xml/catalog 5968Failed to parse catalog /etc/xml/catalog 5969warning: failed to load external entity "title.xml" 5970Catalogs cleanup 5971orchis:~/XML -> </pre> 5972 5973<p>The test/ent2 references an entity, running the parser from memory makes 5974the base URI unavailable and the the "title.xml" entity cannot be loaded. 5975Setting up the debug environment variable allows to detect that an attempt is 5976made to load the <code>/etc/xml/catalog</code> but since it's not present the 5977resolution fails.</p> 5978 5979<p>But the most advanced way to debug XML catalog processing is to use the 5980<strong>xmlcatalog</strong> command shipped with libxml2, it allows to load 5981catalogs and make resolution queries to see what is going on. This is also 5982used for the regression tests:</p> 5983<pre>orchis:~/XML -> ./xmlcatalog test/catalogs/docbook.xml \ 5984 "-//OASIS//DTD DocBook XML V4.1.2//EN" 5985http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd 5986orchis:~/XML -> </pre> 5987 5988<p>For debugging what is going on, adding one -v flags increase the verbosity 5989level to indicate the processing done (adding a second flag also indicate 5990what elements are recognized at parsing):</p> 5991<pre>orchis:~/XML -> ./xmlcatalog -v test/catalogs/docbook.xml \ 5992 "-//OASIS//DTD DocBook XML V4.1.2//EN" 5993Parsing catalog test/catalogs/docbook.xml's content 5994Found public match -//OASIS//DTD DocBook XML V4.1.2//EN 5995http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd 5996Catalogs cleanup 5997orchis:~/XML -> </pre> 5998 5999<p>A shell interface is also available to debug and process multiple queries 6000(and for regression tests):</p> 6001<pre>orchis:~/XML -> ./xmlcatalog -shell test/catalogs/docbook.xml \ 6002 "-//OASIS//DTD DocBook XML V4.1.2//EN" 6003> help 6004Commands available: 6005public PublicID: make a PUBLIC identifier lookup 6006system SystemID: make a SYSTEM identifier lookup 6007resolve PublicID SystemID: do a full resolver lookup 6008add 'type' 'orig' 'replace' : add an entry 6009del 'values' : remove values 6010dump: print the current catalog state 6011debug: increase the verbosity level 6012quiet: decrease the verbosity level 6013exit: quit the shell 6014> public "-//OASIS//DTD DocBook XML V4.1.2//EN" 6015http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd 6016> quit 6017orchis:~/XML -> </pre> 6018 6019<p>This should be sufficient for most debugging purpose, this was actually 6020used heavily to debug the XML Catalog implementation itself.</p> 6021 6022<h3><a name="Declaring">How to create and maintain</a> catalogs:</h3> 6023 6024<p>Basically XML Catalogs are XML files, you can either use XML tools to 6025manage them or use <strong>xmlcatalog</strong> for this. The basic step is 6026to create a catalog the -create option provide this facility:</p> 6027<pre>orchis:~/XML -> ./xmlcatalog --create tst.xml 6028<?xml version="1.0"?> 6029<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 6030 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> 6031<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> 6032orchis:~/XML -> </pre> 6033 6034<p>By default xmlcatalog does not overwrite the original catalog and save the 6035result on the standard output, this can be overridden using the -noout 6036option. The <code>-add</code> command allows to add entries in the 6037catalog:</p> 6038<pre>orchis:~/XML -> ./xmlcatalog --noout --create --add "public" \ 6039 "-//OASIS//DTD DocBook XML V4.1.2//EN" \ 6040 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml 6041orchis:~/XML -> cat tst.xml 6042<?xml version="1.0"?> 6043<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \ 6044 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> 6045<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> 6046<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" 6047 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> 6048</catalog> 6049orchis:~/XML -> </pre> 6050 6051<p>The <code>-add</code> option will always take 3 parameters even if some of 6052the XML Catalog constructs (like nextCatalog) will have only a single 6053argument, just pass a third empty string, it will be ignored.</p> 6054 6055<p>Similarly the <code>-del</code> option remove matching entries from the 6056catalog:</p> 6057<pre>orchis:~/XML -> ./xmlcatalog --del \ 6058 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml 6059<?xml version="1.0"?> 6060<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 6061 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> 6062<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> 6063orchis:~/XML -> </pre> 6064 6065<p>The catalog is now empty. Note that the matching of <code>-del</code> is 6066exact and would have worked in a similar fashion with the Public ID 6067string.</p> 6068 6069<p>This is rudimentary but should be sufficient to manage a not too complex 6070catalog tree of resources.</p> 6071 6072<h3><a name="implemento">The implementor corner quick review of the 6073API:</a></h3> 6074 6075<p>First, and like for every other module of libxml, there is an 6076automatically generated <a href="html/libxml-catalog.html">API page for 6077catalog support</a>.</p> 6078 6079<p>The header for the catalog interfaces should be included as:</p> 6080<pre>#include <libxml/catalog.h></pre> 6081 6082<p>The API is voluntarily kept very simple. First it is not obvious that 6083applications really need access to it since it is the default behaviour of 6084libxml2 (Note: it is possible to completely override libxml2 default catalog 6085by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to 6086plug an application specific resolver).</p> 6087 6088<p>Basically libxml2 support 2 catalog lists:</p> 6089<ul> 6090 <li>the default one, global shared by all the application</li> 6091 <li>a per-document catalog, this one is built if the document uses the 6092 <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is 6093 associated to the parser context and destroyed when the parsing context 6094 is destroyed.</li> 6095</ul> 6096 6097<p>the document one will be used first if it exists.</p> 6098 6099<h4>Initialization routines:</h4> 6100 6101<p>xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() should be 6102used at startup to initialize the catalog, if the catalog should be 6103initialized with specific values xmlLoadCatalog() or xmlLoadCatalogs() 6104should be called before xmlInitializeCatalog() which would otherwise do a 6105default initialization first.</p> 6106 6107<p>The xmlCatalogAddLocal() call is used by the parser to grow the document 6108own catalog list if needed.</p> 6109 6110<h4>Preferences setup:</h4> 6111 6112<p>The XML Catalog spec requires the possibility to select default 6113preferences between public and system delegation, 6114xmlCatalogSetDefaultPrefer() allows this, xmlCatalogSetDefaults() and 6115xmlCatalogGetDefaults() allow to control if XML Catalogs resolution should 6116be forbidden, allowed for global catalog, for document catalog or both, the 6117default is to allow both.</p> 6118 6119<p>And of course xmlCatalogSetDebug() allows to generate debug messages 6120(through the xmlGenericError() mechanism).</p> 6121 6122<h4>Querying routines:</h4> 6123 6124<p>xmlCatalogResolve(), xmlCatalogResolveSystem(), xmlCatalogResolvePublic() 6125and xmlCatalogResolveURI() are relatively explicit if you read the XML 6126Catalog specification they correspond to section 7 algorithms, they should 6127also work if you have loaded an SGML catalog with a simplified semantic.</p> 6128 6129<p>xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the same but 6130operate on the document catalog list</p> 6131 6132<h4>Cleanup and Miscellaneous:</h4> 6133 6134<p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is 6135the per-document equivalent.</p> 6136 6137<p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically modify the 6138first catalog in the global list, and xmlCatalogDump() allows to dump a 6139catalog state, those routines are primarily designed for xmlcatalog, I'm not 6140sure that exposing more complex interfaces (like navigation ones) would be 6141really useful.</p> 6142 6143<p>The xmlParseCatalogFile() is a function used to load XML Catalog files, 6144it's similar as xmlParseFile() except it bypass all catalog lookups, it's 6145provided because this functionality may be useful for client tools.</p> 6146 6147<h4>threaded environments:</h4> 6148 6149<p>Since the catalog tree is built progressively, some care has been taken to 6150try to avoid troubles in multithreaded environments. The code is now thread 6151safe assuming that the libxml2 library has been compiled with threads 6152support.</p> 6153 6154<p></p> 6155 6156<h3><a name="Other">Other resources</a></h3> 6157 6158<p>The XML Catalog specification is relatively recent so there isn't much 6159literature to point at:</p> 6160<ul> 6161 <li>You can find a good rant from Norm Walsh about <a 6162 href="http://www.arbortext.com/Think_Tank/XML_Resources/Issue_Three/issue_three.html">the 6163 need for catalogs</a>, it provides a lot of context information even if 6164 I don't agree with everything presented. Norm also wrote a more recent 6165 article <a 6166 href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML 6167 entities and URI resolvers</a> describing them.</li> 6168 <li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML 6169 catalog proposal</a> from John Cowan</li> 6170 <li>The <a href="http://www.rddl.org/">Resource Directory Description 6171 Language</a> (RDDL) another catalog system but more oriented toward 6172 providing metadata for XML namespaces.</li> 6173 <li>the page from the OASIS Technical <a 6174 href="http://www.oasis-open.org/committees/entity/">Committee on Entity 6175 Resolution</a> who maintains XML Catalog, you will find pointers to the 6176 specification update, some background and pointers to others tools 6177 providing XML Catalog support</li> 6178 <li>There is a <a href="buildDocBookCatalog">shell script</a> to generate 6179 XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/ 6180 directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on 6181 the resources found on the system. Otherwise it will just create 6182 ~/xmlcatalog and ~/dbkxmlcatalog and doing: 6183 <p><code>export XML_CATALOG_FILES=$HOME/xmlcatalog</code></p> 6184 <p>should allow to process DocBook documentations without requiring 6185 network accesses for the DTD or stylesheets</p> 6186 </li> 6187 <li>I have uploaded <a href="ftp://xmlsoft.org/libxml2/test/dbk412catalog.tar.gz">a 6188 small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems 6189 to work fine for me too</li> 6190 <li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog 6191 manual page</a></li> 6192</ul> 6193 6194<p>If you have suggestions for corrections or additions, simply contact 6195me:</p> 6196 6197<h2><a name="library">The parser interfaces</a></h2> 6198 6199<p>This section is directly intended to help programmers getting bootstrapped 6200using the XML tollkit from the C language. It is not intended to be 6201extensive. I hope the automatically generated documents will provide the 6202completeness required, but as a separate set of documents. The interfaces of 6203the XML parser are by principle low level, Those interested in a higher level 6204API should <a href="#DOM">look at DOM</a>.</p> 6205 6206<p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are 6207separated from the <a href="html/libxml-htmlparser.html">HTML parser 6208interfaces</a>. Let's have a look at how the XML parser can be called:</p> 6209 6210<h3><a name="Invoking">Invoking the parser : the pull method</a></h3> 6211 6212<p>Usually, the first thing to do is to read an XML input. The parser accepts 6213documents either from in-memory strings or from files. The functions are 6214defined in "parser.h":</p> 6215<dl> 6216 <dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt> 6217 <dd><p>Parse a null-terminated string containing the document.</p> 6218 </dd> 6219</dl> 6220<dl> 6221 <dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt> 6222 <dd><p>Parse an XML document contained in a (possibly compressed) 6223 file.</p> 6224 </dd> 6225</dl> 6226 6227<p>The parser returns a pointer to the document structure (or NULL in case of 6228failure).</p> 6229 6230<h3 id="Invoking1">Invoking the parser: the push method</h3> 6231 6232<p>In order for the application to keep the control when the document is 6233being fetched (which is common for GUI based programs) libxml2 provides a 6234push interface, too, as of version 1.8.3. Here are the interface 6235functions:</p> 6236<pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, 6237 void *user_data, 6238 const char *chunk, 6239 int size, 6240 const char *filename); 6241int xmlParseChunk (xmlParserCtxtPtr ctxt, 6242 const char *chunk, 6243 int size, 6244 int terminate);</pre> 6245 6246<p>and here is a simple example showing how to use the interface:</p> 6247<pre> FILE *f; 6248 6249 f = fopen(filename, "r"); 6250 if (f != NULL) { 6251 int res, size = 1024; 6252 char chars[1024]; 6253 xmlParserCtxtPtr ctxt; 6254 6255 res = fread(chars, 1, 4, f); 6256 if (res > 0) { 6257 ctxt = xmlCreatePushParserCtxt(NULL, NULL, 6258 chars, res, filename); 6259 while ((res = fread(chars, 1, size, f)) > 0) { 6260 xmlParseChunk(ctxt, chars, res, 0); 6261 } 6262 xmlParseChunk(ctxt, chars, 0, 1); 6263 doc = ctxt->myDoc; 6264 xmlFreeParserCtxt(ctxt); 6265 } 6266 }</pre> 6267 6268<p>The HTML parser embedded into libxml2 also has a push interface; the 6269functions are just prefixed by "html" rather than "xml".</p> 6270 6271<h3 id="Invoking2">Invoking the parser: the SAX interface</h3> 6272 6273<p>The tree-building interface makes the parser memory-hungry, first loading 6274the document in memory and then building the tree itself. Reading a document 6275without building the tree is possible using the SAX interfaces (see SAX.h and 6276<a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James 6277Henstridge's documentation</a>). Note also that the push interface can be 6278limited to SAX: just use the two first arguments of 6279<code>xmlCreatePushParserCtxt()</code>.</p> 6280 6281<h3><a name="Building">Building a tree from scratch</a></h3> 6282 6283<p>The other way to get an XML tree in memory is by building it. Basically 6284there is a set of functions dedicated to building new elements. (These are 6285also described in <libxml/tree.h>.) For example, here is a piece of 6286code that produces the XML document used in the previous examples:</p> 6287<pre> #include <libxml/tree.h> 6288 xmlDocPtr doc; 6289 xmlNodePtr tree, subtree; 6290 6291 doc = xmlNewDoc("1.0"); 6292 doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL); 6293 xmlSetProp(doc->children, "prop1", "gnome is great"); 6294 xmlSetProp(doc->children, "prop2", "& linux too"); 6295 tree = xmlNewChild(doc->children, NULL, "head", NULL); 6296 subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome"); 6297 tree = xmlNewChild(doc->children, NULL, "chapter", NULL); 6298 subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure"); 6299 subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ..."); 6300 subtree = xmlNewChild(tree, NULL, "image", NULL); 6301 xmlSetProp(subtree, "href", "linus.gif");</pre> 6302 6303<p>Not really rocket science ...</p> 6304 6305<h3><a name="Traversing">Traversing the tree</a></h3> 6306 6307<p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your 6308code has access to the internal structure of all the elements of the tree. 6309The names should be somewhat simple like <strong>parent</strong>, 6310<strong>children</strong>, <strong>next</strong>, <strong>prev</strong>, 6311<strong>properties</strong>, etc... For example, still with the previous 6312example:</p> 6313<pre><code>doc->children->children->children</code></pre> 6314 6315<p>points to the title element,</p> 6316<pre>doc->children->children->next->children->children</pre> 6317 6318<p>points to the text node containing the chapter title "The Linux 6319adventure".</p> 6320 6321<p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be 6322present before the document root, so <code>doc->children</code> may point 6323to an element which is not the document Root Element; a function 6324<code>xmlDocGetRootElement()</code> was added for this purpose.</p> 6325 6326<h3><a name="Modifying">Modifying the tree</a></h3> 6327 6328<p>Functions are provided for reading and writing the document content. Here 6329is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p> 6330<dl> 6331 <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const 6332 xmlChar *value);</code></dt> 6333 <dd><p>This sets (or changes) an attribute carried by an ELEMENT node. 6334 The value can be NULL.</p> 6335 </dd> 6336</dl> 6337<dl> 6338 <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar 6339 *name);</code></dt> 6340 <dd><p>This function returns a pointer to new copy of the property 6341 content. Note that the user must deallocate the result.</p> 6342 </dd> 6343</dl> 6344 6345<p>Two functions are provided for reading and writing the text associated 6346with elements:</p> 6347<dl> 6348 <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar 6349 *value);</code></dt> 6350 <dd><p>This function takes an "external" string and converts it to one 6351 text node or possibly to a list of entity and text nodes. All 6352 non-predefined entity references like &Gnome; will be stored 6353 internally as entity nodes, hence the result of the function may not be 6354 a single node.</p> 6355 </dd> 6356</dl> 6357<dl> 6358 <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int 6359 inLine);</code></dt> 6360 <dd><p>This function is the inverse of 6361 <code>xmlStringGetNodeList()</code>. It generates a new string 6362 containing the content of the text and entity nodes. Note the extra 6363 argument inLine. If this argument is set to 1, the function will expand 6364 entity references. For example, instead of returning the &Gnome; 6365 XML encoding in the string, it will substitute it with its value (say, 6366 "GNU Network Object Model Environment").</p> 6367 </dd> 6368</dl> 6369 6370<h3><a name="Saving">Saving a tree</a></h3> 6371 6372<p>Basically 3 options are possible:</p> 6373<dl> 6374 <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int 6375 *size);</code></dt> 6376 <dd><p>Returns a buffer into which the document has been saved.</p> 6377 </dd> 6378</dl> 6379<dl> 6380 <dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt> 6381 <dd><p>Dumps a document to an open file descriptor.</p> 6382 </dd> 6383</dl> 6384<dl> 6385 <dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt> 6386 <dd><p>Saves the document to a file. In this case, the compression 6387 interface is triggered if it has been turned on.</p> 6388 </dd> 6389</dl> 6390 6391<h3><a name="Compressio">Compression</a></h3> 6392 6393<p>The library transparently handles compression when doing file-based 6394accesses. The level of compression on saves can be turned on either globally 6395or individually for one file:</p> 6396<dl> 6397 <dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt> 6398 <dd><p>Gets the document compression ratio (0-9).</p> 6399 </dd> 6400</dl> 6401<dl> 6402 <dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt> 6403 <dd><p>Sets the document compression ratio.</p> 6404 </dd> 6405</dl> 6406<dl> 6407 <dt><code>int xmlGetCompressMode(void);</code></dt> 6408 <dd><p>Gets the default compression ratio.</p> 6409 </dd> 6410</dl> 6411<dl> 6412 <dt><code>void xmlSetCompressMode(int mode);</code></dt> 6413 <dd><p>Sets the default compression ratio.</p> 6414 </dd> 6415</dl> 6416 6417<h2><a name="Entities">Entities or no entities</a></h2> 6418 6419<p>Entities in principle are similar to simple C macros. An entity defines an 6420abbreviation for a given string that you can reuse many times throughout the 6421content of your document. Entities are especially useful when a given string 6422may occur frequently within a document, or to confine the change needed to a 6423document to a restricted area in the internal subset of the document (at the 6424beginning). Example:</p> 6425<pre>1 <?xml version="1.0"?> 64262 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [ 64273 <!ENTITY xml "Extensible Markup Language"> 64284 ]> 64295 <EXAMPLE> 64306 &xml; 64317 </EXAMPLE></pre> 6432 6433<p>Line 3 declares the xml entity. Line 6 uses the xml entity, by prefixing 6434its name with '&' and following it by ';' without any spaces added. There 6435are 5 predefined entities in libxml2 allowing you to escape characters with 6436predefined meaning in some parts of the xml document content: 6437<strong>&lt;</strong> for the character '<', <strong>&gt;</strong> 6438for the character '>', <strong>&apos;</strong> for the character ''', 6439<strong>&quot;</strong> for the character '"', and 6440<strong>&amp;</strong> for the character '&'.</p> 6441 6442<p>One of the problems related to entities is that you may want the parser to 6443substitute an entity's content so that you can see the replacement text in 6444your application. Or you may prefer to keep entity references as such in the 6445content to be able to save the document back without losing this usually 6446precious information (if the user went through the pain of explicitly 6447defining entities, he may have a a rather negative attitude if you blindly 6448substitute them as saving time). The <a 6449href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault()</a> 6450function allows you to check and change the behaviour, which is to not 6451substitute entities by default.</p> 6452 6453<p>Here is the DOM tree built by libxml2 for the previous document in the 6454default case:</p> 6455<pre>/gnome/src/gnome-xml -> ./xmllint --debug test/ent1 6456DOCUMENT 6457version=1.0 6458 ELEMENT EXAMPLE 6459 TEXT 6460 content= 6461 ENTITY_REF 6462 INTERNAL_GENERAL_ENTITY xml 6463 content=Extensible Markup Language 6464 TEXT 6465 content=</pre> 6466 6467<p>And here is the result when substituting entities:</p> 6468<pre>/gnome/src/gnome-xml -> ./tester --debug --noent test/ent1 6469DOCUMENT 6470version=1.0 6471 ELEMENT EXAMPLE 6472 TEXT 6473 content= Extensible Markup Language</pre> 6474 6475<p>So, entities or no entities? Basically, it depends on your use case. I 6476suggest that you keep the non-substituting default behaviour and avoid using 6477entities in your XML document or data if you are not willing to handle the 6478entity references elements in the DOM tree.</p> 6479 6480<p>Note that at save time libxml2 enforces the conversion of the predefined 6481entities where necessary to prevent well-formedness problems, and will also 6482transparently replace those with chars (i.e. it will not generate entity 6483reference elements in the DOM tree or call the reference() SAX callback when 6484finding them in the input).</p> 6485 6486<p><span style="background-color: #FF0000">WARNING</span>: handling entities 6487on top of the libxml2 SAX interface is difficult!!! If you plan to use 6488non-predefined entities in your documents, then the learning curve to handle 6489then using the SAX API may be long. If you plan to use complex documents, I 6490strongly suggest you consider using the DOM interface instead and let libxml 6491deal with the complexity rather than trying to do it yourself.</p> 6492 6493<h2><a name="Namespaces">Namespaces</a></h2> 6494 6495<p>The libxml2 library implements <a 6496href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by 6497recognizing namespace constructs in the input, and does namespace lookup 6498automatically when building the DOM tree. A namespace declaration is 6499associated with an in-memory structure and all elements or attributes within 6500that namespace point to it. Hence testing the namespace is a simple and fast 6501equality operation at the user level.</p> 6502 6503<p>I suggest that people using libxml2 use a namespace, and declare it in the 6504root element of their document as the default namespace. Then they don't need 6505to use the prefix in the content but we will have a basis for future semantic 6506refinement and merging of data from different sources. This doesn't increase 6507the size of the XML output significantly, but significantly increases its 6508value in the long-term. Example:</p> 6509<pre><mydoc xmlns="http://mydoc.example.org/schemas/"> 6510 <elem1>...</elem1> 6511 <elem2>...</elem2> 6512</mydoc></pre> 6513 6514<p>The namespace value has to be an absolute URL, but the URL doesn't have to 6515point to any existing resource on the Web. It will bind all the element and 6516attributes with that URL. I suggest to use an URL within a domain you 6517control, and that the URL should contain some kind of version information if 6518possible. For example, <code>"http://www.gnome.org/gnumeric/1.0/"</code> is a 6519good namespace scheme.</p> 6520 6521<p>Then when you load a file, make sure that a namespace carrying the 6522version-independent prefix is installed on the root element of your document, 6523and if the version information don't match something you know, warn the user 6524and be liberal in what you accept as the input. Also do *not* try to base 6525namespace checking on the prefix value. <foo:text> may be exactly the 6526same as <bar:text> in another document. What really matters is the URI 6527associated with the element or the attribute, not the prefix string (which is 6528just a shortcut for the full URI). In libxml, element and attributes have an 6529<code>ns</code> field pointing to an xmlNs structure detailing the namespace 6530prefix and its URI.</p> 6531 6532<p>@@Interfaces@@</p> 6533<pre>xmlNodePtr node; 6534if(!strncmp(node->name,"mytag",5) 6535 && node->ns 6536 && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) { 6537 ... 6538}</pre> 6539 6540<p>Usually people object to using namespaces together with validity checking. 6541I will try to make sure that using namespaces won't break validity checking, 6542so even if you plan to use or currently are using validation I strongly 6543suggest adding namespaces to your document. A default namespace scheme 6544<code>xmlns="http://...."</code> should not break validity even on less 6545flexible parsers. Using namespaces to mix and differentiate content coming 6546from multiple DTDs will certainly break current validation schemes. To check 6547such documents one needs to use schema-validation, which is supported in 6548libxml2 as well. See <a href="http://www.relaxng.org/">relagx-ng</a> and <a 6549href="http://www.w3c.org/XML/Schema">w3c-schema</a>.</p> 6550 6551<h2><a name="Upgrading">Upgrading 1.x code</a></h2> 6552 6553<p>Incompatible changes:</p> 6554 6555<p>Version 2 of libxml2 is the first version introducing serious backward 6556incompatible changes. The main goals were:</p> 6557<ul> 6558 <li>a general cleanup. A number of mistakes inherited from the very early 6559 versions couldn't be changed due to compatibility constraints. Example 6560 the "childs" element in the nodes.</li> 6561 <li>Uniformization of the various nodes, at least for their header and link 6562 parts (doc, parent, children, prev, next), the goal is a simpler 6563 programming model and simplifying the task of the DOM implementors.</li> 6564 <li>better conformances to the XML specification, for example version 1.x 6565 had an heuristic to try to detect ignorable white spaces. As a result the 6566 SAX event generated were ignorableWhitespace() while the spec requires 6567 character() in that case. This also mean that a number of DOM node 6568 containing blank text may populate the DOM tree which were not present 6569 before.</li> 6570</ul> 6571 6572<h3>How to fix libxml-1.x code:</h3> 6573 6574<p>So client code of libxml designed to run with version 1.x may have to be 6575changed to compile against version 2.x of libxml. Here is a list of changes 6576that I have collected, they may not be sufficient, so in case you find other 6577change which are required, <a href="mailto:Daniel.Veillard@w3.org">drop me a 6578mail</a>:</p> 6579<ol> 6580 <li>The package name have changed from libxml to libxml2, the library name 6581 is now -lxml2 . There is a new xml2-config script which should be used to 6582 select the right parameters libxml2</li> 6583 <li>Node <strong>childs</strong> field has been renamed 6584 <strong>children</strong> so s/childs/children/g should be applied 6585 (probability of having "childs" anywhere else is close to 0+</li> 6586 <li>The document don't have anymore a <strong>root</strong> element it has 6587 been replaced by <strong>children</strong> and usually you will get a 6588 list of element here. For example a Dtd element for the internal subset 6589 and it's declaration may be found in that list, as well as processing 6590 instructions or comments found before or after the document root element. 6591 Use <strong>xmlDocGetRootElement(doc)</strong> to get the root element of 6592 a document. Alternatively if you are sure to not reference DTDs nor have 6593 PIs or comments before or after the root element 6594 s/->root/->children/g will probably do it.</li> 6595 <li>The white space issue, this one is more complex, unless special case of 6596 validating parsing, the line breaks and spaces usually used for indenting 6597 and formatting the document content becomes significant. So they are 6598 reported by SAX and if your using the DOM tree, corresponding nodes are 6599 generated. Too approach can be taken: 6600 <ol> 6601 <li>lazy one, use the compatibility call 6602 <strong>xmlKeepBlanksDefault(0)</strong> but be aware that you are 6603 relying on a special (and possibly broken) set of heuristics of 6604 libxml to detect ignorable blanks. Don't complain if it breaks or 6605 make your application not 100% clean w.r.t. to it's input.</li> 6606 <li>the Right Way: change you code to accept possibly insignificant 6607 blanks characters, or have your tree populated with weird blank text 6608 nodes. You can spot them using the commodity function 6609 <strong>xmlIsBlankNode(node)</strong> returning 1 for such blank 6610 nodes.</li> 6611 </ol> 6612 <p>Note also that with the new default the output functions don't add any 6613 extra indentation when saving a tree in order to be able to round trip 6614 (read and save) without inflating the document with extra formatting 6615 chars.</p> 6616 </li> 6617 <li>The include path has changed to $prefix/libxml/ and the includes 6618 themselves uses this new prefix in includes instructions... If you are 6619 using (as expected) the 6620 <pre>xml2-config --cflags</pre> 6621 <p>output to generate you compile commands this will probably work out of 6622 the box</p> 6623 </li> 6624 <li>xmlDetectCharEncoding takes an extra argument indicating the length in 6625 byte of the head of the document available for character detection.</li> 6626</ol> 6627 6628<h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3> 6629 6630<p>Two new version of libxml (1.8.11) and libxml2 (2.3.4) have been released 6631to allow smooth upgrade of existing libxml v1code while retaining 6632compatibility. They offers the following:</p> 6633<ol> 6634 <li>similar include naming, one should use 6635 <strong>#include<libxml/...></strong> in both cases.</li> 6636 <li>similar identifiers defined via macros for the child and root fields: 6637 respectively <strong>xmlChildrenNode</strong> and 6638 <strong>xmlRootNode</strong></li> 6639 <li>a new macro <strong>LIBXML_TEST_VERSION</strong> which should be 6640 inserted once in the client code</li> 6641</ol> 6642 6643<p>So the roadmap to upgrade your existing libxml applications is the 6644following:</p> 6645<ol> 6646 <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li> 6647 <li>find all occurrences where the xmlDoc <strong>root</strong> field is 6648 used and change it to <strong>xmlRootNode</strong></li> 6649 <li>similarly find all occurrences where the xmlNode 6650 <strong>childs</strong> field is used and change it to 6651 <strong>xmlChildrenNode</strong></li> 6652 <li>add a <strong>LIBXML_TEST_VERSION</strong> macro somewhere in your 6653 <strong>main()</strong> or in the library init entry point</li> 6654 <li>Recompile, check compatibility, it should still work</li> 6655 <li>Change your configure script to look first for xml2-config and fall 6656 back using xml-config . Use the --cflags and --libs output of the command 6657 as the Include and Linking parameters needed to use libxml.</li> 6658 <li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and 6659 libxml-devel-1.8.y can be kept simultaneously)</li> 6660 <li>remove your config.cache, relaunch your configuration mechanism, and 6661 recompile, if steps 2 and 3 were done right it should compile as-is</li> 6662 <li>Test that your application is still running correctly, if not this may 6663 be due to extra empty nodes due to formatting spaces being kept in libxml2 6664 contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your 6665 code before calling the parser (next to 6666 <strong>LIBXML_TEST_VERSION</strong> is a fine place).</li> 6667</ol> 6668 6669<p>Following those steps should work. It worked for some of my own code.</p> 6670 6671<p>Let me put some emphasis on the fact that there is far more changes from 6672libxml 1.x to 2.x than the ones you may have to patch for. The overall code 6673has been considerably cleaned up and the conformance to the XML specification 6674has been drastically improved too. Don't take those changes as an excuse to 6675not upgrade, it may cost a lot on the long term ...</p> 6676 6677<h2><a name="Thread">Thread safety</a></h2> 6678 6679<p>Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent 6680threads can safely work in parallel parsing different documents. There is 6681however a couple of things to do to ensure it:</p> 6682<ul> 6683 <li>configure the library accordingly using the --with-threads options</li> 6684 <li>call xmlInitParser() in the "main" thread before using any of the 6685 libxml2 API (except possibly selecting a different memory allocator)</li> 6686</ul> 6687 6688<p>Note that the thread safety cannot be ensured for multiple threads sharing 6689the same document, the locking must be done at the application level, libxml 6690exports a basic mutex and reentrant mutexes API in <libxml/threads.h>. 6691The parts of the library checked for thread safety are:</p> 6692<ul> 6693 <li>concurrent loading</li> 6694 <li>file access resolution</li> 6695 <li>catalog access</li> 6696 <li>catalog building</li> 6697 <li>entities lookup/accesses</li> 6698 <li>validation</li> 6699 <li>global variables per-thread override</li> 6700 <li>memory handling</li> 6701</ul> 6702 6703<p>XPath has been tested for threaded usage on non-modified document 6704 for example when using libxslt, but make 100% sure the documents 6705 are accessed read-only !</p> 6706 6707<h2><a name="DOM"></a><a name="Principles">DOM Principles</a></h2> 6708 6709<p><a href="http://www.w3.org/DOM/">DOM</a> stands for the <em>Document 6710Object Model</em>; this is an API for accessing XML or HTML structured 6711documents. Native support for DOM in Gnome is on the way (module gnome-dom), 6712and will be based on gnome-xml. This will be a far cleaner interface to 6713manipulate XML files within Gnome since it won't expose the internal 6714structure.</p> 6715 6716<p>The current DOM implementation on top of libxml2 is the <a 6717href="http://svn.gnome.org/viewvc/gdome2/trunk/">gdome2 Gnome module</a>, this 6718is a full DOM interface, thanks to Paolo Casarini, check the <a 6719href="http://gdome2.cs.unibo.it/">Gdome2 homepage</a> for more 6720information.</p> 6721 6722<h2><a name="Example"></a><a name="real">A real example</a></h2> 6723 6724<p>Here is a real size example, where the actual content of the application 6725data is not kept in the DOM tree but uses internal structures. It is based on 6726a proposal to keep a database of jobs related to Gnome, with an XML based 6727storage structure. Here is an <a href="gjobs.xml">XML encoded jobs 6728base</a>:</p> 6729<pre><?xml version="1.0"?> 6730<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"> 6731 <gjob:Jobs> 6732 6733 <gjob:Job> 6734 <gjob:Project ID="3"/> 6735 <gjob:Application>GBackup</gjob:Application> 6736 <gjob:Category>Development</gjob:Category> 6737 6738 <gjob:Update> 6739 <gjob:Status>Open</gjob:Status> 6740 <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified> 6741 <gjob:Salary>USD 0.00</gjob:Salary> 6742 </gjob:Update> 6743 6744 <gjob:Developers> 6745 <gjob:Developer> 6746 </gjob:Developer> 6747 </gjob:Developers> 6748 6749 <gjob:Contact> 6750 <gjob:Person>Nathan Clemons</gjob:Person> 6751 <gjob:Email>nathan@windsofstorm.net</gjob:Email> 6752 <gjob:Company> 6753 </gjob:Company> 6754 <gjob:Organisation> 6755 </gjob:Organisation> 6756 <gjob:Webpage> 6757 </gjob:Webpage> 6758 <gjob:Snailmail> 6759 </gjob:Snailmail> 6760 <gjob:Phone> 6761 </gjob:Phone> 6762 </gjob:Contact> 6763 6764 <gjob:Requirements> 6765 The program should be released as free software, under the GPL. 6766 </gjob:Requirements> 6767 6768 <gjob:Skills> 6769 </gjob:Skills> 6770 6771 <gjob:Details> 6772 A GNOME based system that will allow a superuser to configure 6773 compressed and uncompressed files and/or file systems to be backed 6774 up with a supported media in the system. This should be able to 6775 perform via find commands generating a list of files that are passed 6776 to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine 6777 or via operations performed on the filesystem itself. Email 6778 notification and GUI status display very important. 6779 </gjob:Details> 6780 6781 </gjob:Job> 6782 6783 </gjob:Jobs> 6784</gjob:Helping></pre> 6785 6786<p>While loading the XML file into an internal DOM tree is a matter of 6787calling only a couple of functions, browsing the tree to gather the data and 6788generate the internal structures is harder, and more error prone.</p> 6789 6790<p>The suggested principle is to be tolerant with respect to the input 6791structure. For example, the ordering of the attributes is not significant, 6792the XML specification is clear about it. It's also usually a good idea not to 6793depend on the order of the children of a given node, unless it really makes 6794things harder. Here is some code to parse the information for a person:</p> 6795<pre>/* 6796 * A person record 6797 */ 6798typedef struct person { 6799 char *name; 6800 char *email; 6801 char *company; 6802 char *organisation; 6803 char *smail; 6804 char *webPage; 6805 char *phone; 6806} person, *personPtr; 6807 6808/* 6809 * And the code needed to parse it 6810 */ 6811personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { 6812 personPtr ret = NULL; 6813 6814DEBUG("parsePerson\n"); 6815 /* 6816 * allocate the struct 6817 */ 6818 ret = (personPtr) malloc(sizeof(person)); 6819 if (ret == NULL) { 6820 fprintf(stderr,"out of memory\n"); 6821 return(NULL); 6822 } 6823 memset(ret, 0, sizeof(person)); 6824 6825 /* We don't care what the top level element name is */ 6826 cur = cur->xmlChildrenNode; 6827 while (cur != NULL) { 6828 if ((!strcmp(cur->name, "Person")) && (cur->ns == ns)) 6829 ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 6830 if ((!strcmp(cur->name, "Email")) && (cur->ns == ns)) 6831 ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 6832 cur = cur->next; 6833 } 6834 6835 return(ret); 6836}</pre> 6837 6838<p>Here are a couple of things to notice:</p> 6839<ul> 6840 <li>Usually a recursive parsing style is the more convenient one: XML data 6841 is by nature subject to repetitive constructs and usually exhibits highly 6842 structured patterns.</li> 6843 <li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>, 6844 i.e. the pointer to the global XML document and the namespace reserved to 6845 the application. Document wide information are needed for example to 6846 decode entities and it's a good coding practice to define a namespace for 6847 your application set of data and test that the element and attributes 6848 you're analyzing actually pertains to your application space. This is 6849 done by a simple equality test (cur->ns == ns).</li> 6850 <li>To retrieve text and attributes value, you can use the function 6851 <em>xmlNodeListGetString</em> to gather all the text and entity reference 6852 nodes generated by the DOM output and produce an single text string.</li> 6853</ul> 6854 6855<p>Here is another piece of code used to parse another level of the 6856structure:</p> 6857<pre>#include <libxml/tree.h> 6858/* 6859 * a Description for a Job 6860 */ 6861typedef struct job { 6862 char *projectID; 6863 char *application; 6864 char *category; 6865 personPtr contact; 6866 int nbDevelopers; 6867 personPtr developers[100]; /* using dynamic alloc is left as an exercise */ 6868} job, *jobPtr; 6869 6870/* 6871 * And the code needed to parse it 6872 */ 6873jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { 6874 jobPtr ret = NULL; 6875 6876DEBUG("parseJob\n"); 6877 /* 6878 * allocate the struct 6879 */ 6880 ret = (jobPtr) malloc(sizeof(job)); 6881 if (ret == NULL) { 6882 fprintf(stderr,"out of memory\n"); 6883 return(NULL); 6884 } 6885 memset(ret, 0, sizeof(job)); 6886 6887 /* We don't care what the top level element name is */ 6888 cur = cur->xmlChildrenNode; 6889 while (cur != NULL) { 6890 6891 if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) { 6892 ret->projectID = xmlGetProp(cur, "ID"); 6893 if (ret->projectID == NULL) { 6894 fprintf(stderr, "Project has no ID\n"); 6895 } 6896 } 6897 if ((!strcmp(cur->name, "Application")) && (cur->ns == ns)) 6898 ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 6899 if ((!strcmp(cur->name, "Category")) && (cur->ns == ns)) 6900 ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 6901 if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns)) 6902 ret->contact = parsePerson(doc, ns, cur); 6903 cur = cur->next; 6904 } 6905 6906 return(ret); 6907}</pre> 6908 6909<p>Once you are used to it, writing this kind of code is quite simple, but 6910boring. Ultimately, it could be possible to write stubbers taking either C 6911data structure definitions, a set of XML examples or an XML DTD and produce 6912the code needed to import and export the content between C data and XML 6913storage. This is left as an exercise to the reader :-)</p> 6914 6915<p>Feel free to use <a href="example/gjobread.c">the code for the full C 6916parsing example</a> as a template, it is also available with Makefile in the 6917Gnome SVN base under libxml2/example</p> 6918 6919<h2><a name="Contributi">Contributions</a></h2> 6920<ul> 6921 <li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of 6922 patches, Gary Pennington worked on the validation API, threading support 6923 and Solaris port.</li> 6924 <li>John Fleck helps maintaining the documentation and man pages.</li> 6925 <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the 6926 maintainer of the Windows port, <a 6927 href="http://www.zlatkovic.com/projects/libxml/index.html">he provides 6928 binaries</a></li> 6929 <li><a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides 6930 <a href="http://garypennington.net/libxml2/">Solaris binaries</a></li> 6931 <li><a 6932 href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt 6933 Sergeant</a> developed <a 6934 href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for 6935 libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML 6936 application server</a></li> 6937 <li><a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a 6938 href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a 6939 href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions 6940 documentation</li> 6941 <li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a 6942 href="http://xmlsoft.org/messages/0488.html">man pages</a></li> 6943 <li>there is a module for <a 6944 href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support 6945 in OpenNSD/AOLServer</a></li> 6946 <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the 6947 first version of libxml/libxslt <a 6948 href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li> 6949 <li>Petr Kozelka provides <a 6950 href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue 6951 libxml2</a> with Kylix and Delphi and other Pascal compilers</li> 6952 <li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the 6953 <a href="http://www.w3.org/Signature/">XML Canonicalization and XML 6954 Digital Signature</a> <a 6955 href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li> 6956 <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and 6957 contributors maintain <a href="http://tclxml.sourceforge.net/">tcl 6958 bindings for libxml2 and libxslt</a>, as well as <a 6959 href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for 6960 xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a> 6961 a GUI for xsltproc.</li> 6962</ul> 6963 6964<p></p> 6965</body> 6966</html> 6967