Daniel Veillard | 09ab7e1 | 2001-07-10 15:49:44 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 | "http://www.w3.org/TR/html4/loose.dtd"> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 3 | <html> |
| 4 | <head> |
Daniel Veillard | 598bec3 | 2003-07-06 10:02:03 +0000 | [diff] [blame] | 5 | <title>The XML C parser and toolkit of Gnome</title> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 6 | <meta name="GENERATOR" content="amaya 8.8.5, see http://www.w3.org/Amaya/"> |
| 7 | <meta http-equiv="content-type" content="text/html"> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 8 | </head> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 9 | |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 10 | <body bgcolor="#ffffff"> |
Daniel Veillard | 598bec3 | 2003-07-06 10:02:03 +0000 | [diff] [blame] | 11 | <h1 align="center">The XML C parser and toolkit of Gnome</h1> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 12 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 13 | <h1>Note: this is the flat content of the <a |
| 14 | href="index.html">website</a></h1> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 15 | |
Daniel Veillard | c948420 | 2001-10-24 12:35:52 +0000 | [diff] [blame] | 16 | <h1 style="text-align: center">libxml, a.k.a. gnome-xml</h1> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 17 | |
| 18 | <p></p> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 19 | |
Daniel Veillard | 7ebac02 | 2004-02-25 22:36:35 +0000 | [diff] [blame] | 20 | <p |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 21 | style="text-align: right; font-style: italic; font-size: 10pt">"Programmingwithlibxml2 |
| 22 | is like the thrilling embrace of an exotic stranger." <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 23 | href="http://diveintomark.org/archives/2004/02/18/libxml2">MarkPilgrim</a></p> |
Daniel Veillard | 7ebac02 | 2004-02-25 22:36:35 +0000 | [diff] [blame] | 24 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 25 | <p>Libxml2 is the XML C parser and toolkit developed for the Gnomeproject(but |
| 26 | usable outside of the Gnome platform), it is free softwareavailableunder the |
| 27 | <a |
| 28 | href="http://www.opensource.org/licenses/mit-license.html">MITLicense</a>.XML |
| 29 | itself is a metalanguage to design markup languages, i.e.text languagewhere |
| 30 | semantic and structure are added to the content usingextra |
| 31 | "markup"information enclosed between angle brackets. HTML is the |
| 32 | mostwell-knownmarkup language. Though the library is written in C <a |
| 33 | href="python.html">avariety of language bindings</a>make it available inother |
| 34 | environments.</p> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 35 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 36 | <p>Libxml2 is known to be very portable, the library should build |
| 37 | andworkwithout serious troubles on a variety of systems (Linux, |
| 38 | Unix,Windows,CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)</p> |
Daniel Veillard | 710823b | 2003-03-04 10:05:52 +0000 | [diff] [blame] | 39 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 40 | <p>Libxml2 implements a number of existing standards related |
| 41 | tomarkuplanguages:</p> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 42 | <ul> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 43 | <li>the XML standard: <a |
| 44 | href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li> |
| 45 | <li>Namespaces in XML: <a |
| 46 | href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li> |
| 47 | <li>XML Base: <a |
| 48 | href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 49 | <li><a |
| 50 | href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC2396</a>:Uniform |
| 51 | Resource Identifiers <a |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 52 | href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li> |
| 53 | <li>XML Path Language (XPath) 1.0: <a |
| 54 | href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li> |
| 55 | <li>HTML4 parser: <a |
| 56 | href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li> |
Daniel Veillard | 23a52c5 | 2003-08-18 10:01:18 +0000 | [diff] [blame] | 57 | <li>XML Pointer Language (XPointer) Version 1.0: <a |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 58 | href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li> |
| 59 | <li>XML Inclusions (XInclude) Version 1.0: <a |
| 60 | href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li> |
Daniel Veillard | 23a52c5 | 2003-08-18 10:01:18 +0000 | [diff] [blame] | 61 | <li>ISO-8859-x encodings, as well as <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 62 | href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a>[UTF-8]and<a |
| 63 | href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>[UTF-16]Unicode |
| 64 | encodings, and more if using iconv support</li> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 65 | <li>part of SGML Open Technical Resolution TR9401:1997</li> |
| 66 | <li>XML Catalogs Working Draft 06 August 2001: <a |
| 67 | 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> |
Daniel Veillard | 5c39654 | 2002-03-15 07:57:50 +0000 | [diff] [blame] | 68 | <li>Canonical XML Version 1.0: <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 69 | href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>andthe |
| 70 | Exclusive XML Canonicalization CR draft <a |
Daniel Veillard | 2d347fa | 2002-03-17 10:34:11 +0000 | [diff] [blame] | 71 | href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li> |
Daniel Veillard | 758c531 | 2003-12-15 11:51:25 +0000 | [diff] [blame] | 72 | <li>Relax NG, ISO/IEC 19757-2:2003, <a |
Daniel Veillard | 17bed98 | 2003-02-24 20:11:43 +0000 | [diff] [blame] | 73 | 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> |
Daniel Veillard | f83a2c7 | 2003-04-08 13:48:40 +0000 | [diff] [blame] | 74 | <li>W3C XML Schemas Part 2: Datatypes <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 75 | href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC |
| 76 | 02May2001</a></li> |
| 77 | <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a>Working |
| 78 | Draft7April 2004</li> |
Daniel Veillard | 9698445 | 2000-08-31 13:50:12 +0000 | [diff] [blame] | 79 | </ul> |
| 80 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 81 | <p>In most cases libxml2 tries to implement the specifications in |
| 82 | arelativelystrictly compliant way. As of release 2.4.16, libxml2 passed |
| 83 | all1800+ testsfrom the <a |
| 84 | href="http://www.oasis-open.org/committees/xml-conformance/">OASIS |
| 85 | XMLTestsSuite</a>.</p> |
Daniel Veillard | 5b16f58 | 2002-02-20 11:38:46 +0000 | [diff] [blame] | 86 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 87 | <p>To some extent libxml2 provides support for the |
| 88 | followingadditionalspecifications but doesn't claim to implement them |
| 89 | completely:</p> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 90 | <ul> |
| 91 | <li>Document Object Model (DOM) <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 92 | href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>thedocument |
| 93 | model, but it doesn't implement the API itself, gdome2 doesthison top of |
| 94 | libxml2</li> |
| 95 | <li><a |
| 96 | href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC959</a>:libxml2 |
| 97 | implements a basic FTP client code</li> |
| 98 | <li><a |
| 99 | href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC1945</a>:HTTP/1.0, |
| 100 | again a basic HTTP client code</li> |
| 101 | <li>SAX: a SAX2 like interface and a minimal SAX1 |
| 102 | implementationcompatiblewith early expat versions</li> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 103 | </ul> |
| 104 | |
Daniel Veillard | f83a2c7 | 2003-04-08 13:48:40 +0000 | [diff] [blame] | 105 | <p>A partial implementation of <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 106 | href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas |
| 107 | Part1:Structure</a>is being worked on but it would be far too early to |
| 108 | makeanyconformance statement about it at the moment.</p> |
Daniel Veillard | e6d8e20 | 2002-05-02 06:11:10 +0000 | [diff] [blame] | 109 | |
Daniel Veillard | 9698445 | 2000-08-31 13:50:12 +0000 | [diff] [blame] | 110 | <p>Separate documents:</p> |
| 111 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 112 | <li><a href="http://xmlsoft.org/XSLT/">the libxslt |
| 113 | page</a>providinganimplementation of XSLT 1.0 and common extensions like |
| 114 | EXSLTforlibxml2</li> |
| 115 | <li><a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 |
| 116 | page</a>:a standard DOM2 implementation for libxml2</li> |
| 117 | <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec |
| 118 | page</a>:animplementation of <a |
| 119 | href="http://www.w3.org/TR/xmldsig-core/">W3CXMLDigital Signature</a>for |
| 120 | libxml2</li> |
| 121 | <li>also check the related links section below for more related |
| 122 | andactiveprojects.</li> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 123 | </ul> |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 124 | <!----------------<p>Results of the <a |
Daniel Veillard | 806cada | 2003-03-19 21:58:59 +0000 | [diff] [blame] | 125 | href="http://xmlbench.sourceforge.net/results/benchmark/index.html">xmlbench |
Daniel Veillard | 31ae462 | 2004-02-16 07:45:44 +0000 | [diff] [blame] | 126 | benchmark</a> on sourceforge February 2004 (smaller is better):</p> |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame] | 127 | |
Daniel Veillard | 31ae462 | 2004-02-16 07:45:44 +0000 | [diff] [blame] | 128 | <p align="center"><img src="benchmark.png" |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame] | 129 | alt="benchmark results for Expat Xerces libxml2 Oracle and Sun toolkits"></p> |
Daniel Veillard | cf80b78 | 2004-03-07 19:32:19 +0000 | [diff] [blame] | 130 | --------------> |
Daniel Veillard | 806cada | 2003-03-19 21:58:59 +0000 | [diff] [blame] | 131 | |
Daniel Veillard | e166254 | 2002-08-28 11:50:59 +0000 | [diff] [blame] | 132 | <p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p> |
| 133 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 134 | <h2><a name="Introducti">Introduction</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 135 | |
Daniel Veillard | f13e1ed | 2000-03-06 07:41:49 +0000 | [diff] [blame] | 136 | <p>This document describes libxml, the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 137 | href="http://www.w3.org/XML/">XML</a>C parser and toolkit developed for the<a |
| 138 | href="http://www.gnome.org/">Gnome</a>project. <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 139 | href="http://www.w3.org/XML/">XML is a standard</a>for |
| 140 | buildingtag-basedstructured documents/data.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 141 | |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 142 | <p>Here are some key points about libxml:</p> |
| 143 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 144 | <li>Libxml2 exports Push (progressive) and Pull (blocking) |
| 145 | typeparserinterfaces for both XML and HTML.</li> |
| 146 | <li>Libxml2 can do DTD validation at parse time, using a |
| 147 | parseddocumentinstance, or with an arbitrary DTD.</li> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 148 | <li>Libxml2 includes complete <a |
Daniel Veillard | 8c2ecaf | 2001-07-10 17:53:07 +0000 | [diff] [blame] | 149 | href="http://www.w3.org/TR/xpath">XPath</a>, <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 150 | href="http://www.w3.org/TR/xptr">XPointer</a>and <a |
| 151 | href="http://www.w3.org/TR/xinclude">XInclude</a>implementations.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 152 | <li>It is written in plain C, making as few assumptions as |
| 153 | possible,andsticking closely to ANSI C/POSIX for easy embedding. |
| 154 | WorksonLinux/Unix/Windows, ported to a number of other platforms.</li> |
| 155 | <li>Basic support for HTTP and FTP client allowing applications |
| 156 | tofetchremote resources.</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 157 | <li>The design is modular, most of the extensions can be compiled out.</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 158 | <li>The internal document representation is as close as possible to the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 159 | href="http://www.w3.org/DOM/">DOM</a>interfaces.</li> |
Daniel Veillard | 560c2a4 | 2003-07-06 21:13:49 +0000 | [diff] [blame] | 160 | <li>Libxml2 also has a <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 161 | href="http://www.megginson.com/SAX/index.html">SAX like |
| 162 | interface</a>;theinterface is designed to be compatible with <a |
Daniel Veillard | 402e8c8 | 2000-02-29 22:57:47 +0000 | [diff] [blame] | 163 | href="http://www.jclark.com/xml/expat.html">Expat</a>.</li> |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 164 | <li>This library is released under the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 165 | href="http://www.opensource.org/licenses/mit-license.html">MITLicense</a>.See |
| 166 | the Copyright file in the distribution for the precisewording.</li> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 167 | </ul> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 168 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 169 | <p>Warning: unless you are forced to because your application links |
| 170 | withaGnome-1.X library requiring it, <strong><span |
| 171 | style="background-color: #FF0000">Do Not Use |
| 172 | libxml1</span></strong>,uselibxml2</p> |
Daniel Veillard | e0c1d72 | 2001-03-21 10:28:36 +0000 | [diff] [blame] | 173 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 174 | <h2><a name="FAQ">FAQ</a></h2> |
| 175 | |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 176 | <p>Table of Contents:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 177 | <ul> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 178 | <li><a href="FAQ.html#License">License(s)</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 179 | <li><a href="FAQ.html#Installati">Installation</a></li> |
| 180 | <li><a href="FAQ.html#Compilatio">Compilation</a></li> |
| 181 | <li><a href="FAQ.html#Developer">Developer corner</a></li> |
| 182 | </ul> |
| 183 | |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 184 | <h3><a name="License">License</a>(s)</h3> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 185 | <ol> |
| 186 | <li><em>Licensing Terms for libxml</em> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 187 | <p>libxml2 is released under the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 188 | href="http://www.opensource.org/licenses/mit-license.html">MITLicense</a>;see |
| 189 | the file Copyright in the distribution for the precisewording</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 190 | </li> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 191 | <li><em>Can I embed libxml2 in a proprietary application ?</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 192 | <p>Yes. The MIT License allows you to keep proprietary the changesyoumade |
| 193 | to libxml, but it would be graceful to send-back bug fixesandimprovements |
| 194 | as patches for possible incorporation in themaindevelopment tree.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 195 | </li> |
| 196 | </ol> |
| 197 | |
| 198 | <h3><a name="Installati">Installation</a></h3> |
| 199 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 200 | <li><strong><span style="background-color: #FF0000">Do |
| 201 | NotUselibxml1</span></strong>, use libxml2</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 202 | <li><em>Where can I get libxml</em>? |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 203 | <p>The original distribution comes from <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 204 | href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>or <a |
Daniel Veillard | 024f199 | 2003-12-10 16:43:49 +0000 | [diff] [blame] | 205 | href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 206 | <p>Most Linux and BSD distributions include libxml, this is |
| 207 | probablythesafer way for end-users to use libxml.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 208 | <p>David Doolin provides precompiled Windows versions at <a |
| 209 | href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p> |
| 210 | </li> |
| 211 | <li><em>I see libxml and libxml2 releases, which one should I install ?</em> |
| 212 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 213 | <li>If you are not constrained by backward compatibility |
| 214 | issueswithexisting applications, install libxml2 only</li> |
| 215 | <li>If you are not doing development, you can safely |
| 216 | installboth.Usually the packages <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 217 | href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a>and <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 218 | href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a>arecompatible(this |
| 219 | is not the case for development packages).</li> |
| 220 | <li>If you are a developer and your system provides |
| 221 | separatepackagingfor shared libraries and the development components, |
| 222 | it ispossibleto install libxml and libxml2, and also <a |
| 223 | href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>and<a |
| 224 | href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>toofor |
| 225 | libxml2 >= 2.3.0</li> |
| 226 | <li>If you are developing a new application, please |
| 227 | developagainstlibxml2(-devel)</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 228 | </ul> |
| 229 | </li> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 230 | <li><em>I can't install the libxml package, it conflicts with libxml0</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 231 | <p>You probably have an old libxml0 package used to provide |
| 232 | thesharedlibrary for libxml.so.0, you can probably safely remove it. |
| 233 | Thelibxmlpackages provided on <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 234 | href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>providelibxml.so.0</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 235 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 236 | <li><em>I can't install the libxml(2) RPM package due |
| 237 | tofaileddependencies</em> |
| 238 | <p>The most generic solution is to re-fetch the latest src.rpm |
| 239 | ,andrebuild it locally with</p> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 240 | <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 241 | <p>If everything goes well it will generate two binary rpm |
| 242 | packages(oneproviding the shared libs and xmllint, and the other one, |
| 243 | the-develpackage, providing includes, static libraries and scripts needed |
| 244 | tobuildapplications with libxml(2)) that you can install locally.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 245 | </li> |
| 246 | </ol> |
| 247 | |
| 248 | <h3><a name="Compilatio">Compilation</a></h3> |
| 249 | <ol> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 250 | <li><em>What is the process to compile libxml2 ?</em> |
| 251 | <p>As most UNIX libraries libxml2 follows the "standard":</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 252 | <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p> |
| 253 | <p><code>cd libxml-xxxx</code></p> |
| 254 | <p><code>./configure --help</code></p> |
| 255 | <p>to see the options, then the compilation/installation proper</p> |
| 256 | <p><code>./configure [possible options]</code></p> |
| 257 | <p><code>make</code></p> |
| 258 | <p><code>make install</code></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 259 | <p>At that point you may have to rerun ldconfig or a similar |
| 260 | utilitytoupdate your list of installed shared libs.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 261 | </li> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 262 | <li><em>What other libraries are needed to compile/install libxml2 ?</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 263 | <p>Libxml2 does not require any other library, the normal C ANSIAPIshould |
| 264 | be sufficient (please report any violation to this rule youmayfind).</p> |
| 265 | <p>However if found at configuration time libxml2 will detect and |
| 266 | usethefollowing libs:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 267 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 268 | <li><a |
| 269 | href="http://www.info-zip.org/pub/infozip/zlib/">libz</a>:ahighly |
| 270 | portable and available widely compression library.</li> |
| 271 | <li>iconv: a powerful character encoding conversion library. |
| 272 | Itisincluded by default in recent glibc libraries, so it doesn't |
| 273 | needtobe installed specifically on Linux. It now seems a <a |
| 274 | href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">partofthe |
| 275 | official UNIX</a>specification. Here is one <a |
| 276 | href="http://www.gnu.org/software/libiconv/">implementation |
| 277 | ofthelibrary</a>which source can be found <a |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 278 | href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li> |
| 279 | </ul> |
| 280 | </li> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 281 | <li><em>Make check fails on some platforms</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 282 | <p>Sometimes the regression tests' results don't completely matchthevalue |
| 283 | produced by the parser, and the makefile uses diff to printthedelta. On |
| 284 | some platforms the diff return breaks the compilationprocess;if the diff |
| 285 | is small this is probably not a serious problem.</p> |
| 286 | <p>Sometimes (especially on Solaris) make checks fail due tolimitationsin |
| 287 | make. Try using GNU-make instead.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 288 | </li> |
| 289 | <li><em>I use the CVS version and there is no configure script</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 290 | <p>The configure script (and other Makefiles) are generated. |
| 291 | Usetheautogen.sh script to regenerate the configure script |
| 292 | andMakefiles,like:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 293 | <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p> |
| 294 | </li> |
| 295 | <li><em>I have troubles when running make tests with gcc-3.0</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 296 | <p>It seems the initial release of gcc-3.0 has a problem withtheoptimizer |
| 297 | which miscompiles the URI module. Please useanothercompiler.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 298 | </li> |
| 299 | </ol> |
| 300 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 301 | <h3><a name="Developer">Developer</a>corner</h3> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 302 | <ol> |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 303 | <li><em>Troubles compiling or linking programs using libxml2</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 304 | <p>Usually the problem comes from the fact that the compiler |
| 305 | doesn'tgetthe right compilation or linking flags. There is a small |
| 306 | shellscript<code>xml2-config</code>which is installed as part of |
| 307 | libxml2usualinstall process which provides those flags. Use</p> |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 308 | <p><code>xml2-config --cflags</code></p> |
| 309 | <p>to get the compilation flags and</p> |
| 310 | <p><code>xml2-config --libs</code></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 311 | <p>to get the linker flags. Usually this is done directly fromtheMakefile |
| 312 | as:</p> |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 313 | <p><code>CFLAGS=`xml2-config --cflags`</code></p> |
| 314 | <p><code>LIBS=`xml2-config --libs`</code></p> |
| 315 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 316 | <li><em>I want to install my own copy of libxml2 in my home |
| 317 | directoryandlink my programs against it, but it doesn't work</em> |
| 318 | <p>There are many different ways to accomplish this. Here is one waytodo |
| 319 | this under Linux. Suppose your home directory |
| 320 | is<code>/home/user.</code>Then:</p> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 321 | <ul> |
| 322 | <li>Create a subdirectory, let's call it <code>myxml</code></li> |
William M. Brack | 99906ad | 2005-01-09 17:02:42 +0000 | [diff] [blame] | 323 | <li>unpack the libxml2 distribution into that subdirectory</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 324 | <li>chdir into the unpacked |
| 325 | distribution(<code>/home/user/myxml/libxml2</code>)</li> |
| 326 | <li>configure the library using the |
| 327 | "<code>--prefix</code>"switch,specifying an installation |
| 328 | subdirectoryin<code>/home/user/myxml</code>, e.g. |
| 329 | <p><code>./configure |
| 330 | --prefix/home/user/myxml/xmlinst</code>{otherconfiguration |
| 331 | options}</p> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 332 | </li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 333 | <li>now run <code>make</code>followed by <code>make install</code></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 334 | <li>At this point, the installation subdirectory contains |
| 335 | thecomplete"private" include files, library files and binary |
| 336 | programfiles (e.g.xmllint), located in |
| 337 | <p><code>/home/user/myxml/xmlinst/lib,/home/user/myxml/xmlinst/include</code>and |
| 338 | <code>/home/user/myxml/xmlinst/bin</code></p> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 339 | respectively.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 340 | <li>In order to use this "private" library, you should first add |
| 341 | ittothe beginning of your default PATH (so that your own |
| 342 | privateprogramfiles such as xmllint will be used instead of the |
| 343 | normalsystemones). To do this, the Bash command would be |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 344 | <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p> |
| 345 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 346 | <li>Now suppose you have a program <code>test1.c</code>that |
| 347 | youwouldlike to compile with your "private" library. Simply compile |
| 348 | itusingthe command |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 349 | <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 350 | Note that, because your PATH has been set |
| 351 | with<code>/home/user/myxml/xmlinst/bin</code>at the beginning, |
| 352 | thexml2-configprogram which you just installed will be used instead |
| 353 | ofthe systemdefault one, and this will <em>automatically</em>get |
| 354 | thecorrectlibraries linked with your program.</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 355 | </ul> |
| 356 | </li> |
| 357 | |
| 358 | <p></p> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 359 | <li><em>xmlDocDump() generates output on one line.</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 360 | <p>Libxml2 will not <strong>invent</strong>spaces in the content |
| 361 | ofadocument since <strong>all spaces in the content of a |
| 362 | documentaresignificant</strong>. If you build a tree from the API |
| 363 | andwantindentation:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 364 | <ol> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 365 | <li>the correct way is to generate those yourself too.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 366 | <li>the dangerous way is to ask libxml2 to add those blanks |
| 367 | toyourcontent <strong>modifying the content of your document |
| 368 | intheprocess</strong>. The result may not be what you expect. |
| 369 | Thereis<strong>NO</strong>way to guarantee that such a |
| 370 | modificationwon'taffect other parts of the content of your document. |
| 371 | See <a |
| 372 | href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault()</a>and<a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 373 | href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile()</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 374 | </ol> |
| 375 | </li> |
| 376 | <li>Extra nodes in the document: |
| 377 | <p><em>For a XML file as below:</em></p> |
| 378 | <pre><?xml version="1.0"?> |
| 379 | <PLAN xmlns="http://www.argus.ca/autotest/1.0/"> |
| 380 | <NODE CommFlag="0"/> |
| 381 | <NODE CommFlag="1"/> |
| 382 | </PLAN></pre> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 383 | <p><em>after parsing it with |
| 384 | thefunctionpxmlDoc=xmlParseFile(...);</em></p> |
| 385 | <p><em>I want to the get the content of the first node (node |
| 386 | withtheCommFlag="0")</em></p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 387 | <p><em>so I did it as following;</em></p> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 388 | <pre>xmlNodePtr pnode; |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 389 | pnode=pxmlDoc->children->children;</pre> |
| 390 | <p><em>but it does not work. If I change it to</em></p> |
| 391 | <pre>pnode=pxmlDoc->children->children->next;</pre> |
| 392 | <p><em>then it works. Can someone explain it to me.</em></p> |
| 393 | <p></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 394 | <p>In XML all characters in the content of the document |
| 395 | aresignificant<strong>including blanks and formatting |
| 396 | linebreaks</strong>.</p> |
| 397 | <p>The extra nodes you are wondering about are just that, text |
| 398 | nodeswiththe formatting spaces which are part of the document but that |
| 399 | peopletendto forget. There is a function <a |
| 400 | href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault()</a>toremove |
| 401 | those at parse time, but that's an heuristic, and itsuse should belimited |
| 402 | to cases where you are certain there is nomixed-content in |
| 403 | thedocument.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 404 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 405 | <li><em>I get compilation errors of existing code like |
| 406 | whenaccessing<strong>root</strong>or <strong>child |
| 407 | fields</strong>ofnodes.</em> |
| 408 | <p>You are compiling code developed for libxml version 1 and |
| 409 | usingalibxml2 development environment. Either switch back to libxml v1 |
| 410 | develoreven better fix the code to compile with libxml2 (or both) by <a |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 411 | href="upgrade.html">following the instructions</a>.</p> |
| 412 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 413 | <li><em>I get compilation errors about |
| 414 | nonexisting<strong>xmlRootNode</strong>or<strong>xmlChildrenNode</strong>fields.</em> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 415 | <p>The source code you are using has been <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 416 | href="upgrade.html">upgraded</a>to be able to compile with both |
| 417 | libxmlandlibxml2, but you need to install a more recent |
| 418 | version:libxml(-devel)>= 1.8.8 or libxml2(-devel) >= 2.1.0</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 419 | </li> |
| 420 | <li><em>XPath implementation looks seriously broken</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 421 | <p>XPath implementation prior to 2.3.0 was really incomplete. Upgrade |
| 422 | toarecent version, there are no known bugs in the current version.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 423 | </li> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 424 | <li><em>The example provided in the web page does not compile.</em> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 425 | <p>It's hard to maintain the documentation in sync with |
| 426 | thecode<grin/> ...</p> |
| 427 | <p>Check the previous points 1/ and 2/ raised before, and |
| 428 | pleasesendpatches.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 429 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 430 | <li><em>Where can I get more examples and information than provided |
| 431 | ontheweb page?</em> |
| 432 | <p>Ideally a libxml2 book would be nice. I have no such plan ... |
| 433 | Butyoucan:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 434 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 435 | <li>check more deeply the <a |
| 436 | href="html/libxml-lib.html">existinggenerated doc</a></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 437 | <li>have a look at <a href="examples/index.html">the |
| 438 | setofexamples</a>.</li> |
| 439 | <li>look for examples of use for libxml2 function using the |
| 440 | Gnomecode.For example the following will query the full Gnome CVS |
| 441 | base fortheuse of the <strong>xmlAddChild()</strong>function: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 442 | <p><a |
| 443 | href="http://cvs.gnome.org/lxr/search?string=xmlAddChild">http://cvs.gnome.org/lxr/search?string=xmlAddChild</a></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 444 | <p>This may be slow, a large hardware donation to the |
| 445 | gnomeprojectcould cure this :-)</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 446 | </li> |
| 447 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 448 | href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gnome-xml">Browsethelibxml2 |
| 449 | source</a>, I try to write code as clean and documentedaspossible, so |
| 450 | looking at it may be helpful. In particular the codeofxmllint.c and |
| 451 | of the various testXXX.c test programs shouldprovidegood examples of |
| 452 | how to do things with the library.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 453 | </ul> |
| 454 | </li> |
| 455 | <li>What about C++ ? |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 456 | <p>libxml2 is written in pure C in order to allow easy reuse on anumberof |
| 457 | platforms, including embedded systems. I don't intend to converttoC++.</p> |
Daniel Veillard | 91e69c5 | 2003-08-04 01:43:07 +0000 | [diff] [blame] | 458 | <p>There is however a C++ wrapper which may fulfill your needs:</p> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 459 | <ul> |
| 460 | <li>by Ari Johnson <ari@btigate.com>: |
| 461 | <p>Website: <a |
Daniel Veillard | 91e69c5 | 2003-08-04 01:43:07 +0000 | [diff] [blame] | 462 | href="http://libxmlplusplus.sourceforge.net/">http://libxmlplusplus.sourceforge.net/</a></p> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 463 | <p>Download: <a |
Daniel Veillard | 91e69c5 | 2003-08-04 01:43:07 +0000 | [diff] [blame] | 464 | href="http://sourceforge.net/project/showfiles.php?group_id=12999">http://sourceforge.net/project/showfiles.php?group_id=12999</a></p> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 465 | </li> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 466 | <!-- Website is currently unavailable as of 2003-08-02 |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 467 | <li>by Peter Jones <pjones@pmade.org> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 468 | <p>Website: <a |
| 469 | href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 470 | </li> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 471 | --> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 472 | </ul> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 473 | </li> |
| 474 | <li>How to validate a document a posteriori ? |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 475 | <p>It is possible to validate documents which had not been |
| 476 | validatedatinitial parsing time or documents which have been built |
| 477 | fromscratchusing the API. Use the <a |
| 478 | href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a>function.It |
| 479 | is also possible to simply add a DTD to an existingdocument:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 480 | <pre>xmlDocPtr doc; /* your existing document */ |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 481 | xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ |
| 482 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 483 | dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */ |
| 484 | |
| 485 | doc->intSubset = dtd; |
| 486 | if (doc->children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd); |
| 487 | else xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd); |
| 488 | </pre> |
| 489 | </li> |
Daniel Veillard | dad3f68 | 2002-11-17 16:47:27 +0000 | [diff] [blame] | 490 | <li>So what is this funky "xmlChar" used all the time? |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 491 | <p>It is a null terminated sequence of utf-8 characters. And |
| 492 | onlyutf-8!You need to convert strings encoded in different ways to |
| 493 | utf-8beforepassing them to the API. This can be accomplished with the |
| 494 | iconvlibraryfor instance.</p> |
John Fleck | 61f6fb6 | 2002-10-31 15:23:29 +0000 | [diff] [blame] | 495 | </li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 496 | <li>etc ...</li> |
| 497 | </ol> |
| 498 | |
| 499 | <p></p> |
| 500 | |
Daniel Veillard | 66f68e7 | 2003-08-18 16:39:51 +0000 | [diff] [blame] | 501 | <h2><a name="Documentat">Developer Menu</a></h2> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 502 | |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 503 | <p>There are several on-line resources related to using libxml:</p> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 504 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 505 | <li>Use the <a href="search.php">search engine</a>to lookupinformation.</li> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 506 | <li>Check the <a href="FAQ.html">FAQ.</a></li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 507 | <li>Check the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 508 | href="http://xmlsoft.org/html/libxml-lib.html">extensivedocumentation</a>automaticallyextracted |
| 509 | from code comments.</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 510 | <li>Look at the documentation about <a |
| 511 | href="encoding.html">libxmlinternationalization support</a>.</li> |
| 512 | <li>This page provides a global overview and <a |
| 513 | href="example.html">someexamples</a>on how to use libxml.</li> |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 514 | <li><a href="examples/index.html">Code examples</a></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 515 | <li>John Fleck's libxml2 tutorial: <a |
| 516 | href="tutorial/index.html">html</a>or<a |
| 517 | href="tutorial/xmltutorial.pdf">pdf</a>.</li> |
Daniel Veillard | 1177ca4 | 2003-04-26 22:29:54 +0000 | [diff] [blame] | 518 | <li>If you need to parse large files, check the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 519 | href="xmlreader.html">xmlReader</a>API tutorial</li> |
| 520 | <li><a href="mailto:james@daa.com.au">James Henstridge</a>wrote <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 521 | href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">somenicedocumentation</a>explaining |
| 522 | how to use the libxml SAX interface.</li> |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 523 | <li>George Lebl wrote <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 524 | href="http://www-106.ibm.com/developerworks/library/l-gnome3/">anarticlefor |
| 525 | IBM developerWorks</a>about using libxml.</li> |
| 526 | <li>Check <a |
| 527 | href="http://cvs.gnome.org/lxr/source/gnome-xml/TODO">theTODOfile</a>.</li> |
| 528 | <li>Read the <a href="upgrade.html">1.x to 2.x upgrade |
| 529 | path</a>description.If you are starting a new project using libxml you |
| 530 | shouldreally use the2.x version.</li> |
Daniel Veillard | 845cce4 | 2002-01-09 11:51:37 +0000 | [diff] [blame] | 531 | <li>And don't forget to look at the <a |
| 532 | href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 533 | </ol> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 534 | |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 535 | <h2><a name="Reporting">Reporting bugs and getting help</a></h2> |
Daniel Veillard | 4c3a203 | 1999-11-19 17:46:26 +0000 | [diff] [blame] | 536 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 537 | <p>Well, bugs or missing features are always possible, and I will make |
| 538 | apointof fixing them in a timely fashion. The best way to report a bug is |
| 539 | touse the<a |
| 540 | href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnomebugtracking |
| 541 | database</a>(make sure to use the "libxml2" module name). Ilook atreports |
| 542 | there regularly and it's good to have a reminder when a bugis stillopen. Be |
| 543 | sure to specify that the bug is for the package libxml2.</p> |
Daniel Veillard | 4c3a203 | 1999-11-19 17:46:26 +0000 | [diff] [blame] | 544 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 545 | <p>For small problems you can try to get help on IRC, the #xml |
| 546 | channelonirc.gnome.org (port 6667) usually have a few person subscribed which |
| 547 | mayhelp(but there is no garantee and if a real issue is raised it should go |
| 548 | onthemailing-list for archival).</p> |
Daniel Veillard | 9582d6c | 2003-09-16 11:40:04 +0000 | [diff] [blame] | 549 | |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 550 | <p>There is also a mailing-list <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 551 | href="mailto:xml@gnome.org">xml@gnome.org</a>for libxml, with an <a |
| 552 | href="http://mail.gnome.org/archives/xml/">on-line archive</a>(<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 553 | href="http://xmlsoft.org/messages">old</a>). To subscribe to this |
| 554 | list,pleasevisit the <a |
| 555 | href="http://mail.gnome.org/mailman/listinfo/xml">associatedWeb</a>page |
| 556 | andfollow the instructions. <strong>Do not send code, I won'tdebug |
| 557 | it</strong>(but patches are really appreciated!).</p> |
Daniel Veillard | d99224d | 2004-04-06 10:04:16 +0000 | [diff] [blame] | 558 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 559 | <p>Please note that with the current amount of virus and SPAM, sending |
| 560 | mailtothe list without being subscribed won't work. There is *far too |
| 561 | manybounces*(in the order of a thousand a day !) I cannot approve them |
| 562 | manuallyanymore.If your mail to the list bounced waiting for administrator |
| 563 | approval,it isLOST ! Repost it and fix the problem triggering the error. Also |
| 564 | pleasenotethat <span style="color: #FF0000; background-color: #FFFFFF">emails |
| 565 | withalegal warning asking to not copy or redistribute freely the |
| 566 | informationstheycontain</span>are <strong>NOT</strong>acceptable for the |
| 567 | mailing-list,suchmail will as much as possible be discarded automatically, |
| 568 | and are lesslikelyto be answered if they made it to the list, <strong>DO |
| 569 | NOT</strong>post tothe list from an email address where such legal |
| 570 | requirements areautomaticallyadded, get private paying support if you can't |
| 571 | shareinformations.</p> |
Daniel Veillard | 234547b | 2001-07-05 09:46:10 +0000 | [diff] [blame] | 572 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 573 | <p>Check the following <strong><span |
| 574 | style="color: #FF0000">beforeposting</span></strong>:</p> |
Daniel Veillard | 234547b | 2001-07-05 09:46:10 +0000 | [diff] [blame] | 575 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 576 | <li>Read the <a href="FAQ.html">FAQ</a>and <a |
| 577 | href="search.php">usethesearch engine</a>to get information related to |
| 578 | your problem.</li> |
| 579 | <li>Make sure you are <a href="ftp://xmlsoft.org/libxml2/">using |
| 580 | arecentversion</a>, and that the problem still shows up in a |
| 581 | recentversion.</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 582 | <li>Check the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 583 | href="http://mail.gnome.org/archives/xml/">listarchives</a>to see if |
| 584 | theproblem was reported already. In this casethere is probably a |
| 585 | fixavailable, similarly check the <a |
| 586 | href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">registeredopenbugs</a>.</li> |
| 587 | <li>Make sure you can reproduce the bug with xmllint or one of |
| 588 | thetestprograms found in source in the distribution.</li> |
| 589 | <li>Please send the command showing the error as well as the input |
| 590 | (asanattachment)</li> |
Daniel Veillard | 234547b | 2001-07-05 09:46:10 +0000 | [diff] [blame] | 591 | </ul> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 592 | |
Daniel Veillard | a37aab8 | 2003-06-09 09:10:36 +0000 | [diff] [blame] | 593 | <p>Then send the bug with associated information to reproduce it to the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 594 | href="mailto:xml@gnome.org">xml@gnome.org</a>list; if it's |
| 595 | reallylibxmlrelated I will approve it. Please do not send mail to me |
| 596 | directly, itmakesthings really hard to track and in some cases I am not the |
| 597 | best persontoanswer a given question, ask on the list.</p> |
Daniel Veillard | 98d071d | 2003-01-10 09:22:44 +0000 | [diff] [blame] | 598 | |
| 599 | <p>To <span style="color: #E50000">be really clear about support</span>:</p> |
| 600 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 601 | <li>Support or help <span style="color: #E50000">requests MUST be senttothe |
| 602 | list or on bugzilla</span>in case of problems, so that theQuestionand |
| 603 | Answers can be shared publicly. Failing to do so carries |
| 604 | theimplicitmessage "I want free support but I don't want to share |
| 605 | thebenefits withothers" and is not welcome. I will automatically |
| 606 | Carbon-Copythexml@gnome.org mailing list for any technical reply made |
| 607 | about libxml2orlibxslt.</li> |
| 608 | <li>There is <span style="color: #E50000">no garantee of |
| 609 | support</span>,ifyour question remains unanswered after a week, repost |
| 610 | it, making sureyougave all the detail needed and the information |
| 611 | requested.</li> |
| 612 | <li>Failing to provide information as requested or double checking |
| 613 | firstforprior feedback also carries the implicit message "the time of |
| 614 | thelibrarymaintainers is less valuable than my time" and might not |
| 615 | bewelcome.</li> |
Daniel Veillard | 98d071d | 2003-01-10 09:22:44 +0000 | [diff] [blame] | 616 | </ul> |
Daniel Veillard | 4c3a203 | 1999-11-19 17:46:26 +0000 | [diff] [blame] | 617 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 618 | <p>Of course, bugs reported with a suggested patch for fixing |
| 619 | themwillprobably be processed faster than those without.</p> |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 620 | |
| 621 | <p>If you're looking for help, a quick look at <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 622 | href="http://mail.gnome.org/archives/xml/">the list |
| 623 | archive</a>mayactuallyprovide the answer. I usually send source samples when |
| 624 | answeringlibxml2usage questions. The <a |
| 625 | href="http://xmlsoft.org/html/book1.html">auto-generateddocumentation</a>isnot |
| 626 | as polished as I would like (i need to learn moreabout DocBook), butit's a |
| 627 | good starting point.</p> |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 628 | |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 629 | <h2><a name="help">How to help</a></h2> |
| 630 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 631 | <p>You can help the project in various ways, the best thing to do first |
| 632 | istosubscribe to the mailing-list as explained before, check the <a |
Daniel Veillard | f7ed336 | 2001-08-17 12:01:21 +0000 | [diff] [blame] | 633 | href="http://mail.gnome.org/archives/xml/">archives </a>and the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 634 | href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnomebugdatabase</a>:</p> |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 635 | <ol> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 636 | <li>Provide patches when you find problems.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 637 | <li>Provide the diffs when you port libxml2 to a new platform. They |
| 638 | maynotbe integrated in all cases but help pinpointing |
| 639 | portabilityproblemsand</li> |
| 640 | <li>Provide documentation fixes (either as patches to the code commentsoras |
| 641 | HTML diffs).</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 642 | <li>Provide new documentations pieces (translations, examples, etc...).</li> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 643 | <li>Check the TODO file and try to close one of the items.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 644 | <li>Take one of the points raised in the archive or the bug |
| 645 | databaseandprovide a fix. <a href="mailto:daniel@veillard.com">Get in |
| 646 | touch withme</a>before to avoid synchronization problems and check that |
| 647 | thesuggestedfix will fit in nicely :-)</li> |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 648 | </ol> |
| 649 | |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 650 | <h2><a name="Downloads">Downloads</a></h2> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 651 | |
Daniel Veillard | 688f669 | 2004-03-26 10:57:38 +0000 | [diff] [blame] | 652 | <p>The latest versions of libxml2 can be found on the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 653 | href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>server ( <a |
Daniel Veillard | eca726d | 2004-04-18 21:47:34 +0000 | [diff] [blame] | 654 | href="http://xmlsoft.org/sources/">HTTP</a>, <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 655 | href="ftp://xmlsoft.org/libxml2/">FTP</a>and rsync are available), there |
| 656 | isalsomirrors (<a |
| 657 | href="ftp://ftp.planetmirror.com/pub/xmlsoft/">Australia</a>(<a |
| 658 | href="http://xmlsoft.planetmirror.com/">Web</a>), <a |
Daniel Veillard | 20c8cf2 | 2001-06-26 22:47:36 +0000 | [diff] [blame] | 659 | href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 660 | href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a>as <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 661 | href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source |
| 662 | archive</a>,Antonin Sprinzl also provide <a |
| 663 | href="ftp://gd.tuwien.ac.at/pub/libxml/">amirror in Austria</a>. (NOTE |
| 664 | thatyou need both the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 665 | href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a>and <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 666 | href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>packagesinstalled |
| 667 | to compile applications using libxml.)</p> |
Daniel Veillard | eca726d | 2004-04-18 21:47:34 +0000 | [diff] [blame] | 668 | |
| 669 | <p>You can find all the history of libxml(2) and libxslt releases in the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 670 | href="http://xmlsoft.org/sources/old/">old</a>directory. |
| 671 | TheprecompiledWindows binaries made by Igor Zlatovic are available in the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 672 | href="http://xmlsoft.org/sources/win32/">win32</a>directory.</p> |
Daniel Veillard | b46a573 | 2003-04-08 13:35:48 +0000 | [diff] [blame] | 673 | |
| 674 | <p>Binary ports:</p> |
| 675 | <ul> |
| 676 | <li>Red Hat RPMs for i386 are available directly on <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 677 | href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>, the source RPM |
| 678 | willcompile onany architecture supported by Red Hat.</li> |
| 679 | <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a>is |
| 680 | nowthemaintainer of the Windows port, <a |
| 681 | href="http://www.zlatkovic.com/projects/libxml/index.html">heprovidesbinaries</a>.</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 682 | <li>Blastwave provides <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 683 | href="http://www.blastwave.org/packages.php/libxml2">Solarisbinaries</a>.</li> |
| 684 | <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a>provides <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 685 | href="http://www.explain.com.au/oss/libxml2xslt.html">Mac |
| 686 | OsXbinaries</a>.</li> |
Daniel Veillard | b46a573 | 2003-04-08 13:35:48 +0000 | [diff] [blame] | 687 | <li>The HP-UX porting center provides <a |
| 688 | href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 689 | <li>Bull provides precompiled <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 690 | href="http://gnome.bullfreeware.com/new_index.html">RPMs forAIX</a>aspatr |
| 691 | of their GNOME packages</li> |
Daniel Veillard | b46a573 | 2003-04-08 13:35:48 +0000 | [diff] [blame] | 692 | </ul> |
| 693 | |
| 694 | <p>If you know other supported binary ports, please <a |
| 695 | href="http://veillard.com/">contact me</a>.</p> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 696 | |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 697 | <p><a name="Snapshot">Snapshot:</a></p> |
| 698 | <ul> |
Daniel Veillard | 3cef119 | 2004-08-18 09:30:31 +0000 | [diff] [blame] | 699 | <li>Code from the W3C cvs base libxml2 module, updated hourly <a |
Daniel Veillard | 9110ed6 | 2006-04-03 15:21:57 +0000 | [diff] [blame] | 700 | href="ftp://xmlsoft.org/libxml2/libxml2-cvs-snapshot.tar.gz">libxml2-cvs-snapshot.tar.gz</a>.</li> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 701 | <li>Docs, content of the web site, the list archive included <a |
Daniel Veillard | 9110ed6 | 2006-04-03 15:21:57 +0000 | [diff] [blame] | 702 | href="ftp://xmlsoft.org/libxml2/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 703 | </ul> |
| 704 | |
Daniel Veillard | c6271d2 | 2001-10-27 07:50:58 +0000 | [diff] [blame] | 705 | <p><a name="Contribs">Contributions:</a></p> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 706 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 707 | <p>I do accept external contributions, especially if compiling |
| 708 | onanotherplatform, get in touch with the list to upload the package, |
| 709 | wrappersforvarious languages have been provided, and can be found in the <a |
Daniel Veillard | d99224d | 2004-04-06 10:04:16 +0000 | [diff] [blame] | 710 | href="python.html">bindings section</a></p> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 711 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 712 | <p>Libxml2 is also available from CVS:</p> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 713 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 714 | <li><p>The <a |
| 715 | href="http://cvs.gnome.org/viewcvs/libxml2/">GnomeCVSbase</a>. Check the |
| 716 | <a href="http://developer.gnome.org/tools/cvs.html">Gnome CVS |
| 717 | Tools</a>page;the CVS module is <b>libxml2</b>.</p> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 718 | </li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 719 | <li>The <strong>libxslt</strong>module is also present there</li> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 720 | </ul> |
| 721 | |
Daniel Veillard | 78fed53 | 2004-10-09 19:44:48 +0000 | [diff] [blame] | 722 | <h2><a name="News">Releases</a></h2> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 723 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 724 | <p>Items not finished and worked on, get in touch with the list if you |
| 725 | wanttohelp those</p> |
Daniel Veillard | ab8500d | 2000-10-15 21:06:19 +0000 | [diff] [blame] | 726 | <ul> |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 727 | <li>More testing on RelaxNG</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 728 | <li>Finishing up <a |
| 729 | href="http://www.w3.org/TR/xmlschema-1/">XMLSchemas</a></li> |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 730 | </ul> |
| 731 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 732 | <p>The <a href="ChangeLog.html">change log</a>describes the recents |
| 733 | commitstothe <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a>code |
| 734 | base.</p> |
Daniel Veillard | 2d90803 | 2004-08-10 10:16:36 +0000 | [diff] [blame] | 735 | |
Daniel Veillard | d99224d | 2004-04-06 10:04:16 +0000 | [diff] [blame] | 736 | <p>There is the list of public releases:</p> |
| 737 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 738 | <h3>2.6.26: Jun 6 2006</h3> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 739 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 740 | <li>portability fixes: Python detection (Joseph Sacco), compilation |
| 741 | error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)</li> |
| 742 | <li>bug fixes: encoding buffer problem, mix of code and data in |
| 743 | xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik), |
| 744 | variousXSD validation fixes (Kasimier), memory leak in pattern (Rob |
| 745 | Richards andKasimier), attribute with colon in name (Rob Richards), XPath |
| 746 | leak inerror reporting (Aleksey Sanin), XInclude text include of |
| 747 | selfdocument.</li> |
| 748 | <li>improvements: Xpath optimizations (Kasimier), XPath object |
| 749 | cache(Kasimier)</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 750 | </ul> |
| 751 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 752 | <h3>2.6.25: Jun 6 2006:</h3> |
| 753 | |
| 754 | <p>Do not use or package 2.6.25</p> |
| 755 | |
Daniel Veillard | b2f8f1d | 2006-04-28 16:30:48 +0000 | [diff] [blame] | 756 | <h3>2.6.24: Apr 28 2006</h3> |
| 757 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 758 | <li>Portability fixes: configure on Windows, testapi compile |
| 759 | onwindows(Kasimier Buchcik, venkat naidu), Borland C++ 6 compile |
| 760 | (EricZurcher),HP-UX compiler workaround (Rick Jones), xml2-config |
| 761 | bugfix,gcc-4.1cleanups, Python detection scheme (Joseph Sacco), UTF-8 |
| 762 | file pathsonWindows (Roland Schwingel).</li> |
| 763 | <li>Improvements: xmlDOMWrapReconcileNamespaces |
| 764 | xmlDOMWrapCloneNode(KasimierBuchcik), XML catalog debugging (Rick Jones), |
| 765 | update to Unicode4.01.</li> |
| 766 | <li>Bug fixes: xmlParseChunk() problem in 2.6.23, |
| 767 | xmlParseInNodeContext()onHTML docs, URI behaviour on Windows (Rob |
| 768 | Richards), comment streamingbug,xmlParseComment (with William Brack), |
| 769 | regexp bug fixes (DV &YouriGolovanov), xmlGetNodePath on text/CDATA |
| 770 | (Kasimier),one Relax-NGinterleave bug, xmllint --path and --valid,XSD |
| 771 | bugfixes (Kasimier),remove debugleft in Python bindings (Nic Ferrier), |
| 772 | xmlCatalogAdd bug(Martin Cole),xmlSetProp fixes (Rob Richards), HTML |
| 773 | IDness (RobRichards), a largenumber of cleanups and small fixes based on |
| 774 | Coverityreports, bugin character ranges, Unicode tables const (Aivars |
| 775 | Kalvans),schemasfix (Stefan Kost), xmlRelaxNGParse |
| 776 | errordeallocation,xmlSchemaAddSchemaDoc error deallocation, error |
| 777 | handling onunallowedcode point, ixmllint --nonet to never reach the net |
| 778 | (GaryCoady),line break in writer after end PI (Jason Viers).</li> |
Daniel Veillard | b2f8f1d | 2006-04-28 16:30:48 +0000 | [diff] [blame] | 779 | <li>Documentation: man pages updates and cleanups (Daniel Leidert).</li> |
| 780 | <li>New features: Relax NG structure error handlers.</li> |
| 781 | </ul> |
| 782 | |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 783 | <h3>2.6.23: Jan 5 2006</h3> |
| 784 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 785 | <li>portability fixes: Windows (Rob Richards), getaddrinfo on |
| 786 | Windows(KoljaNowak, Rob Richards), icc warnings (Kjartan |
| 787 | Maraas),--with-minimumcompilation fixes (William Brack), error case |
| 788 | handling fixon Solaris(Albert Chin), don't use 'list' as parameter name |
| 789 | reported bySamuel DiazGarcia, more old Unices portability fixes (Albert |
| 790 | Chin),MinGW compilation(Mark Junker), HP-UX compiler warnings |
| 791 | (RickJones),</li> |
| 792 | <li>code cleanup: xmlReportError (Adrian Mouat), removexmlBufferClose(Geert |
| 793 | Jansen), unreachable code (Oleksandr Kononenko),refactoringparsing code |
| 794 | (Bjorn Reese)</li> |
| 795 | <li>bug fixes: xmlBuildRelativeURI and empty path |
| 796 | (WilliamBrack),combinatory explosion and performances in regexp code, |
| 797 | leakinxmlTextReaderReadString(), xmlStringLenDecodeEntities |
| 798 | problem(MassimoMorara), Identity Constraints bugs and a segfault |
| 799 | (KasimierBuchcik),XPath pattern based evaluation bugs (DV |
| 800 | &Kasimier),xmlSchemaContentModelDump() memory leak (Kasimier), |
| 801 | potentialleak inxmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() |
| 802 | misuseofvsnprintf (William Brack), XHTML serialization fix (Rob |
| 803 | Richards),CRLFsplit problem (William), issues with non-namespaced |
| 804 | attributesinxmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() |
| 805 | (RobRichards),HTML parsing of script, Python must not output to stdout |
| 806 | (NicFerrier),exclusive C14N namespace visibility (Aleksey Sanin), |
| 807 | XSDdataypetotalDigits bug (Kasimier Buchcik), error handling when writing |
| 808 | toanxmlBuffer (Rob Richards), runtest schemas error not |
| 809 | reported(HisashiFujinaka), signed/unsigned problem in date/time code |
| 810 | (AlbertChin), fixXSI driven XSD validation (Kasimier), parsing of |
| 811 | xs:decimal(Kasimier),fix DTD writer output (Rob Richards), leak |
| 812 | inxmlTextReaderReadInnerXml(Gary Coady), regexp bug affecting |
| 813 | schemas(Kasimier), configuration ofruntime debugging |
| 814 | (Kasimier),xmlNodeBufGetContent bug on entity refs(Oleksandr |
| 815 | Kononenko),xmlRegExecPushString2 bug (Sreeni Nair),compilation and build |
| 816 | fixes(Michael Day), removed dependancies onxmlSchemaValidError |
| 817 | (Kasimier), bugwith <xml:foo/>, more XPathpattern based evaluation |
| 818 | fixes(Kasimier)</li> |
| 819 | <li>improvements: XSD Schemas redefinitions/restrictions |
| 820 | (KasimierBuchcik),node copy checks and fix for attribute (Rob Richards), |
| 821 | countedtransitionbug in regexps, ctxt->standalone = -2 to indicate |
| 822 | nostandaloneattribute was found, add |
| 823 | xmlSchemaSetParserStructuredErrors()(KasimierBuchcik), add |
| 824 | xmlTextReaderSchemaValidateCtxt() to API(Kasimier), handlegzipped HTTP |
| 825 | resources (Gary Coady), addhtmlDocDumpMemoryFormat. (RobRichards),</li> |
| 826 | <li>documentation: typo (Michael Day), libxml man page (Albert |
| 827 | Chin),savefunction to XML buffer (Geert Jansen), small doc fix |
| 828 | (AronStansvik),</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 829 | </ul> |
| 830 | |
Daniel Veillard | 33b20b7 | 2005-09-12 21:43:20 +0000 | [diff] [blame] | 831 | <h3>2.6.22: Sep 12 2005</h3> |
| 832 | <ul> |
| 833 | <li>build fixes: compile without schematron (Stéphane Bidoul)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 834 | <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg |
| 835 | Paraschenko)i,CDATApush parser bug, xmlElemDump problem with XHTML1 |
| 836 | doc,XML_FEATURE_xxxclash with expat headers renamed XML_WITH_xxx, fix |
| 837 | someoutput formattingfor meta element (Rob Richards), script and |
| 838 | styleXHTML1 serialization(David Madore), Attribute derivation fixups in |
| 839 | XSD(Kasimier Buchcik),better IDC error reports (Kasimier Buchcik)</li> |
| 840 | <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob |
| 841 | Richards),addXML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements |
| 842 | preparingforderive (Kasimier Buchcik).</li> |
| 843 | <li>documentation: generation of gtk-doc like docs, |
| 844 | integrationwithdevhelp.</li> |
Daniel Veillard | 33b20b7 | 2005-09-12 21:43:20 +0000 | [diff] [blame] | 845 | </ul> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 846 | |
Daniel Veillard | b3d1491 | 2005-09-04 20:47:39 +0000 | [diff] [blame] | 847 | <h3>2.6.21: Sep 4 2005</h3> |
| 848 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 849 | <li>build fixes: Cygwin portability fixes (Gerrit P. |
| 850 | Haase),callingconvention problems on Windows (Marcus Boerger), cleanups |
| 851 | based onLinus'sparse tool, update of win32/configure.js (Rob Richards), |
| 852 | removewarningson Windows(Marcus Boerger), compilation without SAX1, |
| 853 | detectionof thePython binary, use $GCC inestad of $CC = 'gcc' (Andrew |
| 854 | W.Nosenko),compilation/link with threads and old gcc, compile problem |
| 855 | byC370 onZ/OS,</li> |
| 856 | <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML |
| 857 | UTF-8bug(Jiri Netolicky), XPath NaN compare bug (William |
| 858 | Brack),htmlParseScriptpotential bug, Schemas regexp handling of spaces, |
| 859 | Base64Schemascomparisons NIST passes, automata build error |
| 860 | xsd:all,xmlGetNodePath fornamespaced attributes (Alexander Pohoyda), |
| 861 | xmlSchemasforeign namespaceshandling, XML Schemas facet comparison |
| 862 | (KupriyanovAnatolij),xmlSchemaPSimpleTypeErr error report (Kasimier |
| 863 | Buchcik), xml:namespaceahndling in Schemas (Kasimier), empty model group |
| 864 | in Schemas(Kasimier),wilcard in Schemas (Kasimier), URI composition |
| 865 | (William),xs:anyType inSchemas (Kasimier), Python resolver emmitting |
| 866 | errormessages directly,Python xmlAttr.parent (Jakub Piotr Clapa), trying |
| 867 | tofix the file path/URIconversion, xmlTextReaderGetAttribute fix |
| 868 | (RobRichards),xmlSchemaFreeAnnot memleak (Kasimier), HTML |
| 869 | UTF-8serialization, streamingXPath, Schemas determinism detection |
| 870 | problem,XInclude bug, Schemascontext type (Dean Hill), validation fix |
| 871 | (DerekPoon),xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), |
| 872 | Schemastype fix(Kuba Nowakowski), UTF-8 parser bug, error in |
| 873 | encodinghandling,xmlGetLineNo fixes, bug on entities handling, entity |
| 874 | nameextraction inerror handling with XInclude, text nodes in HTML body |
| 875 | tags(Gary Coady),xml:id and IDness at the treee level fixes, XPath |
| 876 | streamingpatternsbugs.</li> |
| 877 | <li>improvements: structured interfaces for schemas and RNG |
| 878 | errorreports(Marcus Boerger), optimization of the char data inner |
| 879 | loopparsing(thanks to Behdad Esfahbod for the idea), schematron |
| 880 | validationthoughnot finished yet, xmlSaveOption to omit XML declaration, |
| 881 | keyrefmatcherror reports (Kasimier), formal expression handling code |
| 882 | notpluggedyet, more lax mode for the HTML parser, parser |
| 883 | XML_PARSE_COMPACToptionfor text nodes allocation.</li> |
Daniel Veillard | b3d1491 | 2005-09-04 20:47:39 +0000 | [diff] [blame] | 884 | <li>documentation: xmllint man page had --nonet duplicated</li> |
| 885 | </ul> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 886 | |
Daniel Veillard | 78dfc9f | 2005-07-10 22:30:30 +0000 | [diff] [blame] | 887 | <h3>2.6.20: Jul 10 2005</h3> |
| 888 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 889 | <li>build fixes: Windows build (Rob Richards), Mingw |
| 890 | compilation(IgorZlatkovic), Windows Makefile (Igor), gcc warnings |
| 891 | (Kasimierandandriy@google.com), use gcc weak references to pthread to |
| 892 | avoidthepthread dependancy on Linux, compilation problem (Steve |
| 893 | Nairn),compilingof subset (Morten Welinder), IPv6/ss_family compilation |
| 894 | (WilliamBrack),compilation when disabling parts of the library, |
| 895 | standalonetestdistribution.</li> |
| 896 | <li>bug fixes: bug in lang(), memory cleanup on errors (William |
| 897 | Brack),HTTPquery strings (Aron Stansvik), memory leak in DTD |
| 898 | (William),integeroverflow in XPath (William), nanoftp buffer size, |
| 899 | pattern "." apthfixup(Kasimier), leak in tree reported by Malcolm Rowe, |
| 900 | replaceNodepatch(Brent Hendricks), CDATA with NULL content (Mark Vakoc), |
| 901 | xml:basefixupon XInclude (William), pattern fixes (William), attribute |
| 902 | buginexclusive c14n (Aleksey Sanin), xml:space and xml:lang with |
| 903 | SAX2(RobRichards), namespace trouble in complex parsing (Malcolm Rowe), |
| 904 | XSDtypeQNames fixes (Kasimier), XPath streaming fixups (William), |
| 905 | RelaxNGbug(Rob Richards), Schemas for Schemas fixes (Kasimier), removal |
| 906 | of ID(RobRichards), a small RelaxNG leak, HTML parsing in push mode |
| 907 | bug(JamesBursa), failure to detect UTF-8 parsing bugs in |
| 908 | CDATAsections,areBlanks() heuristic failure, duplicate attributes in |
| 909 | DTDbug(William).</li> |
| 910 | <li>improvements: lot of work on Schemas by Kasimier Buchcik |
| 911 | bothonconformance and streaming, Schemas validation messages |
| 912 | (KasimierBuchcik,Matthew Burgess), namespace removal at the python |
| 913 | level(BrentHendricks), Update to new Schemas regression tests |
| 914 | fromW3C/Nist(Kasimier), xmlSchemaValidateFile() (Kasimier), |
| 915 | implementationofxmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml |
| 916 | (JamesWert),standalone test framework and programs, new DOM |
| 917 | importAPIsxmlDOMWrapReconcileNamespaces() |
| 918 | xmlDOMWrapAdoptNode()andxmlDOMWrapRemoveNode(), extension of xmllint |
| 919 | capabilities for SAXandSchemas regression tests, xmlStopParser() |
| 920 | available in pull modetoo,ienhancement to xmllint --shell namespaces |
| 921 | support, Windows port ofthestandalone testing tools (Kasimier |
| 922 | andWilliam),xmlSchemaValidateStream() xmlSchemaSAXPlug() |
| 923 | andxmlSchemaSAXUnplug() SAXSchemas APIs, Schemas xmlReader support.</li> |
Daniel Veillard | 78dfc9f | 2005-07-10 22:30:30 +0000 | [diff] [blame] | 924 | </ul> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 925 | |
Daniel Veillard | 771971f | 2005-04-02 10:49:51 +0000 | [diff] [blame] | 926 | <h3>2.6.19: Apr 02 2005</h3> |
| 927 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 928 | <li>build fixes: drop .la from RPMs, --with-minimum build |
| 929 | fix(WilliamBrack), use XML_SOCKLEN_T instead of SOCKLEN_T because it |
| 930 | breakswith AIX5.3 compiler, fixed elfgcchack.h generation and PLT |
| 931 | reductioncode onLinux/ELF/gcc4</li> |
| 932 | <li>bug fixes: schemas type decimal fixups (William Brack), |
| 933 | xmmlintreturncode (Gerry Murphy), small schemas fixes (Matthew Burgess |
| 934 | andGUYFabrice), workaround "DAV:" namespace brokeness in c14n |
| 935 | (AlekseySanin),segfault in Schemas (Kasimier Buchcik), Schemas |
| 936 | attributevalidation(Kasimier), Prop related functions and |
| 937 | xmlNewNodeEatName (RobRichards),HTML serialization of name attribute on a |
| 938 | elements, Pythonerror handlersleaks and improvement (Brent Hendricks), |
| 939 | uninitializedvariable inencoding code, Relax-NG validation bug, potential |
| 940 | crashifgnorableWhitespace is NULL, xmlSAXParseDoc and |
| 941 | xmlParseDocsignatures,switched back to assuming UTF-8 in case no encoding |
| 942 | is givenatserialization time</li> |
| 943 | <li>improvements: lot of work on Schemas by Kasimier Buchcik |
| 944 | onfacetschecking and also mixed handling.</li> |
Daniel Veillard | 771971f | 2005-04-02 10:49:51 +0000 | [diff] [blame] | 945 | <li></li> |
| 946 | </ul> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 947 | |
Daniel Veillard | 57c000e | 2005-03-13 18:34:29 +0000 | [diff] [blame] | 948 | <h3>2.6.18: Mar 13 2005</h3> |
| 949 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 950 | <li>build fixes: warnings (Peter Breitenlohner), |
| 951 | testapi.cgeneration,Bakefile support (Francesco Montorsi), Windows |
| 952 | compilation(Joel Reed),some gcc4 fixes, HP-UX portability fixes (Rick |
| 953 | Jones).</li> |
| 954 | <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), |
| 955 | pushandxmlreader stopping on non-fatal errors, thread support |
| 956 | fordictionnariesreference counting (Gary Coady), internal subset and |
| 957 | pushproblem, URLsaved in xmlCopyDoc, various schemas bug fixes |
| 958 | (Kasimier),Python pathsfixup (Stephane Bidoul), xmlGetNodePath and |
| 959 | namespaces,xmlSetNsProp fix(Mike Hommey), warning should not count as |
| 960 | error (WilliamBrack),xmlCreatePushParser empty chunk, XInclude parser |
| 961 | flags (William),cleanupFTP and HTTP code to reuse the uri parsing and |
| 962 | IPv6(William),xmlTextWriterStartAttributeNS fix (Rob |
| 963 | Richards),XMLLINT_INDENT beingempty (William), xmlWriter bugs (Rob |
| 964 | Richards),multithreading on Windows(Rich Salz), xmlSearchNsByHref fix |
| 965 | (Kasimier),Python binding leak (BrentHendricks), aliasing bug exposed by |
| 966 | gcc4 ons390, xmlTextReaderNext bug(Rob Richards), Schemas decimal type |
| 967 | fixes(William Brack),xmlByteConsumed static buffer (Ben Maurer).</li> |
| 968 | <li>improvement: speedup parsing comments and DTDs, dictionnary |
| 969 | supportforhash tables, Schemas Identity constraints (Kasimier), |
| 970 | streamingXPathsubset, xmlTextReaderReadString added (Bjorn Reese), |
| 971 | Schemascanonicalvalues handling (Kasimier), add |
| 972 | xmlTextReaderByteConsumed(AronStansvik),</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 973 | <li>Documentation: Wiki support (Joel Reed)</li> |
Daniel Veillard | 57c000e | 2005-03-13 18:34:29 +0000 | [diff] [blame] | 974 | </ul> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 975 | |
Daniel Veillard | 298d964 | 2005-01-16 20:01:55 +0000 | [diff] [blame] | 976 | <h3>2.6.17: Jan 16 2005</h3> |
| 977 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 978 | <li>build fixes: Windows, warnings removal (William |
| 979 | Brack),maintainer-cleandependency(William), build in a different |
| 980 | directory(William), fixing--with-minimum configure build (William), BeOS |
| 981 | build(Marcin Konicki),Python-2.4 detection (William), compilation on AIX |
| 982 | (DanMcNichol)</li> |
| 983 | <li>bug fixes: xmlTextReaderHasAttributes (Rob |
| 984 | Richards),xmlCtxtReadFile()to use the catalog(s), loop on output (William |
| 985 | Brack),XPath memory leak,ID deallocation problem (Steve Shepard), |
| 986 | debugDumpNodecrash (William),warning not using error callback (William), |
| 987 | xmlStopParserbug (William),UTF-16 with BOM on DTDs (William), namespace |
| 988 | bug on emptyelements inpush mode (Rob Richards), line and col |
| 989 | computations fixups(AlekseySanin), xmlURIEscape fix (William), |
| 990 | xmlXPathErr on bad range(William),patterns with too many steps, bug in |
| 991 | RNG choice optimization,line numbersometimes missing.</li> |
| 992 | <li>improvements: XSD Schemas (Kasimier Buchcik), pythongenerator(William), |
| 993 | xmlUTF8Strpos speedup (William), unicode Pythonstrings(William), XSD |
| 994 | error reports (Kasimier Buchcik), Python __str__callserialize().</li> |
| 995 | <li>new APIs: added xmlDictExists(), GetLineNumber and |
| 996 | GetColumnNumberforthe xmlReader (Aleksey Sanin), Dynamic Shared Libraries |
| 997 | APIs (mostlyJoelReed), error extraction API from regexps, new XMLSave |
| 998 | option forformat(Phil Shafer)</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 999 | <li>documentation: site improvement (John Fleck), FAQ entries(William).</li> |
Daniel Veillard | 298d964 | 2005-01-16 20:01:55 +0000 | [diff] [blame] | 1000 | </ul> |
| 1001 | |
Daniel Veillard | c3d7cb4 | 2004-11-10 14:34:45 +0000 | [diff] [blame] | 1002 | <h3>2.6.16: Nov 10 2004</h3> |
| 1003 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1004 | <li>general hardening and bug fixing crossing all the API based |
| 1005 | onnewautomated regression testing</li> |
Daniel Veillard | c3d7cb4 | 2004-11-10 14:34:45 +0000 | [diff] [blame] | 1006 | <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1007 | <li>bug fixes: problem with XML::Libxml reported by Petr |
| 1008 | Pajas,encodingconversion functions return values, UTF-8 bug affecting |
| 1009 | XPathreported byMarkus Bertheau, catalog problem with NULL entries |
| 1010 | (WilliamBrack)</li> |
| 1011 | <li>documentation: fix to xmllint man page, some API |
| 1012 | functiondescritpionwere updated.</li> |
| 1013 | <li>improvements: DTD validation APIs provided at the Python |
| 1014 | level(BrentHendricks)</li> |
Daniel Veillard | c3d7cb4 | 2004-11-10 14:34:45 +0000 | [diff] [blame] | 1015 | </ul> |
| 1016 | |
Daniel Veillard | c2f83d1 | 2004-10-27 22:59:21 +0000 | [diff] [blame] | 1017 | <h3>2.6.15: Oct 27 2004</h3> |
Daniel Veillard | 6927b10 | 2004-10-27 17:29:04 +0000 | [diff] [blame] | 1018 | <ul> |
| 1019 | <li>security fixes on the nanoftp and nanohttp modules</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1020 | <li>build fixes: xmllint detection bug in configure, building |
| 1021 | outsidethesource tree (Thomas Fitzsimmons)</li> |
| 1022 | <li>bug fixes: HTML parser on broken ASCII chars in names |
| 1023 | (William),Pythonpaths (Malcolm Tredinnick), xmlHasNsProp and default |
| 1024 | namespace(William),saving to python file objects (Malcolm Tredinnick), |
| 1025 | DTD lookupfix(Malcolm), save back <group> in catalogs (William), |
| 1026 | treebuildfixes (DV and Rob Richards), Schemas memory bug, structured |
| 1027 | errorhandleron Python 64bits, thread local memory deallocation, memory |
| 1028 | leakreportedby Volker Roth, xmlValidateDtd in the presence of an |
| 1029 | internalsubset,entities and _private problem (William), |
| 1030 | xmlBuildRelativeURIerror(William).</li> |
| 1031 | <li>improvements: better XInclude error reports (William), |
| 1032 | treedebuggingmodule and tests, convenience functions at the Reader |
| 1033 | API(GrahamBennett), add support for PI in the HTML parser.</li> |
Daniel Veillard | 6927b10 | 2004-10-27 17:29:04 +0000 | [diff] [blame] | 1034 | </ul> |
| 1035 | |
Daniel Veillard | 210818b | 2004-09-29 15:50:37 +0000 | [diff] [blame] | 1036 | <h3>2.6.14: Sep 29 2004</h3> |
| 1037 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1038 | <li>build fixes: configure paths for xmllint and |
| 1039 | xsltproc,compilationwithout HTML parser, compilation warning cleanups |
| 1040 | (WilliamBrack &Malcolm Tredinnick), VMS makefile update (Craig |
| 1041 | Berry),</li> |
| 1042 | <li>bug fixes: xmlGetUTF8Char (William Brack), QName |
| 1043 | properties(KasimierBuchcik), XInclude testing, Notation |
| 1044 | serialization,UTF8ToISO8859xtranscoding (Mark Itzcovitz), lots of XML |
| 1045 | Schemas cleanupand fixes(Kasimier), ChangeLog cleanup (Stepan Kasal), |
| 1046 | memory fixes (MarkVakoc),handling of failed realloc(), out of bound array |
| 1047 | adressing inSchemasdate handling, Python space/tabs cleanups (Malcolm |
| 1048 | Tredinnick),NMTOKENSE20 validation fix (Malcolm),</li> |
| 1049 | <li>improvements: added W3C XML Schemas testsuite (Kasimier |
| 1050 | Buchcik),addxmlSchemaValidateOneElement (Kasimier), Python |
| 1051 | exceptionhierearchy(Malcolm Tredinnick), Python libxml2 driver |
| 1052 | improvement(MalcolmTredinnick), Schemas support |
| 1053 | forxsi:schemaLocation,xsi:noNamespaceSchemaLocation, xsi:type |
| 1054 | (KasimierBuchcik)</li> |
Daniel Veillard | 210818b | 2004-09-29 15:50:37 +0000 | [diff] [blame] | 1055 | </ul> |
| 1056 | |
Daniel Veillard | d1de4a3 | 2004-08-31 13:43:07 +0000 | [diff] [blame] | 1057 | <h3>2.6.13: Aug 31 2004</h3> |
| 1058 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1059 | <li>build fixes: Windows and zlib (Igor Zlatkovic), -O flag withgcc,Solaris |
| 1060 | compiler warning, fixing RPM BuildRequires,</li> |
| 1061 | <li>fixes: DTD loading on Windows (Igor), Schemas error |
| 1062 | reportsAPIs(Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 |
| 1063 | (WilliamBrackand Julius Mittenzwei), Schemas facet check (Kasimier), |
| 1064 | defaultnamespaceproblem (William), Schemas hexbinary empty values, |
| 1065 | encodingerror couldgenrate a serialization loop.</li> |
| 1066 | <li>Improvements: Schemas validity improvements (Kasimier), added |
| 1067 | --pathand--load-trace options to xmllint</li> |
Daniel Veillard | d1de4a3 | 2004-08-31 13:43:07 +0000 | [diff] [blame] | 1068 | <li>documentation: tutorial update (John Fleck)</li> |
| 1069 | </ul> |
| 1070 | |
Daniel Veillard | b331fff | 2004-08-22 14:21:57 +0000 | [diff] [blame] | 1071 | <h3>2.6.12: Aug 22 2004</h3> |
| 1072 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1073 | <li>build fixes: fix --with-minimum, elfgcchack.h |
| 1074 | fixes(PeterBreitenlohner), perl path lookup (William), diff on |
| 1075 | Solaris(AlbertChin), some 64bits cleanups.</li> |
| 1076 | <li>Python: avoid a warning with 2.3 (William Brack), tab and |
| 1077 | spacemixes(William), wrapper generator fixes (William), Cygwin support |
| 1078 | (GerritP.Haase), node wrapper fix (Marc-Antoine Parent), XML |
| 1079 | Schemassupport(Torkel Lyng)</li> |
Daniel Veillard | b331fff | 2004-08-22 14:21:57 +0000 | [diff] [blame] | 1080 | <li>Schemas: a lot of bug fixes and improvements from Kasimier Buchcik</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1081 | <li>fixes: RVT fixes (William), XPath context resets bug |
| 1082 | (William),memorydebug (Steve Hay), catalog white space handling |
| 1083 | (PeterBreitenlohner),xmlReader state after attribute reading |
| 1084 | (William),structured errorhandler (William), XInclude generated xml:base |
| 1085 | fixup(William), Windowsmemory reallocation problem (Steve Hay), Out of |
| 1086 | Memoryconditionshandling (William and Olivier Andrieu), htmlNewDoc() |
| 1087 | charsetbug,htmlReadMemory init (William), a posteriori validation |
| 1088 | DTDbase(William), notations serialization missing, |
| 1089 | xmlGetNodePath(Dodji),xmlCheckUTF8 (Diego Tartara), missing line numbers |
| 1090 | onentity(William)</li> |
| 1091 | <li>improvements: DocBook catalog build scrip (William), |
| 1092 | xmlcatalogtool(Albert Chin), xmllint --c14n option, no_proxy environment |
| 1093 | (MikeHommey),xmlParseInNodeContext() addition, extend xmllint --shell, |
| 1094 | allowXIncludeto not generate start/end nodes, extend xmllint --version |
| 1095 | toinclude CVStag (William)</li> |
| 1096 | <li>documentation: web pages fixes, validity API docs fixes(William)schemas |
| 1097 | API fix (Eric Haszlakiewicz), xmllint man page (JohnFleck)</li> |
Daniel Veillard | b331fff | 2004-08-22 14:21:57 +0000 | [diff] [blame] | 1098 | </ul> |
| 1099 | |
Daniel Veillard | 45cb0f4 | 2004-07-05 17:45:35 +0000 | [diff] [blame] | 1100 | <h3>2.6.11: July 5 2004</h3> |
| 1101 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1102 | <li>Schemas: a lot of changes and improvements by Kasimier |
| 1103 | Buchcikforattributes, namespaces and simple types.</li> |
| 1104 | <li>build fixes: --with-minimum (William Brack), some gcccleanup(William), |
| 1105 | --with-thread-alloc (William)</li> |
| 1106 | <li>portability: Windows binary package change (Igor Zlatkovic),Catalogpath |
| 1107 | on Windows</li> |
| 1108 | <li>documentation: update to the tutorial (John Fleck), xmllint |
| 1109 | returncode(John Fleck), man pages (Ville Skytta),</li> |
| 1110 | <li>bug fixes: C14N bug serializing namespaces (Aleksey |
| 1111 | Sanin),testSAXproperly initialize the library (William), empty node set |
| 1112 | inXPath(William), xmlSchemas errors (William), invalid charref |
| 1113 | problempointedby Morus Walter, XInclude xml:base generation (William), |
| 1114 | Relax-NGbugwith div processing (William), XPointer and |
| 1115 | xml:baseproblem(William),Reader and entities, xmllint return code for |
| 1116 | schemas(William), readerstreaming problem (Steve Ball), DTD |
| 1117 | serializationproblem (William),libxml.m4 fixes (Mike Hommey), do not |
| 1118 | providedestructors as methods onPython classes, xmlReader buffer bug, |
| 1119 | Pythonbindings memory interfacesimprovement (with Stéphane Bidoul), Fixed |
| 1120 | thepush parser to be back tosynchronous behaviour.</li> |
| 1121 | <li>improvement: custom per-thread I/O enhancement (Rob |
| 1122 | Richards),registernamespace in debug shell (Stefano Debenedetti), Python |
| 1123 | basedregressiontest for non-Unix users (William), dynamically increase |
| 1124 | thenumber ofXPath extension functions in Python and fix a memory |
| 1125 | leak(Marc-AntoineParent and William)</li> |
| 1126 | <li>performance: hack done with Arjan van de Ven to reduce ELF |
| 1127 | footprintandgenerated code on Linux, plus use gcc runtime profiling to |
| 1128 | optimizethecode generated in the RPM packages.</li> |
Daniel Veillard | 45cb0f4 | 2004-07-05 17:45:35 +0000 | [diff] [blame] | 1129 | </ul> |
| 1130 | |
Daniel Veillard | 8120501 | 2004-05-18 03:06:41 +0000 | [diff] [blame] | 1131 | <h3>2.6.10: May 17 2004</h3> |
| 1132 | <ul> |
| 1133 | <li>Web page generated for ChangeLog</li> |
| 1134 | <li>build fixes: --without-html problems, make check without make all</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1135 | <li>portability: problem with xpath.c on Windows (MSC and |
| 1136 | Borland),memcmpvs. strncmp on Solaris, XPath tests on Windows (Mark |
| 1137 | Vakoc), C++ donotuse "list" as parameter name, make tests work with |
| 1138 | Python 1.5(EdDavis),</li> |
| 1139 | <li>improvements: made xmlTextReaderMode public, small |
| 1140 | buffersresizing(Morten Welinder), add --maxmem option to |
| 1141 | xmllint,addxmlPopInputCallback() for Matt Sergeant, refactoring |
| 1142 | ofserializationescaping, added escaping customization</li> |
| 1143 | <li>bugfixes: xsd:extension (Taihei Goi), assorted regexp |
| 1144 | bugs(WilliamBrack), xmlReader end of stream problem, node deregistration |
| 1145 | withreader,URI escaping and filemanes, XHTML1 formatting (Nick |
| 1146 | Wellnhofer),regexptransition reduction (William), various XSD Schemas |
| 1147 | fixes(KasimierBuchcik), XInclude fallback problem (William), weird |
| 1148 | problemswith DTD(William), structured error handler callback context |
| 1149 | (William),reversexmlEncodeSpecialChars() behaviour back to escaping |
| 1150 | '"'</li> |
Daniel Veillard | 8120501 | 2004-05-18 03:06:41 +0000 | [diff] [blame] | 1151 | </ul> |
| 1152 | |
Daniel Veillard | eca726d | 2004-04-18 21:47:34 +0000 | [diff] [blame] | 1153 | <h3>2.6.9: Apr 18 2004</h3> |
| 1154 | <ul> |
| 1155 | <li>implement xml:id Working Draft, relaxed XPath id() checking</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1156 | <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and |
| 1157 | CDATA(DaveBeckett), Relax-NG compilation (William Brack), Regexp |
| 1158 | patches(withWilliam), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed |
| 1159 | problem(withWilliam), Relax-NG name classes compares (William), |
| 1160 | XIncludeduplicatefallback (William), external DTD encoding detection |
| 1161 | (William), aDTDvalidation bug (William), xmlReader Close() fix, |
| 1162 | recusiveextentionschemas</li> |
| 1163 | <li>improvements: use xmlRead* APIs in test tools (Mark |
| 1164 | Vakoc),indentingsave optimization, better handle IIS broken HTTP |
| 1165 | redirectbehaviour (IanHummel), HTML parser frameset (James Bursa), |
| 1166 | libxml2-pythonRPMdependancy, XML Schemas union support (Kasimier |
| 1167 | Buchcik), warningremovalclanup (William), keep ChangeLog compressed when |
| 1168 | installing fromRPMs</li> |
| 1169 | <li>documentation: examples and xmlDocDumpMemory docs (John |
| 1170 | Fleck),newexample (load, xpath, modify, save), xmlCatalogDump() |
| 1171 | comments,</li> |
| 1172 | <li>Windows: Borland C++ builder (Eric Zurcher), work |
| 1173 | aroundMicrosoftcompiler NaN handling bug (Mark Vakoc)</li> |
Daniel Veillard | eca726d | 2004-04-18 21:47:34 +0000 | [diff] [blame] | 1174 | </ul> |
| 1175 | |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1176 | <h3>2.6.8: Mar 23 2004</h3> |
| 1177 | <ul> |
| 1178 | <li>First step of the cleanup of the serialization code and APIs</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1179 | <li>XML Schemas: mixed content (Adam Dickmeiss), QName handling |
| 1180 | fixes(AdamDickmeiss), anyURI for "" (John Belmonte)</li> |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1181 | <li>Python: Canonicalization C14N support added (Anthony Carrico)</li> |
| 1182 | <li>xmlDocCopyNode() extension (William)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1183 | <li>Relax-NG: fix when processing XInclude results |
| 1184 | (William),externalreference in interleave (William), missing error |
| 1185 | on<choice>failure (William), memory leak in schemas |
| 1186 | datatypefacets.</li> |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1187 | <li>xmlWriter: patch for better DTD support (Alfred Mickautsch)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1188 | <li>bug fixes: xmlXPathLangFunction memory leak (Mike Hommey |
| 1189 | andWilliamBrack), no ID errors if using HTML_PARSE_NOERROR, |
| 1190 | xmlcatalogfallbacks toURI on SYSTEM lookup failure, XInclude parse |
| 1191 | flagsinheritance (William),XInclude and XPointer fixes for entities |
| 1192 | (William),XML parser bugreported by Holger Rauch, nanohttp fd leak |
| 1193 | (William),regexps chargroups '-' handling (William), dictionnary |
| 1194 | reference countingproblems,do not close stderr.</li> |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1195 | <li>performance patches from Petr Pajas</li> |
| 1196 | <li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1197 | <li>compilation and portability fixes: --without-valid, |
| 1198 | catalogcleanups(Peter Breitenlohner), MingW patch (Roland |
| 1199 | Schwingel),cross-compilationto Windows (Christophe de Vienne), |
| 1200 | --with-html-dirfixup (Julio MerinoVidal), Windows build (Eric |
| 1201 | Zurcher)</li> |
Daniel Veillard | 252004d | 2004-03-23 12:32:32 +0000 | [diff] [blame] | 1202 | </ul> |
| 1203 | |
Daniel Veillard | 9291449 | 2004-02-23 16:33:21 +0000 | [diff] [blame] | 1204 | <h3>2.6.7: Feb 23 2004</h3> |
| 1205 | <ul> |
| 1206 | <li>documentation: tutorial updates (John Fleck), benchmark results</li> |
| 1207 | <li>xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)</li> |
| 1208 | <li>XPath optimization (Petr Pajas)</li> |
| 1209 | <li>DTD ID handling optimization</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1210 | <li>bugfixes: xpath number with > 19 fractional (William |
| 1211 | Brack),pushmode with unescaped '>' characters, fix xmllint --stream |
| 1212 | --timing,fixxmllint --memory --stream memory |
| 1213 | usage,xmlAttrSerializeTxtContenthandling NULL, trying to fix |
| 1214 | Relax-NG/Perlinterface.</li> |
Daniel Veillard | 9291449 | 2004-02-23 16:33:21 +0000 | [diff] [blame] | 1215 | <li>python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)</li> |
| 1216 | <li>Added relaxng option to xmllint --shell</li> |
| 1217 | </ul> |
| 1218 | |
Daniel Veillard | 5c9547e | 2004-02-12 15:31:49 +0000 | [diff] [blame] | 1219 | <h3>2.6.6: Feb 12 2004</h3> |
| 1220 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1221 | <li>nanohttp and nanoftp: buffer overflow error on URI parsing |
| 1222 | (IgorandWilliam) reported by Yuuichi Teranishi</li> |
| 1223 | <li>bugfixes: make test and path issues, xmlWriter |
| 1224 | attributeserialization(William Brack), xmlWriter indentation (William), |
| 1225 | schemasvalidation(Eric Haszlakiewicz), XInclude dictionnaries issues |
| 1226 | (Williamand OlegParaschenko), XInclude empty fallback (William), HTML |
| 1227 | warnings(William),XPointer in XInclude (William), Python |
| 1228 | namespaceserialization,isolat1ToUTF8 bound error (Alfred Mickautsch), |
| 1229 | output ofparameterentities in internal subset (William), internal subset |
| 1230 | bug inpush mode,<xs:all> fix (Alexey Sarytchev)</li> |
| 1231 | <li>Build: fix for automake-1.8 (Alexander Winston), warningsremoval(Philip |
| 1232 | Ludlam), SOCKLEN_T detection fixes (Daniel Richard),fix--with-minimum |
| 1233 | configuration.</li> |
Daniel Veillard | 5c9547e | 2004-02-12 15:31:49 +0000 | [diff] [blame] | 1234 | <li>XInclude: allow the 2001 namespace without warning.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1235 | <li>Documentation: missing example/index.html (John |
| 1236 | Fleck),versiondependancies (John Fleck)</li> |
Daniel Veillard | 5c9547e | 2004-02-12 15:31:49 +0000 | [diff] [blame] | 1237 | <li>reader API: structured error reporting (Steve Ball)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1238 | <li>Windows compilation: mingw, msys (Mikhail |
| 1239 | Grushinskiy),functionprototype (Cameron Johnson), MSVC6 compiler |
| 1240 | warnings,_WINSOCKAPI_patch</li> |
| 1241 | <li>Parsers: added xmlByteConsumed(ctxt) API to get the byte |
| 1242 | offestininput.</li> |
Daniel Veillard | 5c9547e | 2004-02-12 15:31:49 +0000 | [diff] [blame] | 1243 | </ul> |
| 1244 | |
Daniel Veillard | 189f46b | 2004-01-25 21:03:04 +0000 | [diff] [blame] | 1245 | <h3>2.6.5: Jan 25 2004</h3> |
| 1246 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1247 | <li>Bugfixes: dictionnaries for schemas (William Brack), |
| 1248 | regexpsegfault(William), xs:all problem (William), a number of |
| 1249 | XPointerbugfixes(William), xmllint error go to stderr, DTD validation |
| 1250 | problemwithnamespace, memory leak (William), SAX1 cleanup and minimal |
| 1251 | optionsfixes(Mark Vadoc), parser context reset on error (Shaun McCance), |
| 1252 | XPathunionevaluation problem (William) , xmlReallocLoc with NULL |
| 1253 | (AlekseySanin),XML Schemas double free (Steve Ball), XInclude with no |
| 1254 | href,argumentcallbacks order for XPath callbacks (Frederic Peters)</li> |
| 1255 | <li>Documentation: python scripts (William Brack), xslt |
| 1256 | stylesheets(JohnFleck), doc (Sven Zimmerman), I/O example.</li> |
| 1257 | <li>Python bindings: fixes (William), enum support |
| 1258 | (StéphaneBidoul),structured error reporting (Stéphane Bidoul)</li> |
| 1259 | <li>XInclude: various fixes for conformance, problem related |
| 1260 | todictionnaryreferences (William & me), recursion (William)</li> |
| 1261 | <li>xmlWriter: indentation (Lucas Brasilino), memory |
| 1262 | leaks(AlfredMickautsch),</li> |
Daniel Veillard | 189f46b | 2004-01-25 21:03:04 +0000 | [diff] [blame] | 1263 | <li>xmlSchemas: normalizedString datatype (John Belmonte)</li> |
| 1264 | <li>code cleanup for strings functions (William)</li> |
| 1265 | <li>Windows: compiler patches (Mark Vakoc)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1266 | <li>Parser optimizations, a few new XPath and dictionnary APIs |
| 1267 | forfutureXSLT optimizations.</li> |
Daniel Veillard | 189f46b | 2004-01-25 21:03:04 +0000 | [diff] [blame] | 1268 | </ul> |
| 1269 | |
Daniel Veillard | e6e59cd | 2003-12-24 11:56:44 +0000 | [diff] [blame] | 1270 | <h3>2.6.4: Dec 24 2003</h3> |
| 1271 | <ul> |
| 1272 | <li>Windows build fixes (Igor Zlatkovic)</li> |
Daniel Veillard | 189f46b | 2004-01-25 21:03:04 +0000 | [diff] [blame] | 1273 | <li>Some serious XInclude problems reported by Oleg Paraschenko and</li> |
| 1274 | <li>Unix and Makefile packaging fixes (me, William Brack,</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1275 | <li>Documentation improvements (John Fleck, William Brack), |
| 1276 | examplefix(Lucas Brasilino)</li> |
| 1277 | <li>bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath |
| 1278 | handlingofNULL strings (William Brack) , API building reader or |
| 1279 | parserfromfiledescriptor should not close it, changed XPath sorting to |
| 1280 | bestableagain (William Brack), xmlGetNodePath() generating |
| 1281 | '(null)'(WilliamBrack), DTD validation and namespace bug (William Brack), |
| 1282 | XMLSchemasdouble inclusion behaviour</li> |
Daniel Veillard | e6e59cd | 2003-12-24 11:56:44 +0000 | [diff] [blame] | 1283 | </ul> |
| 1284 | |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 1285 | <h3>2.6.3: Dec 10 2003</h3> |
| 1286 | <ul> |
| 1287 | <li>documentation updates and cleanup (DV, William Brack, John Fleck)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1288 | <li>added a repository of examples, examples from Aleksey |
| 1289 | Sanin,DodjiSeketeli, Alfred Mickautsch</li> |
| 1290 | <li>Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher,Mingw(Kenneth |
| 1291 | Haley)</li> |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 1292 | <li>Unicode range checking (William Brack)</li> |
| 1293 | <li>code cleanup (William Brack)</li> |
| 1294 | <li>Python bindings: doc (John Fleck), bug fixes</li> |
| 1295 | <li>UTF-16 cleanup and BOM issues (William Brack)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1296 | <li>bug fixes: ID and xmlReader validation, XPath (William |
| 1297 | Brack),xmlWriter(Alfred Mickautsch), hash.h inclusion problem, HTML |
| 1298 | parser(James Bursa),attribute defaulting and validation, some |
| 1299 | serializationcleanups,XML_GET_LINE macro, memory debug when using threads |
| 1300 | (WilliamBrack),serialization of attributes and entities content, |
| 1301 | xmlWriter(DanielSchulman)</li> |
| 1302 | <li>XInclude bugfix, new APIs and update to the last version |
| 1303 | includingthenamespace change.</li> |
| 1304 | <li>XML Schemas improvements: include (Robert Stepanek), importandnamespace |
| 1305 | handling, fixed the regression tests troubles, addedexamplesbased on Eric |
| 1306 | van der Vlist book, regexp fixes</li> |
| 1307 | <li>preliminary pattern support for streaming (needed |
| 1308 | forschemasconstraints), added xmlTextReaderPreservePattern() to |
| 1309 | collectsubdocumentwhen streaming.</li> |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 1310 | <li>various fixes in the structured error handling</li> |
| 1311 | </ul> |
| 1312 | |
Daniel Veillard | 6d373a2 | 2003-11-04 10:26:43 +0000 | [diff] [blame] | 1313 | <h3>2.6.2: Nov 4 2003</h3> |
| 1314 | <ul> |
| 1315 | <li>XPath context unregistration fixes</li> |
| 1316 | <li>text node coalescing fixes (Mark Lilback)</li> |
| 1317 | <li>API to screate a W3C Schemas from an existing document (Steve Ball)</li> |
| 1318 | <li>BeOS patches (Marcin 'Shard' Konicki)</li> |
| 1319 | <li>xmlStrVPrintf function added (Aleksey Sanin)</li> |
| 1320 | <li>compilation fixes (Mark Vakoc)</li> |
| 1321 | <li>stdin parsing fix (William Brack)</li> |
| 1322 | <li>a posteriori DTD validation fixes</li> |
Daniel Veillard | c480c4e | 2003-12-10 13:24:38 +0000 | [diff] [blame] | 1323 | <li>xmlReader bug fixes: Walker fixes, python bindings</li> |
Daniel Veillard | 6d373a2 | 2003-11-04 10:26:43 +0000 | [diff] [blame] | 1324 | <li>fixed xmlStopParser() to really stop the parser and errors</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 1325 | <li>always generate line numbers when using the new xmlReadxxxfunctions</li> |
Daniel Veillard | 6d373a2 | 2003-11-04 10:26:43 +0000 | [diff] [blame] | 1326 | <li>added XInclude support to the xmlReader interface</li> |
| 1327 | <li>implemented XML_PARSE_NONET parser option</li> |
| 1328 | <li>DocBook XSLT processing bug fixed</li> |
| 1329 | <li>HTML serialization for <p> elements (William Brack and me)</li> |
| 1330 | <li>XPointer failure in XInclude are now handled as resource errors</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1331 | <li>fixed xmllint --html to use the HTML serializer on output(added--xmlout |
| 1332 | to implement the previous behaviour of saving it using |
| 1333 | theXMLserializer)</li> |
Daniel Veillard | 6d373a2 | 2003-11-04 10:26:43 +0000 | [diff] [blame] | 1334 | </ul> |
| 1335 | |
Daniel Veillard | e4e3f5d | 2003-10-28 23:06:32 +0000 | [diff] [blame] | 1336 | <h3>2.6.1: Oct 28 2003</h3> |
| 1337 | <ul> |
| 1338 | <li>Mostly bugfixes after the big 2.6.0 changes</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1339 | <li>Unix compilation patches: libxml.m4 (Patrick Welche), |
| 1340 | warningscleanup(William Brack)</li> |
| 1341 | <li>Windows compilation patches (Joachim Bauch, Stephane |
| 1342 | Bidoul,IgorZlatkovic)</li> |
Daniel Veillard | e4e3f5d | 2003-10-28 23:06:32 +0000 | [diff] [blame] | 1343 | <li>xmlWriter bugfix (Alfred Mickautsch)</li> |
| 1344 | <li>chvalid.[ch]: couple of fixes from Stephane Bidoul</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 1345 | <li>context reset: error state reset, push parser reset (GrahamBennett)</li> |
Daniel Veillard | e4e3f5d | 2003-10-28 23:06:32 +0000 | [diff] [blame] | 1346 | <li>context reuse: generate errors if file is not readable</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1347 | <li>defaulted attributes for element coming from internal |
| 1348 | entities(StephaneBidoul)</li> |
Daniel Veillard | e4e3f5d | 2003-10-28 23:06:32 +0000 | [diff] [blame] | 1349 | <li>Python: tab and spaces mix (William Brack)</li> |
| 1350 | <li>Error handler could crash in DTD validation in 2.6.0</li> |
| 1351 | <li>xmlReader: do not use the document or element _private field</li> |
| 1352 | <li>testSAX.c: avoid a problem with some PIs (Massimo Morara)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1353 | <li>general bug fixes: mandatory encoding in text decl, |
| 1354 | serializingDocumentFragment nodes, xmlSearchNs 2.6.0 problem (Kasimier |
| 1355 | Buchcik),XPath errorsnot reported, slow HTML parsing of large |
| 1356 | documents.</li> |
Daniel Veillard | e4e3f5d | 2003-10-28 23:06:32 +0000 | [diff] [blame] | 1357 | </ul> |
| 1358 | |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 1359 | <h3>2.6.0: Oct 20 2003</h3> |
| 1360 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1361 | <li>Major revision release: should be API and ABI compatible but got alotof |
| 1362 | change</li> |
| 1363 | <li>Increased the library modularity, far more options can be strippedout,a |
| 1364 | --with-minimum configuration will weight around 160KBytes</li> |
| 1365 | <li>Use per parser and per document dictionnary, allocate names |
| 1366 | andsmalltext nodes from the dictionnary</li> |
| 1367 | <li>Switch to a SAX2 like parser rewrote most of the XML |
| 1368 | parsercore,provides namespace resolution and defaulted attributes, |
| 1369 | minimizememoryallocations and copies, namespace checking and specific |
| 1370 | errorhandling,immutable buffers, make predefined entities static |
| 1371 | structures,etc...</li> |
| 1372 | <li>rewrote all the error handling in the library, all errors |
| 1373 | canbeintercepted at a structured level, with |
| 1374 | preciseinformationavailable.</li> |
| 1375 | <li>New simpler and more generic XML and HTML parser APIs, |
| 1376 | allowingtoeasilly modify the parsing options and reuse parser context |
| 1377 | formultipleconsecutive documents.</li> |
| 1378 | <li>Similar new APIs for the xmlReader, for options and reuse, |
| 1379 | providednewfunctions to access content as const strings, use them |
| 1380 | forPythonbindings</li> |
| 1381 | <li>a lot of other smaller API improvements: xmlStrPrintf |
| 1382 | (AlekseySanin),Walker i.e. reader on a document tree based on Alfred |
| 1383 | Mickautschcode,make room in nodes for line numbers, reference counting |
| 1384 | and futurePSVIextensions, generation of character ranges to be checked |
| 1385 | withfasteralgorithm (William), xmlParserMaxDepth (Crutcher |
| 1386 | Dunnavant),bufferaccess</li> |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 1387 | <li>New xmlWriter API provided by Alfred Mickautsch</li> |
| 1388 | <li>Schemas: base64 support by Anthony Carrico</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1389 | <li>Parser<->HTTP integration fix, proper processing of |
| 1390 | theMime-Typeand charset informations if available.</li> |
| 1391 | <li>Relax-NG: bug fixes including the one reported by Martijn |
| 1392 | FaassenandzeroOrMore, better error reporting.</li> |
| 1393 | <li>Python bindings (Stéphane Bidoul), never use stdout forerrorsoutput</li> |
| 1394 | <li>Portability: all the headers have macros for export |
| 1395 | andcallingconvention definitions (Igor Zlatkovic), VMS update (Craig |
| 1396 | A.Berry),Windows: threads (Jesse Pelton), Borland compiler (Eric |
| 1397 | Zurcher,Igor),Mingw (Igor), typos (Mark Vakoc), beta version |
| 1398 | (StephaneBidoul),warning cleanups on AIX and MIPS compilers (William |
| 1399 | Brack), BeOS(Marcin'Shard' Konicki)</li> |
| 1400 | <li>Documentation fixes and README (William Brack), search |
| 1401 | fix(William),tutorial updates (John Fleck), namespace docs (Stefan |
| 1402 | Kost)</li> |
| 1403 | <li>Bug fixes: xmlCleanupParser (Dave Beckett), |
| 1404 | threadinguninitializedmutexes, HTML doctype lowercase, SAX/IO |
| 1405 | (William),compression detectionand restore (William), attribute |
| 1406 | declaration in DTDs(William), namespaceon attribute in HTML output |
| 1407 | (William), input filename(Rob Richards),namespace DTD validation, |
| 1408 | xmlReplaceNode (Chris Ryland),I/O callbacks(Markus Keim), CDATA |
| 1409 | serialization (Shaun McCance),xmlReader (PeterDerr), high codepoint |
| 1410 | charref like &#x10FFFF;, bufferaccess in pushmode (Justin Fletcher), |
| 1411 | TLS threads on Windows (JessePelton), XPath bug(William), |
| 1412 | xmlCleanupParser (Marc Liyanage), CDATAoutput (William), HTTPerror |
| 1413 | handling.</li> |
| 1414 | <li>xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 |
| 1415 | forcompattesting, --nodict for building without tree dictionnary, |
| 1416 | --nocdatatoreplace CDATA by text, --nsclean to remove |
| 1417 | surperfluousnamespacedeclarations</li> |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 1418 | <li>added xml2-config --libtool-libs option from Kevin P. Fleming</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1419 | <li>a lot of profiling and tuning of the code, speedup |
| 1420 | patchforxmlSearchNs() by Luca Padovani. The xmlReader should do |
| 1421 | farlessallocation and it speed should get closer to SAX. Chris |
| 1422 | Andersonworkedon speeding and cleaning up repetitive checking code.</li> |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 1423 | <li>cleanup of "make tests"</li> |
| 1424 | <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1425 | <li>deactivated the broken docBook SGML parser code and plugged |
| 1426 | theXMLparser instead.</li> |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 1427 | </ul> |
| 1428 | |
Daniel Veillard | eec1ae9 | 2003-09-09 13:11:01 +0000 | [diff] [blame] | 1429 | <h3>2.5.11: Sep 9 2003</h3> |
| 1430 | |
| 1431 | <p>A bugfix only release:</p> |
| 1432 | <ul> |
| 1433 | <li>risk of crash in Relax-NG</li> |
| 1434 | <li>risk of crash when using multithreaded programs</li> |
| 1435 | </ul> |
| 1436 | |
Daniel Veillard | cfba2fe | 2003-08-15 00:33:43 +0000 | [diff] [blame] | 1437 | <h3>2.5.10: Aug 15 2003</h3> |
| 1438 | |
| 1439 | <p>A bugfixes only release</p> |
| 1440 | <ul> |
| 1441 | <li>Windows Makefiles (William Brack)</li> |
| 1442 | <li>UTF-16 support fixes (Mark Itzcovitz)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1443 | <li>Makefile and portability (William Brack) automake, Linux alpha, |
| 1444 | MingwonWindows (Mikhail Grushinskiy)</li> |
Daniel Veillard | cfba2fe | 2003-08-15 00:33:43 +0000 | [diff] [blame] | 1445 | <li>HTML parser (Oliver Stoeneberg)</li> |
| 1446 | <li>XInclude performance problem reported by Kevin Ruscoe</li> |
| 1447 | <li>XML parser performance problem reported by Grant Goodale</li> |
| 1448 | <li>xmlSAXParseDTD() bug fix from Malcolm Tredinnick</li> |
Daniel Veillard | eec1ae9 | 2003-09-09 13:11:01 +0000 | [diff] [blame] | 1449 | <li>and a couple other cleanup</li> |
Daniel Veillard | cfba2fe | 2003-08-15 00:33:43 +0000 | [diff] [blame] | 1450 | </ul> |
| 1451 | |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 1452 | <h3>2.5.9: Aug 9 2003</h3> |
| 1453 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1454 | <li>bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), |
| 1455 | Windowsbuild(Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter |
| 1456 | Sobisch),threading(Rob Richards), hexBinary type (), UTF-16 BOM |
| 1457 | (DodjiSeketeli),xmlReader, Relax-NG schemas compilation, namespace |
| 1458 | handling,EXSLT (SeanGriffin), HTML parsing problem (William Brack), DTD |
| 1459 | validationfor mixedcontent + namespaces, HTML serialization, |
| 1460 | libraryinitialization,progressive HTML parser</li> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 1461 | <li>better interfaces for Relax-NG error handling (Joachim Bauch, )</li> |
| 1462 | <li>adding xmlXIncludeProcessTree() for XInclud'ing in a subtree</li> |
| 1463 | <li>doc fixes and improvements (John Fleck)</li> |
| 1464 | <li>configure flag for -with-fexceptions when embedding in C++</li> |
| 1465 | <li>couple of new UTF-8 helper functions (William Brack)</li> |
| 1466 | <li>general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)</li> |
| 1467 | <li>xmlTextReader cleanup + enum for node types (Bjorn Reese)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1468 | <li>general compilation/warning cleanup Solaris/HP-UX/...(WilliamBrack)</li> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 1469 | </ul> |
| 1470 | |
Daniel Veillard | 560c2a4 | 2003-07-06 21:13:49 +0000 | [diff] [blame] | 1471 | <h3>2.5.8: Jul 6 2003</h3> |
| 1472 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1473 | <li>bugfixes: XPath, XInclude, file/URI mapping, UTF-16 |
| 1474 | save(MarkItzcovitz), UTF-8 checking, URI saving, error printing |
| 1475 | (WilliamBrack),PI related memleak, compilation without schemas or without |
| 1476 | xpath(JoergSchmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem |
| 1477 | withDTDs,rpm problem on , i86_64, removed a few compilation problems |
| 1478 | from2.5.7,xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)</li> |
Daniel Veillard | 560c2a4 | 2003-07-06 21:13:49 +0000 | [diff] [blame] | 1479 | <li>portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)</li> |
| 1480 | <li>William Brack fixed multithreading lock problems</li> |
| 1481 | <li>IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1482 | <li>Windows fixes (Igor Zlatkovic, Eric Zurcher), |
| 1483 | threading(StéphaneBidoul)</li> |
Daniel Veillard | 560c2a4 | 2003-07-06 21:13:49 +0000 | [diff] [blame] | 1484 | <li>A few W3C Schemas Structure improvements</li> |
| 1485 | <li>W3C Schemas Datatype improvements (Charlie Bozeman)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1486 | <li>Python bindings for thread globals (Stéphane Bidoul), |
| 1487 | andmethod/classgenerator</li> |
Daniel Veillard | 83ee40d | 2003-08-09 22:24:09 +0000 | [diff] [blame] | 1488 | <li>added --nonet option to xmllint</li> |
Daniel Veillard | 560c2a4 | 2003-07-06 21:13:49 +0000 | [diff] [blame] | 1489 | <li>documentation improvements (John Fleck)</li> |
| 1490 | </ul> |
| 1491 | |
Daniel Veillard | 92fc02c | 2003-04-24 23:12:35 +0000 | [diff] [blame] | 1492 | <h3>2.5.7: Apr 25 2003</h3> |
| 1493 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1494 | <li>Relax-NG: Compiling to regexp and streaming validation on top |
| 1495 | ofthexmlReader interface, added to xmllint --stream</li> |
Daniel Veillard | 92fc02c | 2003-04-24 23:12:35 +0000 | [diff] [blame] | 1496 | <li>xmlReader: Expand(), Next() and DOM access glue, bug fixes</li> |
| 1497 | <li>Support for large files: RGN validated a 4.5GB instance</li> |
| 1498 | <li>Thread support is now configured in by default</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1499 | <li>Fixes: update of the Trio code (Bjorn), WXS Date and |
| 1500 | Durationfixes(Charles Bozeman), DTD and namespaces (Brent Hendricks), |
| 1501 | HTML pushparserand zero bytes handling, some missing Windows file |
| 1502 | pathconversions,behaviour of the parser and validator in the presence of |
| 1503 | "outof memory"error conditions</li> |
| 1504 | <li>extended the API to be able to plug a garbage |
| 1505 | collectingmemoryallocator, added xmlMallocAtomic() and modified |
| 1506 | theallocationsaccordingly.</li> |
| 1507 | <li>Performances: removed excessive malloc() calls, speedup of the |
| 1508 | pushandxmlReader interfaces, removed excessive thread locking</li> |
Daniel Veillard | 92fc02c | 2003-04-24 23:12:35 +0000 | [diff] [blame] | 1509 | <li>Documentation: man page (John Fleck), xmlReader documentation</li> |
| 1510 | <li>Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)</li> |
| 1511 | </ul> |
| 1512 | |
Daniel Veillard | c2d4a93 | 2003-04-01 11:13:05 +0000 | [diff] [blame] | 1513 | <h3>2.5.6: Apr 1 2003</h3> |
| 1514 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1515 | <li>Fixed W3C XML Schemas datatype, should be compliant now exceptforbinHex |
| 1516 | and base64 which are not supported yet.</li> |
| 1517 | <li>bug fixes: non-ASCII IDs, HTML output, XInclude on large |
| 1518 | docsandXInclude entities handling, encoding detection on external |
| 1519 | subsets,XMLSchemas bugs and memory leaks, HTML parser (James Bursa)</li> |
Daniel Veillard | c2d4a93 | 2003-04-01 11:13:05 +0000 | [diff] [blame] | 1520 | <li>portability: python/trio (Albert Chin), Sun compiler warnings</li> |
| 1521 | <li>documentation: added --relaxng option to xmllint man page (John)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1522 | <li>improved error reporting: xml:space, start/end tag mismatches, |
| 1523 | RelaxNGerrors</li> |
Daniel Veillard | c2d4a93 | 2003-04-01 11:13:05 +0000 | [diff] [blame] | 1524 | </ul> |
| 1525 | |
| 1526 | <h3>2.5.5: Mar 24 2003</h3> |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame] | 1527 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1528 | <li>Lot of fixes on the Relax NG implementation. More |
| 1529 | testingincludingDocBook and TEI examples.</li> |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame] | 1530 | <li>Increased the support for W3C XML Schemas datatype</li> |
| 1531 | <li>Several bug fixes in the URI handling layer</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1532 | <li>Bug fixes: HTML parser, xmlReader, DTD validation, |
| 1533 | XPath,encodingconversion, line counting in the parser.</li> |
Daniel Veillard | d8da01c | 2003-03-24 15:58:23 +0000 | [diff] [blame] | 1534 | <li>Added support for $XMLLINT_INDENT environment variable, FTP delete</li> |
| 1535 | <li>Fixed the RPM spec file name</li> |
| 1536 | </ul> |
| 1537 | |
Daniel Veillard | 17bed98 | 2003-02-24 20:11:43 +0000 | [diff] [blame] | 1538 | <h3>2.5.4: Feb 20 2003</h3> |
| 1539 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1540 | <li>Conformance testing and lot of fixes on Relax NG |
| 1541 | andXIncludeimplementation</li> |
Daniel Veillard | 17bed98 | 2003-02-24 20:11:43 +0000 | [diff] [blame] | 1542 | <li>Implementation of XPointer element() scheme</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1543 | <li>Bug fixes: XML parser, XInclude entities merge, validity |
| 1544 | checkingonnamespaces, |
| 1545 | <p>2 serialization bugs, node info generation problems, a |
| 1546 | DTDregexpgeneration problem.</p> |
Daniel Veillard | 17bed98 | 2003-02-24 20:11:43 +0000 | [diff] [blame] | 1547 | </li> |
| 1548 | <li>Portability: windows updates and path canonicalization (Igor)</li> |
| 1549 | <li>A few typo fixes (Kjartan Maraas)</li> |
| 1550 | <li>Python bindings generator fixes (Stephane Bidoul)</li> |
| 1551 | </ul> |
| 1552 | |
Daniel Veillard | 1d788d2 | 2003-02-10 16:21:58 +0000 | [diff] [blame] | 1553 | <h3>2.5.3: Feb 10 2003</h3> |
| 1554 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1555 | <li>RelaxNG and XML Schemas datatypes improvements, and added afirstversion |
| 1556 | of RelaxNG Python bindings</li> |
| 1557 | <li>Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API |
| 1558 | fixforserializing namespace nodes, encoding conversion |
| 1559 | bug,XHTML1serialization</li> |
Daniel Veillard | 1d788d2 | 2003-02-10 16:21:58 +0000 | [diff] [blame] | 1560 | <li>Portability fixes: Windows (Igor), AMD 64bits RPM spec file</li> |
| 1561 | </ul> |
| 1562 | |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 1563 | <h3>2.5.2: Feb 5 2003</h3> |
| 1564 | <ul> |
| 1565 | <li>First implementation of RelaxNG, added --relaxng flag to xmllint</li> |
| 1566 | <li>Schemas support now compiled in by default.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1567 | <li>Bug fixes: DTD validation, namespace checking, XInclude |
| 1568 | andentities,delegateURI in XML Catalogs, HTML parser, XML reader |
| 1569 | (StéphaneBidoul),XPath parser and evaluation, UTF8ToUTF8 serialization, |
| 1570 | XMLreader memoryconsumption, HTML parser, HTML serialization in the |
| 1571 | presenceofnamespaces</li> |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 1572 | <li>added an HTML API to check elements and attributes.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1573 | <li>Documentation improvement, PDF for the tutorial (John Fleck),docpatches |
| 1574 | (Stefan Kost)</li> |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 1575 | <li>Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1576 | <li>Added python bindings for XPointer, contextual error |
| 1577 | reporting(StéphaneBidoul)</li> |
Daniel Veillard | 72fef16 | 2003-02-05 14:31:19 +0000 | [diff] [blame] | 1578 | <li>URI/file escaping problems (Stefano Zacchiroli)</li> |
Daniel Veillard | cf27f7c | 2002-04-30 07:12:39 +0000 | [diff] [blame] | 1579 | </ul> |
| 1580 | |
Daniel Veillard | e2830f1 | 2003-01-08 17:47:49 +0000 | [diff] [blame] | 1581 | <h3>2.5.1: Jan 8 2003</h3> |
| 1582 | <ul> |
| 1583 | <li>Fixes a memory leak and configuration/compilation problems in 2.5.0</li> |
| 1584 | <li>documentation updates (John)</li> |
| 1585 | <li>a couple of XmlTextReader fixes</li> |
| 1586 | </ul> |
| 1587 | |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 1588 | <h3>2.5.0: Jan 6 2003</h3> |
| 1589 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1590 | <li>New <a href="xmlreader.html">XmltextReader interface</a>based on |
| 1591 | C#API(with help of Stéphane Bidoul)</li> |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 1592 | <li>Windows: more exports, including the new API (Igor)</li> |
| 1593 | <li>XInclude fallback fix</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1594 | <li>Python: bindings for the new API, packaging |
| 1595 | (StéphaneBidoul),drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), |
| 1596 | fixes,speedupand iterators for Python-2.2 (Hannu Krosing)</li> |
| 1597 | <li>Tutorial fixes (john Fleck and Niraj Tolia) xmllint manupdate(John)</li> |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 1598 | <li>Fix an XML parser bug raised by Vyacheslav Pindyura</li> |
| 1599 | <li>Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)</li> |
| 1600 | <li>Entities handling fixes</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1601 | <li>new API to optionally track node creation and |
| 1602 | deletion(LukasSchroeder)</li> |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 1603 | <li>Added documentation for the XmltextReader interface and some <a |
| 1604 | href="guidelines.html">XML guidelines</a></li> |
| 1605 | </ul> |
| 1606 | |
Daniel Veillard | c1eed32 | 2002-12-12 11:01:32 +0000 | [diff] [blame] | 1607 | <h3>2.4.30: Dec 12 2002</h3> |
| 1608 | <ul> |
| 1609 | <li>2.4.29 broke the python bindings, rereleasing</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1610 | <li>Improvement/fixes of the XML API generator, and couple of |
| 1611 | minorcodefixes.</li> |
Daniel Veillard | c1eed32 | 2002-12-12 11:01:32 +0000 | [diff] [blame] | 1612 | </ul> |
| 1613 | |
Daniel Veillard | 9b4bb4d | 2002-12-11 19:28:47 +0000 | [diff] [blame] | 1614 | <h3>2.4.29: Dec 11 2002</h3> |
| 1615 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1616 | <li>Windows fixes (Igor): Windows CE port, pthread linking, |
| 1617 | pythonbindings(Stéphane Bidoul), Mingw (Magnus Henoch), and export |
| 1618 | listupdates</li> |
Daniel Veillard | 9b4bb4d | 2002-12-11 19:28:47 +0000 | [diff] [blame] | 1619 | <li>Fix for prev in python bindings (ERDI Gergo)</li> |
| 1620 | <li>Fix for entities handling (Marcus Clarke)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1621 | <li>Refactored the XML and HTML dumps to a single code path, |
| 1622 | fixedXHTML1dump</li> |
Daniel Veillard | 9b4bb4d | 2002-12-11 19:28:47 +0000 | [diff] [blame] | 1623 | <li>Fix for URI parsing when handling URNs with fragment identifiers</li> |
| 1624 | <li>Fix for HTTP URL escaping problem</li> |
| 1625 | <li>added an TextXmlReader (C#) like API (work in progress)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1626 | <li>Rewrote the API in XML generation script, includes a C parser |
| 1627 | andsavesmore informations needed for C# bindings</li> |
Daniel Veillard | 9b4bb4d | 2002-12-11 19:28:47 +0000 | [diff] [blame] | 1628 | </ul> |
| 1629 | |
Daniel Veillard | f9c4cad | 2002-11-22 15:57:07 +0000 | [diff] [blame] | 1630 | <h3>2.4.28: Nov 22 2002</h3> |
| 1631 | <ul> |
| 1632 | <li>a couple of python binding fixes</li> |
| 1633 | <li>2 bug fixes in the XML push parser</li> |
| 1634 | <li>potential memory leak removed (Martin Stoilov)</li> |
| 1635 | <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li> |
| 1636 | <li>added encoding support for XInclude parse="text"</li> |
| 1637 | <li>autodetection of XHTML1 and specific serialization rules added</li> |
Daniel Veillard | 9b4bb4d | 2002-12-11 19:28:47 +0000 | [diff] [blame] | 1638 | <li>nasty threading bug fixed (William Brack)</li> |
Daniel Veillard | f9c4cad | 2002-11-22 15:57:07 +0000 | [diff] [blame] | 1639 | </ul> |
| 1640 | |
Daniel Veillard | dad3f68 | 2002-11-17 16:47:27 +0000 | [diff] [blame] | 1641 | <h3>2.4.27: Nov 17 2002</h3> |
| 1642 | <ul> |
| 1643 | <li>fixes for the Python bindings</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1644 | <li>a number of bug fixes: SGML catalogs,xmlParseBalancedChunkMemory(),HTML |
| 1645 | parser, Schemas (Charles Bozeman),document fragment support(Christian |
| 1646 | Glahn), xmlReconciliateNs (BrianStafford), XPointer,xmlFreeNode(), |
| 1647 | xmlSAXParseMemory (Peter Jones),xmlGetNodePath (PetrPajas), entities |
| 1648 | processing</li> |
Daniel Veillard | dad3f68 | 2002-11-17 16:47:27 +0000 | [diff] [blame] | 1649 | <li>added grep to xmllint --shell</li> |
| 1650 | <li>VMS update patch from Craig A. Berry</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1651 | <li>cleanup of the Windows build with support for more |
| 1652 | compilers(Igor),better thread support on Windows</li> |
Daniel Veillard | dad3f68 | 2002-11-17 16:47:27 +0000 | [diff] [blame] | 1653 | <li>cleanup of Unix Makefiles and spec file</li> |
| 1654 | <li>Improvements to the documentation (John Fleck)</li> |
| 1655 | </ul> |
| 1656 | |
Daniel Veillard | 4826743 | 2002-10-18 11:21:38 +0000 | [diff] [blame] | 1657 | <h3>2.4.26: Oct 18 2002</h3> |
| 1658 | <ul> |
| 1659 | <li>Patches for Windows CE port, improvements on Windows paths handling</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1660 | <li>Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() |
| 1661 | ,HTMLserialization, Namespace compliance, and a number of |
| 1662 | smallproblems</li> |
Daniel Veillard | 4826743 | 2002-10-18 11:21:38 +0000 | [diff] [blame] | 1663 | </ul> |
| 1664 | |
Daniel Veillard | e16b574 | 2002-09-26 17:50:03 +0000 | [diff] [blame] | 1665 | <h3>2.4.25: Sep 26 2002</h3> |
| 1666 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1667 | <li>A number of bug fixes: XPath, validation, Python bindings, DOM |
| 1668 | andtree,xmlI/O, Html</li> |
Daniel Veillard | e16b574 | 2002-09-26 17:50:03 +0000 | [diff] [blame] | 1669 | <li>Serious rewrite of XInclude</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1670 | <li>Made XML Schemas regexp part of the default build and APIs, smallfixand |
| 1671 | improvement of the regexp core</li> |
Daniel Veillard | e16b574 | 2002-09-26 17:50:03 +0000 | [diff] [blame] | 1672 | <li>Changed the validation code to reuse XML Schemas regexp APIs</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1673 | <li>Better handling of Windows file paths, improvement of |
| 1674 | Makefiles(Igor,Daniel Gehriger, Mark Vakoc)</li> |
| 1675 | <li>Improved the python I/O bindings, the tests, added resolver |
| 1676 | andregexpAPIs</li> |
Daniel Veillard | e16b574 | 2002-09-26 17:50:03 +0000 | [diff] [blame] | 1677 | <li>New logos from Marc Liyanage</li> |
| 1678 | <li>Tutorial improvements: John Fleck, Christopher Harris</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1679 | <li>Makefile: Fixes for AMD x86_64 (Mandrake), |
| 1680 | DESTDIR(ChristopheMerlet)</li> |
Daniel Veillard | e16b574 | 2002-09-26 17:50:03 +0000 | [diff] [blame] | 1681 | <li>removal of all stderr/perror use for error reporting</li> |
| 1682 | <li>Better error reporting: XPath and DTD validation</li> |
| 1683 | <li>update of the trio portability layer (Bjorn Reese)</li> |
| 1684 | </ul> |
| 1685 | |
Daniel Veillard | 42766c0 | 2002-08-22 20:52:17 +0000 | [diff] [blame] | 1686 | <p><strong>2.4.24: Aug 22 2002</strong></p> |
| 1687 | <ul> |
| 1688 | <li>XPath fixes (William), xf:escape-uri() (Wesley Terpstra)</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1689 | <li>Python binding fixes: makefiles (William), generator, rpm |
| 1690 | build,x86-64(fcrozat)</li> |
Daniel Veillard | 42766c0 | 2002-08-22 20:52:17 +0000 | [diff] [blame] | 1691 | <li>HTML <style> and boolean attributes serializer fixes</li> |
| 1692 | <li>C14N improvements by Aleksey</li> |
Daniel Veillard | e166254 | 2002-08-28 11:50:59 +0000 | [diff] [blame] | 1693 | <li>doc cleanups: Rick Jones</li> |
Daniel Veillard | 42766c0 | 2002-08-22 20:52:17 +0000 | [diff] [blame] | 1694 | <li>Windows compiler makefile updates: Igor and Elizabeth Barham</li> |
| 1695 | <li>XInclude: implementation of fallback and xml:base fixup added</li> |
| 1696 | </ul> |
| 1697 | |
Daniel Veillard | 782afda | 2002-07-08 15:12:49 +0000 | [diff] [blame] | 1698 | <h3>2.4.23: July 6 2002</h3> |
| 1699 | <ul> |
| 1700 | <li>performances patches: Peter Jacobi</li> |
| 1701 | <li>c14n fixes, testsuite and performances: Aleksey Sanin</li> |
| 1702 | <li>added xmlDocFormatDump: Chema Celorio</li> |
| 1703 | <li>new tutorial: John Fleck</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1704 | <li>new hash functions and performances: Sander Vesik, portability |
| 1705 | fixfromPeter Jacobi</li> |
| 1706 | <li>a number of bug fixes: XPath (William Brack, Richard Jinks), XMLandHTML |
| 1707 | parsers, ID lookup function</li> |
Daniel Veillard | 782afda | 2002-07-08 15:12:49 +0000 | [diff] [blame] | 1708 | <li>removal of all remaining sprintf: Aleksey Sanin</li> |
| 1709 | </ul> |
| 1710 | |
Daniel Veillard | c0801af | 2002-05-28 16:28:42 +0000 | [diff] [blame] | 1711 | <h3>2.4.22: May 27 2002</h3> |
| 1712 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1713 | <li>a number of bug fixes: configure scripts, base handling, |
| 1714 | parser,memoryusage, HTML parser, XPath, documentation |
| 1715 | (ChristianCornelssen),indentation, URI parsing</li> |
| 1716 | <li>Optimizations for XMLSec, fixing and making public some of |
| 1717 | thenetworkprotocol handlers (Aleksey)</li> |
Daniel Veillard | c0801af | 2002-05-28 16:28:42 +0000 | [diff] [blame] | 1718 | <li>performance patch from Gary Pennington</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1719 | <li>Charles Bozeman provided date and time support for |
| 1720 | XMLSchemasdatatypes</li> |
Daniel Veillard | c0801af | 2002-05-28 16:28:42 +0000 | [diff] [blame] | 1721 | </ul> |
| 1722 | |
Daniel Veillard | cf27f7c | 2002-04-30 07:12:39 +0000 | [diff] [blame] | 1723 | <h3>2.4.21: Apr 29 2002</h3> |
| 1724 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1725 | <p>This release is both a bug fix release and also contains the |
| 1726 | earlyXMLSchemas <a href="http://www.w3.org/TR/xmlschema-1/">structures</a>and |
| 1727 | <a href="http://www.w3.org/TR/xmlschema-2/">datatypes</a>code, |
| 1728 | beware,allinterfaces are likely to change, there is huge holes, it is clearly |
| 1729 | a workinprogress and don't even think of putting this code in a |
| 1730 | productionsystem,it's actually not compiled in by default. The real fixes |
| 1731 | are:</p> |
Daniel Veillard | cf27f7c | 2002-04-30 07:12:39 +0000 | [diff] [blame] | 1732 | <ul> |
| 1733 | <li>a couple of bugs or limitations introduced in 2.4.20</li> |
| 1734 | <li>patches for Borland C++ and MSC by Igor</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 1735 | <li>some fixes on XPath strings and conformance patches by RichardJinks</li> |
Daniel Veillard | cf27f7c | 2002-04-30 07:12:39 +0000 | [diff] [blame] | 1736 | <li>patch from Aleksey for the ExcC14N specification</li> |
| 1737 | <li>OSF/1 bug fix by Bjorn</li> |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 1738 | </ul> |
| 1739 | |
Daniel Veillard | a7084cd | 2002-04-15 17:12:47 +0000 | [diff] [blame] | 1740 | <h3>2.4.20: Apr 15 2002</h3> |
| 1741 | <ul> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1742 | <li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li> |
Daniel Veillard | a7084cd | 2002-04-15 17:12:47 +0000 | [diff] [blame] | 1743 | <li>XPath conformance testing by Richard Jinks</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1744 | <li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, |
| 1745 | pythonbindings,libxml.m4</li> |
Daniel Veillard | a7084cd | 2002-04-15 17:12:47 +0000 | [diff] [blame] | 1746 | </ul> |
| 1747 | |
Daniel Veillard | 1927409 | 2002-03-25 16:48:03 +0000 | [diff] [blame] | 1748 | <h3>2.4.19: Mar 25 2002</h3> |
| 1749 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1750 | <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin |
| 1751 | toUTF8encoder</li> |
Daniel Veillard | 1927409 | 2002-03-25 16:48:03 +0000 | [diff] [blame] | 1752 | <li>portability fixes in the HTTP code</li> |
Daniel Veillard | b2fb8ed | 2002-04-01 09:33:12 +0000 | [diff] [blame] | 1753 | <li>memory allocation checks using valgrind, and profiling tests</li> |
Daniel Veillard | 1927409 | 2002-03-25 16:48:03 +0000 | [diff] [blame] | 1754 | <li>revamp of the Windows build and Makefiles</li> |
| 1755 | </ul> |
| 1756 | |
Daniel Veillard | 34ce8be | 2002-03-18 19:37:11 +0000 | [diff] [blame] | 1757 | <h3>2.4.18: Mar 18 2002</h3> |
| 1758 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1759 | <li>bug fixes: tree, SAX, canonicalization, |
| 1760 | validation,portability,XPath</li> |
Daniel Veillard | 34ce8be | 2002-03-18 19:37:11 +0000 | [diff] [blame] | 1761 | <li>removed the --with-buffer option it was becoming unmaintainable</li> |
| 1762 | <li>serious cleanup of the Python makefiles</li> |
| 1763 | <li>speedup patch to XPath very effective for DocBook stylesheets</li> |
| 1764 | <li>Fixes for Windows build, cleanup of the documentation</li> |
| 1765 | </ul> |
| 1766 | |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 1767 | <h3>2.4.17: Mar 8 2002</h3> |
| 1768 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1769 | <li>a lot of bug fixes, including "namespace nodes have no |
| 1770 | parentsinXPath"</li> |
| 1771 | <li>fixed/improved the Python wrappers, added more examples |
| 1772 | andmoreregression tests, XPath extension functions can now |
| 1773 | returnnode-sets</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1774 | <li>added the XML Canonicalization support from Aleksey Sanin</li> |
Daniel Veillard | 3d6ae1c | 2001-08-15 13:12:39 +0000 | [diff] [blame] | 1775 | </ul> |
| 1776 | |
Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 1777 | <h3>2.4.16: Feb 20 2002</h3> |
| 1778 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1779 | <li>a lot of bug fixes, most of them were triggered by the XMLTestsuitefrom |
| 1780 | OASIS and W3C. Compliance has been significantlyimproved.</li> |
Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 1781 | <li>a couple of portability fixes too.</li> |
| 1782 | </ul> |
| 1783 | |
Daniel Veillard | 397ff11 | 2002-02-11 18:27:20 +0000 | [diff] [blame] | 1784 | <h3>2.4.15: Feb 11 2002</h3> |
| 1785 | <ul> |
| 1786 | <li>Fixed the Makefiles, especially the python module ones</li> |
| 1787 | <li>A few bug fixes and cleanup</li> |
| 1788 | <li>Includes cleanup</li> |
| 1789 | </ul> |
| 1790 | |
Daniel Veillard | b6c1e2f | 2002-02-08 14:52:52 +0000 | [diff] [blame] | 1791 | <h3>2.4.14: Feb 8 2002</h3> |
| 1792 | <ul> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1793 | <li>Change of License to the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1794 | href="http://www.opensource.org/licenses/mit-license.html">MITLicense</a>basicallyfor |
| 1795 | integration in XFree86 codebase, and removingconfusion around theprevious |
| 1796 | dual-licensing</li> |
| 1797 | <li>added Python bindings, beta software but should already |
| 1798 | bequitecomplete</li> |
| 1799 | <li>a large number of fixes and cleanups, especially for |
| 1800 | alltreemanipulations</li> |
| 1801 | <li>cleanup of the headers, generation of a reference API |
| 1802 | definitioninXML</li> |
Daniel Veillard | b6c1e2f | 2002-02-08 14:52:52 +0000 | [diff] [blame] | 1803 | </ul> |
| 1804 | |
| 1805 | <h3>2.4.13: Jan 14 2002</h3> |
Daniel Veillard | 744683d | 2002-01-14 17:30:20 +0000 | [diff] [blame] | 1806 | <ul> |
| 1807 | <li>update of the documentation: John Fleck and Charlie Bozeman</li> |
| 1808 | <li>cleanup of timing code from Justin Fletcher</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1809 | <li>fixes for Windows and initial thread support on Win32: Igor |
| 1810 | andSergueiNarojnyi</li> |
Daniel Veillard | 744683d | 2002-01-14 17:30:20 +0000 | [diff] [blame] | 1811 | <li>Cygwin patch from Robert Collins</li> |
| 1812 | <li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li> |
| 1813 | </ul> |
| 1814 | |
Daniel Veillard | ef90ba7 | 2001-12-07 14:24:22 +0000 | [diff] [blame] | 1815 | <h3>2.4.12: Dec 7 2001</h3> |
| 1816 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1817 | <li>a few bug fixes: thread (Gary Pennington), xmllint |
| 1818 | (GeertKloosterman),XML parser (Robin Berjon), XPointer (Danny Jamshy), |
| 1819 | I/Ocleanups(robert)</li> |
Daniel Veillard | ef90ba7 | 2001-12-07 14:24:22 +0000 | [diff] [blame] | 1820 | <li>Eric Lavigne contributed project files for MacOS</li> |
| 1821 | <li>some makefiles cleanups</li> |
| 1822 | </ul> |
| 1823 | |
Daniel Veillard | a487105 | 2001-11-26 13:19:48 +0000 | [diff] [blame] | 1824 | <h3>2.4.11: Nov 26 2001</h3> |
| 1825 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1826 | <li>fixed a couple of errors in the includes, fixed a few bugs, |
| 1827 | somecodecleanups</li> |
Daniel Veillard | a487105 | 2001-11-26 13:19:48 +0000 | [diff] [blame] | 1828 | <li>xmllint man pages improvement by Heiko Rupp</li> |
| 1829 | <li>updated VMS build instructions from John A Fotheringham</li> |
| 1830 | <li>Windows Makefiles updates from Igor</li> |
| 1831 | </ul> |
| 1832 | |
Daniel Veillard | 43d3f61 | 2001-11-10 11:57:23 +0000 | [diff] [blame] | 1833 | <h3>2.4.10: Nov 10 2001</h3> |
| 1834 | <ul> |
| 1835 | <li>URI escaping fix (Joel Young)</li> |
| 1836 | <li>added xmlGetNodePath() (for paths or XPointers generation)</li> |
| 1837 | <li>Fixes namespace handling problems when using DTD and validation</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1838 | <li>improvements on xmllint: Morus Walter patches for --format |
| 1839 | and--encode,Stefan Kost and Heiko Rupp improvements on the --shell</li> |
Daniel Veillard | 43d3f61 | 2001-11-10 11:57:23 +0000 | [diff] [blame] | 1840 | <li>fixes for xmlcatalog linking pointed by Weiqi Gao</li> |
| 1841 | <li>fixes to the HTML parser</li> |
| 1842 | </ul> |
| 1843 | |
| 1844 | <h3>2.4.9: Nov 6 2001</h3> |
| 1845 | <ul> |
| 1846 | <li>fixes more catalog bugs</li> |
| 1847 | <li>avoid a compilation problem, improve xmlGetLineNo()</li> |
| 1848 | </ul> |
| 1849 | |
Daniel Veillard | ed421aa | 2001-11-04 21:22:45 +0000 | [diff] [blame] | 1850 | <h3>2.4.8: Nov 4 2001</h3> |
| 1851 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1852 | <li>fixed SGML catalogs broken in previous release, |
| 1853 | updatedxmlcatalogtool</li> |
Daniel Veillard | ed421aa | 2001-11-04 21:22:45 +0000 | [diff] [blame] | 1854 | <li>fixed a compile errors and some includes troubles.</li> |
| 1855 | </ul> |
| 1856 | |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 1857 | <h3>2.4.7: Oct 30 2001</h3> |
| 1858 | <ul> |
| 1859 | <li>exported some debugging interfaces</li> |
| 1860 | <li>serious rewrite of the catalog code</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1861 | <li>integrated Gary Pennington thread safety patch, added |
| 1862 | configureoptionand regression tests</li> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 1863 | <li>removed an HTML parser bug</li> |
| 1864 | <li>fixed a couple of potentially serious validation bugs</li> |
| 1865 | <li>integrated the SGML DocBook support in xmllint</li> |
| 1866 | <li>changed the nanoftp anonymous login passwd</li> |
| 1867 | <li>some I/O cleanup and a couple of interfaces for Perl wrapper</li> |
| 1868 | <li>general bug fixes</li> |
| 1869 | <li>updated xmllint man page by John Fleck</li> |
| 1870 | <li>some VMS and Windows updates</li> |
| 1871 | </ul> |
| 1872 | |
Daniel Veillard | 60087f3 | 2001-10-10 09:45:09 +0000 | [diff] [blame] | 1873 | <h3>2.4.6: Oct 10 2001</h3> |
| 1874 | <ul> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 1875 | <li>added an updated man pages by John Fleck</li> |
Daniel Veillard | 60087f3 | 2001-10-10 09:45:09 +0000 | [diff] [blame] | 1876 | <li>portability and configure fixes</li> |
| 1877 | <li>an infinite loop on the HTML parser was removed (William)</li> |
| 1878 | <li>Windows makefile patches from Igor</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1879 | <li>fixed half a dozen bugs reported for libxml or libxslt</li> |
Daniel Veillard | 60087f3 | 2001-10-10 09:45:09 +0000 | [diff] [blame] | 1880 | <li>updated xmlcatalog to be able to modify SGML super catalogs</li> |
| 1881 | </ul> |
| 1882 | |
Daniel Veillard | dadd087 | 2001-09-15 09:21:44 +0000 | [diff] [blame] | 1883 | <h3>2.4.5: Sep 14 2001</h3> |
| 1884 | <ul> |
| 1885 | <li>Remove a few annoying bugs in 2.4.4</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1886 | <li>forces the HTML serializer to output decimal charrefs since |
| 1887 | someversionof Netscape can't handle hexadecimal ones</li> |
Daniel Veillard | dadd087 | 2001-09-15 09:21:44 +0000 | [diff] [blame] | 1888 | </ul> |
| 1889 | |
| 1890 | <h3>1.8.16: Sep 14 2001</h3> |
| 1891 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1892 | <li>maintenance release of the old libxml1 branch, couple of |
| 1893 | bugandportability fixes</li> |
Daniel Veillard | dadd087 | 2001-09-15 09:21:44 +0000 | [diff] [blame] | 1894 | </ul> |
| 1895 | |
Daniel Veillard | 04382ae | 2001-09-12 18:51:30 +0000 | [diff] [blame] | 1896 | <h3>2.4.4: Sep 12 2001</h3> |
| 1897 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 1898 | <li>added --convert to xmlcatalog, bug fixes and cleanups of XMLCatalog</li> |
Daniel Veillard | 04382ae | 2001-09-12 18:51:30 +0000 | [diff] [blame] | 1899 | <li>a few bug fixes and some portability changes</li> |
| 1900 | <li>some documentation cleanups</li> |
| 1901 | </ul> |
| 1902 | |
Daniel Veillard | 3993690 | 2001-08-24 00:49:01 +0000 | [diff] [blame] | 1903 | <h3>2.4.3: Aug 23 2001</h3> |
| 1904 | <ul> |
| 1905 | <li>XML Catalog support see the doc</li> |
| 1906 | <li>New NaN/Infinity floating point code</li> |
| 1907 | <li>A few bug fixes</li> |
| 1908 | </ul> |
| 1909 | |
| 1910 | <h3>2.4.2: Aug 15 2001</h3> |
Daniel Veillard | 3d6ae1c | 2001-08-15 13:12:39 +0000 | [diff] [blame] | 1911 | <ul> |
| 1912 | <li>adds xmlLineNumbersDefault() to control line number generation</li> |
| 1913 | <li>lot of bug fixes</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1914 | <li>the Microsoft MSC projects files should now be up to date</li> |
Daniel Veillard | 3d6ae1c | 2001-08-15 13:12:39 +0000 | [diff] [blame] | 1915 | <li>inheritance of namespaces from DTD defaulted attributes</li> |
| 1916 | <li>fixes a serious potential security bug</li> |
| 1917 | <li>added a --format option to xmllint</li> |
| 1918 | </ul> |
| 1919 | |
| 1920 | <h3>2.4.1: July 24 2001</h3> |
| 1921 | <ul> |
| 1922 | <li>possibility to keep line numbers in the tree</li> |
| 1923 | <li>some computation NaN fixes</li> |
| 1924 | <li>extension of the XPath API</li> |
| 1925 | <li>cleanup for alpha and ia64 targets</li> |
| 1926 | <li>patch to allow saving through HTTP PUT or POST</li> |
Daniel Veillard | 09ab7e1 | 2001-07-10 15:49:44 +0000 | [diff] [blame] | 1927 | </ul> |
| 1928 | |
| 1929 | <h3>2.4.0: July 10 2001</h3> |
| 1930 | <ul> |
| 1931 | <li>Fixed a few bugs in XPath, validation, and tree handling.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1932 | <li>Fixed XML Base implementation, added a couple of examples |
| 1933 | totheregression tests</li> |
Daniel Veillard | 09ab7e1 | 2001-07-10 15:49:44 +0000 | [diff] [blame] | 1934 | <li>A bit of cleanup</li> |
Daniel Veillard | ab8500d | 2000-10-15 21:06:19 +0000 | [diff] [blame] | 1935 | </ul> |
| 1936 | |
Daniel Veillard | 5b43fde | 2001-07-05 23:31:40 +0000 | [diff] [blame] | 1937 | <h3>2.3.14: July 5 2001</h3> |
| 1938 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1939 | <li>fixed some entities problems and reduce memory |
| 1940 | requirementwhensubstituting them</li> |
| 1941 | <li>lots of improvements in the XPath queries interpreter |
| 1942 | canbesubstantially faster</li> |
Daniel Veillard | 5b43fde | 2001-07-05 23:31:40 +0000 | [diff] [blame] | 1943 | <li>Makefiles and configure cleanups</li> |
| 1944 | <li>Fixes to XPath variable eval, and compare on empty node set</li> |
| 1945 | <li>HTML tag closing bug fixed</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 1946 | <li>Fixed an URI reference computation problem when validating</li> |
Daniel Veillard | 5b43fde | 2001-07-05 23:31:40 +0000 | [diff] [blame] | 1947 | </ul> |
| 1948 | |
Daniel Veillard | 2adbb51 | 2001-06-28 16:20:36 +0000 | [diff] [blame] | 1949 | <h3>2.3.13: June 28 2001</h3> |
| 1950 | <ul> |
| 1951 | <li>2.3.12 configure.in was broken as well as the push mode XML parser</li> |
| 1952 | <li>a few more fixes for compilation on Windows MSC by Yon Derek</li> |
| 1953 | </ul> |
| 1954 | |
| 1955 | <h3>1.8.14: June 28 2001</h3> |
| 1956 | <ul> |
| 1957 | <li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li> |
| 1958 | <li>Small Makefile fix</li> |
| 1959 | </ul> |
| 1960 | |
Daniel Veillard | 1164810 | 2001-06-26 16:08:24 +0000 | [diff] [blame] | 1961 | <h3>2.3.12: June 26 2001</h3> |
| 1962 | <ul> |
| 1963 | <li>lots of cleanup</li> |
| 1964 | <li>a couple of validation fix</li> |
| 1965 | <li>fixed line number counting</li> |
| 1966 | <li>fixed serious problems in the XInclude processing</li> |
| 1967 | <li>added support for UTF8 BOM at beginning of entities</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1968 | <li>fixed a strange gcc optimizer bugs in xpath handling of |
| 1969 | float,gcc-3.0miscompile uri.c (William), Thomas Leitner provided a fix |
| 1970 | fortheoptimizer on Tru64</li> |
| 1971 | <li>incorporated Yon Derek and Igor Zlatkovic fixes and |
| 1972 | improvementsforcompilation on Windows MSC</li> |
Daniel Veillard | 1164810 | 2001-06-26 16:08:24 +0000 | [diff] [blame] | 1973 | <li>update of libxml-doc.el (Felix Natter)</li> |
| 1974 | <li>fixed 2 bugs in URI normalization code</li> |
| 1975 | </ul> |
| 1976 | |
Daniel Veillard | e3c81b5 | 2001-06-17 14:50:34 +0000 | [diff] [blame] | 1977 | <h3>2.3.11: June 17 2001</h3> |
| 1978 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1979 | <li>updates to trio, Makefiles and configure should fix |
| 1980 | someportabilityproblems (alpha)</li> |
| 1981 | <li>fixed some HTML serialization problems (pre, script, |
| 1982 | andblock/inlinehandling), added encoding aware APIs, cleanup of |
| 1983 | thiscode</li> |
Daniel Veillard | e3c81b5 | 2001-06-17 14:50:34 +0000 | [diff] [blame] | 1984 | <li>added xmlHasNsProp()</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1985 | <li>implemented a specific PI for encoding support in the |
| 1986 | DocBookSGMLparser</li> |
| 1987 | <li>some XPath fixes (-Infinity, / as a function parameter |
| 1988 | andnamespacesnode selection)</li> |
Daniel Veillard | e3c81b5 | 2001-06-17 14:50:34 +0000 | [diff] [blame] | 1989 | <li>fixed a performance problem and an error in the validation code</li> |
| 1990 | <li>fixed XInclude routine to implement the recursive behaviour</li> |
| 1991 | <li>fixed xmlFreeNode problem when libxml is included statically twice</li> |
| 1992 | <li>added --version to xmllint for bug reports</li> |
| 1993 | </ul> |
| 1994 | |
Daniel Veillard | 2e4f188 | 2001-06-01 10:11:57 +0000 | [diff] [blame] | 1995 | <h3>2.3.10: June 1 2001</h3> |
| 1996 | <ul> |
| 1997 | <li>fixed the SGML catalog support</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 1998 | <li>a number of reported bugs got fixed, in XPath, iconv |
| 1999 | detection,XIncludeprocessing</li> |
Daniel Veillard | 2e4f188 | 2001-06-01 10:11:57 +0000 | [diff] [blame] | 2000 | <li>XPath string function should now handle unicode correctly</li> |
| 2001 | </ul> |
| 2002 | |
Daniel Veillard | 4623acd | 2001-05-19 15:13:15 +0000 | [diff] [blame] | 2003 | <h3>2.3.9: May 19 2001</h3> |
| 2004 | |
| 2005 | <p>Lots of bugfixes, and added a basic SGML catalog support:</p> |
| 2006 | <ul> |
| 2007 | <li>HTML push bugfix #54891 and another patch from Jonas Borgström</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2008 | <li>some serious speed optimization again</li> |
Daniel Veillard | 4623acd | 2001-05-19 15:13:15 +0000 | [diff] [blame] | 2009 | <li>some documentation cleanups</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2010 | <li>trying to get better linking on Solaris (-R)</li> |
Daniel Veillard | 4623acd | 2001-05-19 15:13:15 +0000 | [diff] [blame] | 2011 | <li>XPath API cleanup from Thomas Broyer</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2012 | <li>Validation bug fixed #54631, added a patch from Gary |
| 2013 | Pennington,fixedxmlValidGetValidElements()</li> |
Daniel Veillard | 4623acd | 2001-05-19 15:13:15 +0000 | [diff] [blame] | 2014 | <li>Added an INSTALL file</li> |
| 2015 | <li>Attribute removal added to API: #54433</li> |
| 2016 | <li>added a basic support for SGML catalogs</li> |
| 2017 | <li>fixed xmlKeepBlanksDefault(0) API</li> |
| 2018 | <li>bugfix in xmlNodeGetLang()</li> |
| 2019 | <li>fixed a small configure portability problem</li> |
| 2020 | <li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li> |
| 2021 | </ul> |
| 2022 | |
Daniel Veillard | a265af7 | 2001-05-14 11:13:58 +0000 | [diff] [blame] | 2023 | <h3>1.8.13: May 14 2001</h3> |
| 2024 | <ul> |
| 2025 | <li>bugfixes release of the old libxml1 branch used by Gnome</li> |
| 2026 | </ul> |
| 2027 | |
Daniel Veillard | 3bbbe6f | 2001-05-03 11:15:37 +0000 | [diff] [blame] | 2028 | <h3>2.3.8: May 3 2001</h3> |
| 2029 | <ul> |
| 2030 | <li>Integrated an SGML DocBook parser for the Gnome project</li> |
| 2031 | <li>Fixed a few things in the HTML parser</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2032 | <li>Fixed some XPath bugs raised by XSLT use, tried to fix thefloatingpoint |
| 2033 | portability issue</li> |
| 2034 | <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s |
| 2035 | forDOM+validationusing the XML REC as input and a 700MHz celeron).</li> |
Daniel Veillard | 3bbbe6f | 2001-05-03 11:15:37 +0000 | [diff] [blame] | 2036 | <li>incorporated more Windows cleanup</li> |
| 2037 | <li>added xmlSaveFormatFile()</li> |
| 2038 | <li>fixed problems in copying nodes with entities references (gdome)</li> |
| 2039 | <li>removed some troubles surrounding the new validation module</li> |
| 2040 | </ul> |
| 2041 | |
Daniel Veillard | a41123c | 2001-04-22 19:31:20 +0000 | [diff] [blame] | 2042 | <h3>2.3.7: April 22 2001</h3> |
| 2043 | <ul> |
| 2044 | <li>lots of small bug fixes, corrected XPointer</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2045 | <li>Non deterministic content model validation support</li> |
Daniel Veillard | a41123c | 2001-04-22 19:31:20 +0000 | [diff] [blame] | 2046 | <li>added xmlDocCopyNode for gdome2</li> |
| 2047 | <li>revamped the way the HTML parser handles end of tags</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2048 | <li>XPath: corrections of namespaces support and number formatting</li> |
Daniel Veillard | a41123c | 2001-04-22 19:31:20 +0000 | [diff] [blame] | 2049 | <li>Windows: Igor Zlatkovic patches for MSC compilation</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2050 | <li>HTML output fixes from P C Chow and William M. Brack</li> |
Daniel Veillard | a41123c | 2001-04-22 19:31:20 +0000 | [diff] [blame] | 2051 | <li>Improved validation speed sensible for DocBook</li> |
| 2052 | <li>fixed a big bug with ID declared in external parsed entities</li> |
| 2053 | <li>portability fixes, update of Trio from Bjorn Reese</li> |
| 2054 | </ul> |
| 2055 | |
Daniel Veillard | afc7311 | 2001-04-11 11:51:41 +0000 | [diff] [blame] | 2056 | <h3>2.3.6: April 8 2001</h3> |
| 2057 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2058 | <li>Code cleanup using extreme gcc compiler warning options, |
| 2059 | foundandcleared half a dozen potential problem</li> |
Daniel Veillard | afc7311 | 2001-04-11 11:51:41 +0000 | [diff] [blame] | 2060 | <li>the Eazel team found an XML parser bug</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2061 | <li>cleaned up the user of some of the string formatting function. |
| 2062 | usedthetrio library code to provide the one needed when the platform |
| 2063 | ismissingthem</li> |
| 2064 | <li>xpath: removed a memory leak and fixed the predicate |
| 2065 | evaluationproblem,extended the testsuite and cleaned up the result. |
| 2066 | XPointer seemsbroken...</li> |
Daniel Veillard | afc7311 | 2001-04-11 11:51:41 +0000 | [diff] [blame] | 2067 | </ul> |
| 2068 | |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 2069 | <h3>2.3.5: Mar 23 2001</h3> |
| 2070 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2071 | <li>Biggest change is separate parsing and evaluation of |
| 2072 | XPathexpressions,there is some new APIs for this too</li> |
| 2073 | <li>included a number of bug fixes(XML push parser, |
| 2074 | 51876,notations,52299)</li> |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 2075 | <li>Fixed some portability issues</li> |
| 2076 | </ul> |
| 2077 | |
Daniel Veillard | e356c28 | 2001-03-10 12:32:04 +0000 | [diff] [blame] | 2078 | <h3>2.3.4: Mar 10 2001</h3> |
| 2079 | <ul> |
| 2080 | <li>Fixed bugs #51860 and #51861</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2081 | <li>Added a global variable xmlDefaultBufferSize to allow defaultbuffersize |
| 2082 | to be application tunable.</li> |
| 2083 | <li>Some cleanup in the validation code, still a bug left and |
| 2084 | thispartshould probably be rewritten to support ambiguous content |
| 2085 | model:-\</li> |
| 2086 | <li>Fix a couple of serious bugs introduced or raised by changes |
| 2087 | in2.3.3parser</li> |
Daniel Veillard | e356c28 | 2001-03-10 12:32:04 +0000 | [diff] [blame] | 2088 | <li>Fixed another bug in xmlNodeGetContent()</li> |
| 2089 | <li>Bjorn fixed XPath node collection and Number formatting</li> |
| 2090 | <li>Fixed a loop reported in the HTML parsing</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2091 | <li>blank space are reported even if the Dtd content model proves |
| 2092 | thattheyare formatting spaces, this is for XML conformance</li> |
Daniel Veillard | e356c28 | 2001-03-10 12:32:04 +0000 | [diff] [blame] | 2093 | </ul> |
| 2094 | |
Daniel Veillard | b402c07 | 2001-03-01 17:28:58 +0000 | [diff] [blame] | 2095 | <h3>2.3.3: Mar 1 2001</h3> |
| 2096 | <ul> |
| 2097 | <li>small change in XPath for XSLT</li> |
| 2098 | <li>documentation cleanups</li> |
| 2099 | <li>fix in validation by Gary Pennington</li> |
| 2100 | <li>serious parsing performances improvements</li> |
| 2101 | </ul> |
| 2102 | |
Daniel Veillard | ec70e91 | 2001-02-26 20:10:45 +0000 | [diff] [blame] | 2103 | <h3>2.3.2: Feb 24 2001</h3> |
Daniel Veillard | 7168110 | 2001-02-24 17:48:53 +0000 | [diff] [blame] | 2104 | <ul> |
| 2105 | <li>chasing XPath bugs, found a bunch, completed some TODO</li> |
| 2106 | <li>fixed a Dtd parsing bug</li> |
| 2107 | <li>fixed a bug in xmlNodeGetContent</li> |
| 2108 | <li>ID/IDREF support partly rewritten by Gary Pennington</li> |
| 2109 | </ul> |
| 2110 | |
Daniel Veillard | ec70e91 | 2001-02-26 20:10:45 +0000 | [diff] [blame] | 2111 | <h3>2.3.1: Feb 15 2001</h3> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2112 | <ul> |
| 2113 | <li>some XPath and HTML bug fixes for XSLT</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2114 | <li>small extension of the hash table interfaces for |
| 2115 | DOMgdome2implementation</li> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2116 | <li>A few bug fixes</li> |
| 2117 | </ul> |
| 2118 | |
Daniel Veillard | ec70e91 | 2001-02-26 20:10:45 +0000 | [diff] [blame] | 2119 | <h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2120 | <ul> |
| 2121 | <li>Lots of XPath bug fixes</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2122 | <li>Add a mode with Dtd lookup but without validation error |
| 2123 | reportingforXSLT</li> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2124 | <li>Add support for text node without escaping (XSLT)</li> |
| 2125 | <li>bug fixes for xmlCheckFilename</li> |
| 2126 | <li>validation code bug fixes from Gary Pennington</li> |
| 2127 | <li>Patch from Paul D. Smith correcting URI path normalization</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2128 | <li>Patch to allow simultaneous install of libxml-develandlibxml2-devel</li> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2129 | <li>the example Makefile is now fixed</li> |
| 2130 | <li>added HTML to the RPM packages</li> |
| 2131 | <li>tree copying bugfixes</li> |
| 2132 | <li>updates to Windows makefiles</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2133 | <li>optimization patch from Bjorn Reese</li> |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2134 | </ul> |
| 2135 | |
Daniel Veillard | ec70e91 | 2001-02-26 20:10:45 +0000 | [diff] [blame] | 2136 | <h3>2.2.11: Jan 4 2001</h3> |
Daniel Veillard | 503b893 | 2001-01-05 06:36:31 +0000 | [diff] [blame] | 2137 | <ul> |
| 2138 | <li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li> |
| 2139 | <li>added htmlHandleOmittedElem()</li> |
| 2140 | <li>Applied Bjorn Reese's IPV6 first patch</li> |
| 2141 | <li>Applied Paul D. Smith patches for validation of XInclude results</li> |
Daniel Veillard | 8268716 | 2001-01-22 15:32:01 +0000 | [diff] [blame] | 2142 | <li>added XPointer xmlns() new scheme support</li> |
Daniel Veillard | 503b893 | 2001-01-05 06:36:31 +0000 | [diff] [blame] | 2143 | </ul> |
| 2144 | |
Daniel Veillard | 2ddd23d | 2000-11-25 10:42:19 +0000 | [diff] [blame] | 2145 | <h3>2.2.10: Nov 25 2000</h3> |
Daniel Veillard | 9d343c4 | 2000-11-25 10:12:43 +0000 | [diff] [blame] | 2146 | <ul> |
| 2147 | <li>Fix the Windows problems of 2.2.8</li> |
| 2148 | <li>integrate OpenVMS patches</li> |
| 2149 | <li>better handling of some nasty HTML input</li> |
| 2150 | <li>Improved the XPointer implementation</li> |
| 2151 | <li>integrate a number of provided patches</li> |
| 2152 | </ul> |
| 2153 | |
Daniel Veillard | 2ddd23d | 2000-11-25 10:42:19 +0000 | [diff] [blame] | 2154 | <h3>2.2.9: Nov 25 2000</h3> |
| 2155 | <ul> |
| 2156 | <li>erroneous release :-(</li> |
| 2157 | </ul> |
| 2158 | |
Daniel Veillard | 28929b2 | 2000-11-13 18:22:49 +0000 | [diff] [blame] | 2159 | <h3>2.2.8: Nov 13 2000</h3> |
| 2160 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2161 | <li>First version of <a |
| 2162 | href="http://www.w3.org/TR/xinclude">XInclude</a>support</li> |
Daniel Veillard | 28929b2 | 2000-11-13 18:22:49 +0000 | [diff] [blame] | 2163 | <li>Patch in conditional section handling</li> |
| 2164 | <li>updated MS compiler project</li> |
| 2165 | <li>fixed some XPath problems</li> |
| 2166 | <li>added an URI escaping function</li> |
| 2167 | <li>some other bug fixes</li> |
| 2168 | </ul> |
| 2169 | |
| 2170 | <h3>2.2.7: Oct 31 2000</h3> |
| 2171 | <ul> |
| 2172 | <li>added message redirection</li> |
| 2173 | <li>XPath improvements (thanks TOM !)</li> |
| 2174 | <li>xmlIOParseDTD() added</li> |
| 2175 | <li>various small fixes in the HTML, URI, HTTP and XPointer support</li> |
| 2176 | <li>some cleanup of the Makefile, autoconf and the distribution content</li> |
| 2177 | </ul> |
| 2178 | |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 2179 | <h3>2.2.6: Oct 25 2000:</h3> |
| 2180 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2181 | <li>Added an hash table module, migrated a number of internal |
| 2182 | structuretothose</li> |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 2183 | <li>Fixed a posteriori validation problems</li> |
| 2184 | <li>HTTP module cleanups</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2185 | <li>HTML parser improvements (tag errors, script/style |
| 2186 | handling,attributenormalization)</li> |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 2187 | <li>coalescing of adjacent text nodes</li> |
| 2188 | <li>couple of XPath bug fixes, exported the internal API</li> |
| 2189 | </ul> |
| 2190 | |
Daniel Veillard | ab8500d | 2000-10-15 21:06:19 +0000 | [diff] [blame] | 2191 | <h3>2.2.5: Oct 15 2000:</h3> |
Daniel Veillard | 4c3a203 | 1999-11-19 17:46:26 +0000 | [diff] [blame] | 2192 | <ul> |
Daniel Veillard | 189446d | 2000-10-13 10:23:06 +0000 | [diff] [blame] | 2193 | <li>XPointer implementation and testsuite</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2194 | <li>Lot of XPath fixes, added variable and functions |
| 2195 | registration,moretests</li> |
| 2196 | <li>Portability fixes, lots of enhancements toward an easy Windows |
| 2197 | buildandrelease</li> |
Daniel Veillard | 189446d | 2000-10-13 10:23:06 +0000 | [diff] [blame] | 2198 | <li>Late validation fixes</li> |
| 2199 | <li>Integrated a lot of contributed patches</li> |
| 2200 | <li>added memory management docs</li> |
Daniel Veillard | ab8500d | 2000-10-15 21:06:19 +0000 | [diff] [blame] | 2201 | <li>a performance problem when using large buffer seems fixed</li> |
Daniel Veillard | 189446d | 2000-10-13 10:23:06 +0000 | [diff] [blame] | 2202 | </ul> |
| 2203 | |
| 2204 | <h3>2.2.4: Oct 1 2000:</h3> |
| 2205 | <ul> |
| 2206 | <li>main XPath problem fixed</li> |
| 2207 | <li>Integrated portability patches for Windows</li> |
| 2208 | <li>Serious bug fixes on the URI and HTML code</li> |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 2209 | </ul> |
| 2210 | |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 2211 | <h3>2.2.3: Sep 17 2000</h3> |
| 2212 | <ul> |
| 2213 | <li>bug fixes</li> |
| 2214 | <li>cleanup of entity handling code</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2215 | <li>overall review of all loops in the parsers, all sprintf usage |
| 2216 | hasbeenchecked too</li> |
| 2217 | <li>Far better handling of larges Dtd. Validating against DocBook |
| 2218 | XMLDtdworks smoothly now.</li> |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 2219 | </ul> |
| 2220 | |
| 2221 | <h3>1.8.10: Sep 6 2000</h3> |
| 2222 | <ul> |
| 2223 | <li>bug fix release for some Gnome projects</li> |
| 2224 | </ul> |
| 2225 | |
| 2226 | <h3>2.2.2: August 12 2000</h3> |
Daniel Veillard | 786d7c8 | 2000-08-12 23:38:57 +0000 | [diff] [blame] | 2227 | <ul> |
| 2228 | <li>mostly bug fixes</li> |
Daniel Veillard | ec78c0f | 2000-08-25 10:25:23 +0000 | [diff] [blame] | 2229 | <li>started adding routines to access xml parser context options</li> |
Daniel Veillard | 786d7c8 | 2000-08-12 23:38:57 +0000 | [diff] [blame] | 2230 | </ul> |
| 2231 | |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 2232 | <h3>2.2.1: July 21 2000</h3> |
Daniel Veillard | a2679fa | 2000-07-22 02:38:15 +0000 | [diff] [blame] | 2233 | <ul> |
| 2234 | <li>a purely bug fixes release</li> |
| 2235 | <li>fixed an encoding support problem when parsing from a memory block</li> |
| 2236 | <li>fixed a DOCTYPE parsing problem</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2237 | <li>removed a bug in the function allowing to override the |
| 2238 | memoryallocationroutines</li> |
Daniel Veillard | a2679fa | 2000-07-22 02:38:15 +0000 | [diff] [blame] | 2239 | </ul> |
| 2240 | |
Daniel Veillard | d5f97f8 | 2000-09-17 16:38:14 +0000 | [diff] [blame] | 2241 | <h3>2.2.0: July 14 2000</h3> |
Daniel Veillard | 94e9060 | 2000-07-17 14:38:19 +0000 | [diff] [blame] | 2242 | <ul> |
| 2243 | <li>applied a lot of portability fixes</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2244 | <li>better encoding support/cleanup and saving (content is nowalwaysencoded |
| 2245 | in UTF-8)</li> |
Daniel Veillard | 94e9060 | 2000-07-17 14:38:19 +0000 | [diff] [blame] | 2246 | <li>the HTML parser now correctly handles encodings</li> |
| 2247 | <li>added xmlHasProp()</li> |
| 2248 | <li>fixed a serious problem with &#38;</li> |
| 2249 | <li>propagated the fix to FTP client</li> |
| 2250 | <li>cleanup, bugfixes, etc ...</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2251 | <li>Added a page about <a |
| 2252 | href="encoding.html">libxmlInternationalizationsupport</a></li> |
Daniel Veillard | 94e9060 | 2000-07-17 14:38:19 +0000 | [diff] [blame] | 2253 | </ul> |
| 2254 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 2255 | <h3>1.8.9: July 9 2000</h3> |
| 2256 | <ul> |
| 2257 | <li>fixed the spec the RPMs should be better</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2258 | <li>fixed a serious bug in the FTP implementation, released 1.8.9 |
| 2259 | tosolverpmfind users problem</li> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 2260 | </ul> |
| 2261 | |
Daniel Veillard | 6388e17 | 2000-07-03 16:07:19 +0000 | [diff] [blame] | 2262 | <h3>2.1.1: July 1 2000</h3> |
| 2263 | <ul> |
| 2264 | <li>fixes a couple of bugs in the 2.1.0 packaging</li> |
| 2265 | <li>improvements on the HTML parser</li> |
| 2266 | </ul> |
| 2267 | |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 2268 | <h3>2.1.0 and 1.8.8: June 29 2000</h3> |
| 2269 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2270 | <li>1.8.8 is mostly a commodity package for upgrading to libxml2accordingto |
| 2271 | <a href="upgrade.html">new instructions</a>. It fixes a nastyproblemabout |
| 2272 | &#38; charref parsing</li> |
| 2273 | <li>2.1.0 also ease the upgrade from libxml v1 to the recent version.italso |
| 2274 | contains numerous fixes and enhancements: |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 2275 | <ul> |
| 2276 | <li>added xmlStopParser() to stop parsing</li> |
| 2277 | <li>improved a lot parsing speed when there is large CDATA blocs</li> |
| 2278 | <li>includes XPath patches provided by Picdar Technology</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2279 | <li>tried to fix as much as possible DTD validation andnamespacerelated |
| 2280 | problems</li> |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 2281 | <li>output to a given encoding has been added/tested</li> |
| 2282 | <li>lot of various fixes</li> |
| 2283 | </ul> |
| 2284 | </li> |
| 2285 | </ul> |
| 2286 | |
Daniel Veillard | e0aed30 | 2000-04-16 08:52:20 +0000 | [diff] [blame] | 2287 | <h3>2.0.0: Apr 12 2000</h3> |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 2288 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2289 | <li>First public release of libxml2. If you are using libxml, it's |
| 2290 | agoodidea to check the 1.x to 2.x upgrade instructions. NOTE: |
| 2291 | whileinitiallyscheduled for Apr 3 the release occurred only on Apr 12 due |
| 2292 | tomassiveworkload.</li> |
| 2293 | <li>The include are now located under $prefix/include/libxml |
| 2294 | (insteadof$prefix/include/gnome-xml), they also are referenced by |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 2295 | <pre>#include <libxml/xxx.h></pre> |
Daniel Veillard | e0aed30 | 2000-04-16 08:52:20 +0000 | [diff] [blame] | 2296 | <p>instead of</p> |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 2297 | <pre>#include "xxx.h"</pre> |
| 2298 | </li> |
Daniel Veillard | 8f62198 | 2000-03-20 13:07:15 +0000 | [diff] [blame] | 2299 | <li>a new URI module for parsing URIs and following strictly RFC 2396</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2300 | <li>the memory allocation routines used by libxml can now |
| 2301 | beoverloadeddynamically by using xmlMemSetup()</li> |
| 2302 | <li>The previously CVS only tool tester has |
| 2303 | beenrenamed<strong>xmllint</strong>and is now installed as part of |
| 2304 | thelibxml2package</li> |
| 2305 | <li>The I/O interface has been revamped. There is now ways to |
| 2306 | pluginspecific I/O modules, either at the URI scheme detection |
| 2307 | levelusingxmlRegisterInputCallbacks() or by passing I/O functions |
| 2308 | whencreating aparser context using xmlCreateIOParserCtxt()</li> |
| 2309 | <li>there is a C preprocessor macro LIBXML_VERSION providing |
| 2310 | theversionnumber of the libxml module in use</li> |
| 2311 | <li>a number of optional features of libxml can now be excluded |
| 2312 | atconfiguretime (FTP/HTTP/HTML/XPath/Debug)</li> |
Daniel Veillard | edfb29b | 2000-03-14 19:59:05 +0000 | [diff] [blame] | 2313 | </ul> |
| 2314 | |
| 2315 | <h3>2.0.0beta: Mar 14 2000</h3> |
| 2316 | <ul> |
| 2317 | <li>This is a first Beta release of libxml version 2</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2318 | <li>It's available only from<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2319 | href="ftp://xmlsoft.org/libxml2/">xmlsoft.orgFTP</a>, it's packaged |
| 2320 | aslibxml2-2.0.0beta and available as tar andRPMs</li> |
| 2321 | <li>This version is now the head in the Gnome CVS base, the old |
| 2322 | oneisavailable under the tag LIB_XML_1_X</li> |
| 2323 | <li>This includes a very large set of changes. From a programmatic |
| 2324 | pointofview applications should not have to be modified too much, check |
| 2325 | the<a href="upgrade.html">upgrade page</a></li> |
Daniel Veillard | edfb29b | 2000-03-14 19:59:05 +0000 | [diff] [blame] | 2326 | <li>Some interfaces may changes (especially a bit about encoding).</li> |
| 2327 | <li>the updates includes: |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 2328 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2329 | <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) |
| 2330 | seemscorrectlyhandled now</li> |
| 2331 | <li>Better handling of entities, especially well-formedness |
| 2332 | checkingandproper PEref extensions in external subsets</li> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 2333 | <li>DTD conditional sections</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2334 | <li>Validation now correctly handle entities content</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2335 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2336 | href="http://rpmfind.net/tools/gdome/messages/0039.html">changestructuresto |
| 2337 | accommodate DOM</a></li> |
Daniel Veillard | 6c8b117 | 2000-03-01 00:40:41 +0000 | [diff] [blame] | 2338 | </ul> |
| 2339 | </li> |
Daniel Veillard | edfb29b | 2000-03-14 19:59:05 +0000 | [diff] [blame] | 2340 | <li>Serious progress were made toward compliance, <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2341 | href="conf/result.html">here are the result of the |
| 2342 | test</a>againsttheOASIS testsuite (except the Japanese tests since I |
| 2343 | don't supportthatencoding yet). This URL is rebuilt every couple of hours |
| 2344 | using theCVShead version.</li> |
Daniel Veillard | e41f2b7 | 2000-01-30 20:00:07 +0000 | [diff] [blame] | 2345 | </ul> |
| 2346 | |
Daniel Veillard | f13e1ed | 2000-03-06 07:41:49 +0000 | [diff] [blame] | 2347 | <h3>1.8.7: Mar 6 2000</h3> |
| 2348 | <ul> |
| 2349 | <li>This is a bug fix release:</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2350 | <li>It is possible to disable the ignorable blanks heuristic |
| 2351 | usedbylibxml-1.x, a new function xmlKeepBlanksDefault(0) will allow |
| 2352 | this.Notethat for adherence to XML spec, this behaviour will be |
| 2353 | disabledbydefault in 2.x . The same function will allow to keep |
| 2354 | compatibilityforold code.</li> |
| 2355 | <li>Blanks in <a> </a> constructs are not |
| 2356 | ignoredanymore,avoiding heuristic is really the Right Way :-\</li> |
| 2357 | <li>The unchecked use of snprintf which was breakinglibxml-1.8.6compilation |
| 2358 | on some platforms has been fixed</li> |
| 2359 | <li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping |
| 2360 | whenprocessingURIs</li> |
Daniel Veillard | f13e1ed | 2000-03-06 07:41:49 +0000 | [diff] [blame] | 2361 | </ul> |
| 2362 | |
Daniel Veillard | e41f2b7 | 2000-01-30 20:00:07 +0000 | [diff] [blame] | 2363 | <h3>1.8.6: Jan 31 2000</h3> |
| 2364 | <ul> |
| 2365 | <li>added a nanoFTP transport module, debugged until the new version of <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2366 | href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a>canuseit |
| 2367 | without troubles</li> |
Daniel Veillard | da07c34 | 2000-01-25 18:31:22 +0000 | [diff] [blame] | 2368 | </ul> |
| 2369 | |
| 2370 | <h3>1.8.5: Jan 21 2000</h3> |
| 2371 | <ul> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 2372 | <li>adding APIs to parse a well balanced chunk of XML (production <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2373 | href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a>of |
| 2374 | theXMLspec)</li> |
Daniel Veillard | 461a66c | 2000-01-18 18:01:01 +0000 | [diff] [blame] | 2375 | <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2376 | <li>Jody Goldberg <jgoldberg@home.com> provided another patchtryingto |
| 2377 | solve the zlib checks problems</li> |
| 2378 | <li>The current state in gnome CVS base is expected to ship as |
| 2379 | 1.8.5withgnumeric soon</li> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 2380 | </ul> |
| 2381 | |
| 2382 | <h3>1.8.4: Jan 13 2000</h3> |
| 2383 | <ul> |
| 2384 | <li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li> |
| 2385 | <li>all exit() call should have been removed from libxml</li> |
| 2386 | <li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li> |
| 2387 | <li>added newDocFragment()</li> |
Daniel Veillard | f84f71f | 2000-01-05 19:54:23 +0000 | [diff] [blame] | 2388 | </ul> |
| 2389 | |
| 2390 | <h3>1.8.3: Jan 5 2000</h3> |
| 2391 | <ul> |
| 2392 | <li>a Push interface for the XML and HTML parsers</li> |
Daniel Veillard | f13e1ed | 2000-03-06 07:41:49 +0000 | [diff] [blame] | 2393 | <li>a shell-like interface to the document tree (try tester --shell :-)</li> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2394 | <li>lots of bug fixes and improvement added over XMas holidays</li> |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 2395 | <li>fixed the DTD parsing code to work with the xhtml DTD</li> |
Daniel Veillard | f84f71f | 2000-01-05 19:54:23 +0000 | [diff] [blame] | 2396 | <li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li> |
| 2397 | <li>Fixed bugs in xmlNewNs()</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2398 | <li>External entity loading code has been revamped, now |
| 2399 | itusesxmlLoadExternalEntity(), some fix on entities processing |
| 2400 | wereadded</li> |
Daniel Veillard | 437b87b | 2000-01-03 17:30:46 +0000 | [diff] [blame] | 2401 | <li>cleaned up WIN32 includes of socket stuff</li> |
Daniel Veillard | 5cb5ab8 | 1999-12-21 15:35:29 +0000 | [diff] [blame] | 2402 | </ul> |
| 2403 | |
| 2404 | <h3>1.8.2: Dec 21 1999</h3> |
| 2405 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2406 | <li>I got another problem with includes and C++, I hope this issue |
| 2407 | isfixedfor good this time</li> |
| 2408 | <li>Added a few tree modification |
| 2409 | functions:xmlReplaceNode,xmlAddPrevSibling, xmlAddNextSibling, |
| 2410 | xmlNodeSetNameandxmlDocSetRootElement</li> |
Daniel Veillard | 5cb5ab8 | 1999-12-21 15:35:29 +0000 | [diff] [blame] | 2411 | <li>Tried to improve the HTML output with help from <a |
| 2412 | href="mailto:clahey@umich.edu">Chris Lahey</a></li> |
Daniel Veillard | e4e5131 | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 2413 | </ul> |
Daniel Veillard | b24054a | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 2414 | |
Daniel Veillard | e4e5131 | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 2415 | <h3>1.8.1: Dec 18 1999</h3> |
| 2416 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2417 | <li>various patches to avoid troubles when using libxml with |
| 2418 | C++compilersthe "namespace" keyword and C escaping in include files</li> |
Daniel Veillard | e4e5131 | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 2419 | <li>a problem in one of the core macros IS_CHAR was corrected</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2420 | <li>fixed a bug introduced in 1.8.0 breaking default |
| 2421 | namespaceprocessing,and more specifically the Dia application</li> |
| 2422 | <li>fixed a posteriori validation (validation after parsing, or by |
| 2423 | usingaDtd not specified in the original document)</li> |
Daniel Veillard | b24054a | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 2424 | <li>fixed a bug in</li> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 2425 | </ul> |
| 2426 | |
| 2427 | <h3>1.8.0: Dec 12 1999</h3> |
| 2428 | <ul> |
| 2429 | <li>cleanup, especially memory wise</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2430 | <li>the parser should be more reliable, especially the HTML one, |
| 2431 | itshouldnot crash, whatever the input !</li> |
| 2432 | <li>Integrated various patches, especially a speedup improvement |
| 2433 | forlargedataset from <a |
| 2434 | href="mailto:cnygard@bellatlantic.net">CarlNygard</a>,configure with |
| 2435 | --with-buffers to enable them.</li> |
Daniel Veillard | 10a2c65 | 1999-12-12 13:03:50 +0000 | [diff] [blame] | 2436 | <li>attribute normalization, oops should have been added long ago !</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2437 | <li>attributes defaulted from DTDs should be available, xmlSetProp()nowdoes |
| 2438 | entities escaping by default.</li> |
Daniel Veillard | 4c3a203 | 1999-11-19 17:46:26 +0000 | [diff] [blame] | 2439 | </ul> |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 2440 | |
| 2441 | <h3>1.7.4: Oct 25 1999</h3> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2442 | <ul> |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 2443 | <li>Lots of HTML improvement</li> |
| 2444 | <li>Fixed some errors when saving both XML and HTML</li> |
| 2445 | <li>More examples, the regression tests should now look clean</li> |
| 2446 | <li>Fixed a bug with contiguous charref</li> |
| 2447 | </ul> |
| 2448 | |
| 2449 | <h3>1.7.3: Sep 29 1999</h3> |
| 2450 | <ul> |
| 2451 | <li>portability problems fixed</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2452 | <li>snprintf was used unconditionally, leading to link problems |
| 2453 | onsystemwere it's not available, fixed</li> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2454 | </ul> |
| 2455 | |
| 2456 | <h3>1.7.1: Sep 24 1999</h3> |
| 2457 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2458 | <li>The basic type for strings manipulated by libxml has been |
| 2459 | renamedin1.7.1 from <strong>CHAR</strong>to <strong>xmlChar</strong>. |
| 2460 | Thereasonis that CHAR was conflicting with a predefined type on |
| 2461 | Windows.Howeveron non WIN32 environment, compatibility is provided by the |
| 2462 | way ofa<strong>#define </strong>.</li> |
| 2463 | <li>Changed another error : the use of a structure field called |
| 2464 | errno,andleading to troubles on platforms where it's a macro</li> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2465 | </ul> |
| 2466 | |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2467 | <h3>1.7.0: Sep 23 1999</h3> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2468 | <ul> |
| 2469 | <li>Added the ability to fetch remote DTD or parsed entities, see the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2470 | href="html/libxml-nanohttp.html">nanohttp</a>module.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2471 | <li>Added an errno to report errors by another mean than a simpleprintflike |
| 2472 | callback</li> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2473 | <li>Finished ID/IDREF support and checking when validation</li> |
| 2474 | <li>Serious memory leaks fixed (there is now a <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2475 | href="html/libxml-xmlmemory.html">memory wrapper</a>module)</li> |
| 2476 | <li>Improvement of <a |
| 2477 | href="http://www.w3.org/TR/xpath">XPath</a>implementation</li> |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2478 | <li>Added an HTML parser front-end</li> |
| 2479 | </ul> |
| 2480 | |
| 2481 | <h2><a name="XML">XML</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2482 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2483 | <p><a href="http://www.w3.org/TR/REC-xml">XML is astandard</a>formarkup-based |
| 2484 | structured documents. Here is <a name="example">an example |
| 2485 | XMLdocument</a>:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 2486 | <pre><?xml version="1.0"?> |
| 2487 | <EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> |
| 2488 | <head> |
| 2489 | <title>Welcome to Gnome</title> |
| 2490 | </head> |
| 2491 | <chapter> |
| 2492 | <title>The Linux adventure</title> |
| 2493 | <p>bla bla bla ...</p> |
| 2494 | <image href="linus.gif"/> |
| 2495 | <p>...</p> |
| 2496 | </chapter> |
| 2497 | </EXAMPLE></pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 2498 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2499 | <p>The first line specifies that it is an XML document and |
| 2500 | givesusefulinformation about its encoding. Then the rest of the document is |
| 2501 | atextformat whose structure is specified by tags between |
| 2502 | brackets.<strong>Eachtag opened has to be closed</strong>. XML is pedantic |
| 2503 | about this.However, ifa tag is empty (no content), a single tag can serve as |
| 2504 | both theopening andclosing tag if it ends with <code>/></code>rather |
| 2505 | thanwith<code>></code>. Note that, for example, the image tag has no |
| 2506 | content(justan attribute) and is closed by ending the tag |
| 2507 | with<code>/></code>.</p> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 2508 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2509 | <p>XML can be applied successfully to a wide range of tasks, ranging |
| 2510 | fromlongterm structured document maintenance (where it follows the steps |
| 2511 | ofSGML) tosimple data encoding mechanisms like configuration file |
| 2512 | formatting(glade),spreadsheets (gnumeric), or even shorter lived documents |
| 2513 | such asWebDAV whereit is used to encode remote calls between a client and |
| 2514 | aserver.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2515 | |
Daniel Veillard | 8268716 | 2001-01-22 15:32:01 +0000 | [diff] [blame] | 2516 | <h2><a name="XSLT">XSLT</a></h2> |
| 2517 | |
Daniel Veillard | 6e6a6cc | 2001-02-15 15:55:44 +0000 | [diff] [blame] | 2518 | <p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p> |
| 2519 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2520 | <p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is |
| 2521 | alanguagefor transforming XML documents into other XML documents |
| 2522 | (orHTML/textualoutput).</p> |
Daniel Veillard | 8268716 | 2001-01-22 15:32:01 +0000 | [diff] [blame] | 2523 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2524 | <p>A separate library called libxslt is available implementing |
| 2525 | XSLT-1.0forlibxml2. This module "libxslt" too can be found in the Gnome CVS |
| 2526 | base.</p> |
Daniel Veillard | 8268716 | 2001-01-22 15:32:01 +0000 | [diff] [blame] | 2527 | |
Daniel Veillard | 29f6100 | 2005-08-06 09:07:15 +0000 | [diff] [blame] | 2528 | <p>You can check the progresses on the libxslt <a |
| 2529 | href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2530 | |
| 2531 | <h2><a name="Python">Python and bindings</a></h2> |
| 2532 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2533 | <p>There are a number of language bindings and wrappers available |
| 2534 | forlibxml2,the list below is not exhaustive. Please contact the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2535 | href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>(<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2536 | href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) inorder |
| 2537 | toget updates to this list or to discuss the specific topic of |
| 2538 | libxml2orlibxslt wrappers or bindings:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2539 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2540 | <li><a |
| 2541 | href="http://libxmlplusplus.sourceforge.net/">Libxml++</a>seemsthemost |
| 2542 | up-to-date C++ bindings for libxml2, check the <a |
| 2543 | href="http://libxmlplusplus.sourceforge.net/reference/html/hierarchy.html">documentation</a>andthe |
| 2544 | <a |
Daniel Veillard | c14401e | 2002-11-20 14:28:17 +0000 | [diff] [blame] | 2545 | href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libxmlplusplus/libxml%2b%2b/examples/">examples</a>.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2546 | <li>There is another <a |
| 2547 | href="http://libgdome-cpp.berlios.de/">C++wrapperbased on the gdome2 |
| 2548 | bindings</a>maintained by Tobias Peters.</li> |
Daniel Veillard | 9b6fd30 | 2002-05-13 12:06:47 +0000 | [diff] [blame] | 2549 | <li>and a third C++ wrapper by Peter Jones <pjones@pmade.org> |
| 2550 | <p>Website: <a |
| 2551 | href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p> |
| 2552 | </li> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2553 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2554 | href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">MattSergeant</a>developed<a |
| 2555 | href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl |
| 2556 | wrapperforlibxml2/libxslt as part of the <a |
| 2557 | href="http://axkit.com/">AxKitXMLapplication server</a>.</li> |
Daniel Veillard | 4ac494b | 2003-09-18 15:08:00 +0000 | [diff] [blame] | 2558 | <li>If you're interested into scripting XML processing, have a look at <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2559 | href="http://xsh.sourceforge.net/">XSH</a>an XML editing shell |
| 2560 | basedonLibxml2 Perl bindings.</li> |
| 2561 | <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave |
| 2562 | Kuhlman</a>providesanearlier version of the libxml/libxslt <a |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 2563 | href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li> |
Daniel Veillard | 2147367 | 2002-06-17 07:29:22 +0000 | [diff] [blame] | 2564 | <li>Gopal.V and Peter Minten develop <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2565 | href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a |
| 2566 | setofC# libxml2 bindings.</li> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2567 | <li>Petr Kozelka provides <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2568 | href="http://sourceforge.net/projects/libxml2-pas">Pascal units |
| 2569 | togluelibxml2</a>with Kylix, Delphi and other Pascal compilers.</li> |
Daniel Veillard | b2fb8ed | 2002-04-01 09:33:12 +0000 | [diff] [blame] | 2570 | <li>Uwe Fechner also provides <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2571 | href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, |
| 2572 | aDOM2implementation for Kylix2/D5/D6 from Borland.</li> |
| 2573 | <li>There is <a href="http://libxml.rubyforge.org/">bindings forRuby</a>and |
| 2574 | libxml2 bindings are also available in Ruby through the <a |
| 2575 | href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a>modulemaintainedby |
| 2576 | Tobias Peters.</li> |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2577 | <li>Steve Ball and contributors maintains <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2578 | href="http://tclxml.sourceforge.net/">libxml2 and libxslt |
| 2579 | bindingsforTcl</a>.</li> |
Daniel Veillard | 142fb21 | 2005-04-07 12:48:10 +0000 | [diff] [blame] | 2580 | <li>libxml2 and libxslt is the default XML library for PHP5.</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 2581 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2582 | href="http://savannah.gnu.org/projects/classpathx/">LibxmlJ</a>isaneffort |
| 2583 | to create a 100% JAXP-compatible Java wrapper for libxml2andlibxslt as |
| 2584 | part of GNU ClasspathX project.</li> |
| 2585 | <li>Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, |
| 2586 | lookfor<a |
| 2587 | href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li> |
| 2588 | <li><a |
| 2589 | href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a>provides<a |
| 2590 | href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLibosax</a>.This |
| 2591 | is an osax for Mac OS X with a set of commands toimplement inAppleScript |
| 2592 | the XML DOM, XPATH and XSLT. Also includescommands forProperty-lists |
| 2593 | (Apple's fast lookup table XML format.)</li> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 2594 | <li>Francesco Montorsi developped <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2595 | href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a>wrappersthat |
| 2596 | interface libxml2, allowing wxWidgets applications toload/save/editXML |
| 2597 | instances.</li> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2598 | </ul> |
| 2599 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2600 | <p>The distribution includes a set of Python bindings, which are |
| 2601 | guaranteedtobe maintained as part of the library in the future, though |
| 2602 | thePythoninterface have not yet reached the completeness of the C API.</p> |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 2603 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2604 | <p>Note that some of the Python purist dislike the default set |
| 2605 | ofPythonbindings, rather than complaining I suggest they have a look at <a |
| 2606 | href="http://codespeak.net/lxml/">lxml the more pythonic bindings |
| 2607 | forlibxml2and libxslt</a>and <a |
| 2608 | href="http://codespeak.net/mailman/listinfo/lxml-dev">helpMartijnFaassen</a>complete |
| 2609 | those.</p> |
Daniel Veillard | 929746e | 2005-05-11 11:08:22 +0000 | [diff] [blame] | 2610 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2611 | <p><a |
| 2612 | href="mailto:stephane.bidoul@softwareag.com">StéphaneBidoul</a>maintains <a |
| 2613 | href="http://users.skynet.be/sbi/libxml-python/">aWindows portof the Python |
| 2614 | bindings</a>.</p> |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2615 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2616 | <p>Note to people interested in building bindings, the API is formalized as<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2617 | href="libxml2-api.xml">an XML API description file</a>which allows |
| 2618 | toautomatea large part of the Python bindings, this includes |
| 2619 | functiondescriptions,enums, structures, typedefs, etc... The Python script |
| 2620 | used tobuild thebindings is python/generator.py in the source |
| 2621 | distribution.</p> |
Daniel Veillard | 7ef0fcb | 2002-12-14 10:38:55 +0000 | [diff] [blame] | 2622 | |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2623 | <p>To install the Python bindings there are 2 options:</p> |
Daniel Veillard | 0b79dfe | 2002-02-23 13:02:31 +0000 | [diff] [blame] | 2624 | <ul> |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2625 | <li>If you use an RPM based distribution, simply install the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2626 | href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-pythonRPM</a>(andif |
| 2627 | needed the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2628 | href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-pythonRPM</a>).</li> |
| 2629 | <li>Otherwise use the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2630 | href="ftp://xmlsoft.org/libxml2/python/">libxml2-pythonmoduledistribution</a>corresponding |
| 2631 | to your installed version oflibxml2 andlibxslt. Note that to install it |
| 2632 | you will need both libxml2and libxsltinstalled and run "python setup.py |
| 2633 | build install" in themodule tree.</li> |
Daniel Veillard | 0b79dfe | 2002-02-23 13:02:31 +0000 | [diff] [blame] | 2634 | </ul> |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2635 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2636 | <p>The distribution includes a set of examples and regression tests |
| 2637 | forthepython bindings in the <code>python/tests</code>directory. Here |
| 2638 | aresomeexcerpts from those tests:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2639 | |
| 2640 | <h3>tst.py:</h3> |
| 2641 | |
| 2642 | <p>This is a basic test of the file interface and DOM navigation:</p> |
MST 2003 John Fleck | 2dffb76 | 2003-11-29 04:41:24 +0000 | [diff] [blame] | 2643 | <pre>import libxml2, sys |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2644 | |
| 2645 | doc = libxml2.parseFile("tst.xml") |
| 2646 | if doc.name != "tst.xml": |
| 2647 | print "doc.name failed" |
| 2648 | sys.exit(1) |
| 2649 | root = doc.children |
| 2650 | if root.name != "doc": |
| 2651 | print "root.name failed" |
| 2652 | sys.exit(1) |
| 2653 | child = root.children |
| 2654 | if child.name != "foo": |
| 2655 | print "child.name failed" |
| 2656 | sys.exit(1) |
| 2657 | doc.freeDoc()</pre> |
| 2658 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2659 | <p>The Python module is called libxml2; parseFile is the |
| 2660 | equivalentofxmlParseFile (most of the bindings are automatically generated, |
| 2661 | and thexmlprefix is removed and the casing convention are kept). All node |
| 2662 | seen atthebinding level share the same subset of accessors:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2663 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2664 | <li><code>name</code>: returns the node name</li> |
| 2665 | <li><code>type</code>: returns a string indicating the node type</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2666 | <li><code>content</code>: returns the content of the node, it is |
| 2667 | basedonxmlNodeGetContent() and hence is recursive.</li> |
| 2668 | <li><code>parent</code>, |
| 2669 | <code>children</code>,<code>last</code>,<code>next</code>, |
| 2670 | <code>prev</code>,<code>doc</code>,<code>properties</code>: pointing to |
| 2671 | the associatedelement in the tree,those may return None in case no such |
| 2672 | linkexists.</li> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2673 | </ul> |
| 2674 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2675 | <p>Also note the need to explicitly deallocate documents with |
| 2676 | freeDoc().Reference counting for libxml2 trees would need quite a lot of |
| 2677 | worktofunction properly, and rather than risk memory leaks if |
| 2678 | notimplementedcorrectly it sounds safer to have an explicit function to free |
| 2679 | atree. Thewrapper python objects like doc, root or child are |
| 2680 | themautomatically garbagecollected.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2681 | |
| 2682 | <h3>validate.py:</h3> |
| 2683 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2684 | <p>This test check the validation interfaces and redirection |
| 2685 | oferrormessages:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2686 | <pre>import libxml2 |
| 2687 | |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2688 | #deactivate error messages from the validation |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2689 | def noerr(ctx, str): |
| 2690 | pass |
| 2691 | |
| 2692 | libxml2.registerErrorHandler(noerr, None) |
| 2693 | |
| 2694 | ctxt = libxml2.createFileParserCtxt("invalid.xml") |
| 2695 | ctxt.validate(1) |
| 2696 | ctxt.parseDocument() |
| 2697 | doc = ctxt.doc() |
| 2698 | valid = ctxt.isValid() |
| 2699 | doc.freeDoc() |
| 2700 | if valid != 0: |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2701 | print "validity check failed"</pre> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2702 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2703 | <p>The first thing to notice is the call to registerErrorHandler(), |
| 2704 | itdefinesa new error handler global to the library. It is used to avoid |
| 2705 | seeingtheerror messages when trying to validate the invalid document.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2706 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2707 | <p>The main interest of that test is the creation of a parser |
| 2708 | contextwithcreateFileParserCtxt() and how the behaviour can be changed |
| 2709 | beforecallingparseDocument() . Similarly the informations resulting from |
| 2710 | theparsing phaseare also available using context methods.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2711 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2712 | <p>Contexts like nodes are defined as class and the libxml2 wrappers mapstheC |
| 2713 | function interfaces in terms of objects method as much as possible.Thebest to |
| 2714 | get a complete view of what methods are supported is to look atthelibxml2.py |
| 2715 | module containing all the wrappers.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2716 | |
| 2717 | <h3>push.py:</h3> |
| 2718 | |
| 2719 | <p>This test show how to activate the push parser interface:</p> |
| 2720 | <pre>import libxml2 |
| 2721 | |
| 2722 | ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml") |
| 2723 | ctxt.parseChunk("/>", 2, 1) |
| 2724 | doc = ctxt.doc() |
| 2725 | |
| 2726 | doc.freeDoc()</pre> |
| 2727 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2728 | <p>The context is created with a special call based |
| 2729 | onthexmlCreatePushParser() from the C library. The first argument is |
| 2730 | anoptionalSAX callback object, then the initial set of data, the length and |
| 2731 | thename ofthe resource in case URI-References need to be computed by |
| 2732 | theparser.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2733 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2734 | <p>Then the data are pushed using the parseChunk() method, the |
| 2735 | lastcallsetting the third argument terminate to 1.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2736 | |
| 2737 | <h3>pushSAX.py:</h3> |
| 2738 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2739 | <p>this test show the use of the event based parsing interfaces. In |
| 2740 | thiscasethe parser does not build a document, but provides callback |
| 2741 | informationasthe parser makes progresses analyzing the data being |
| 2742 | provided:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2743 | <pre>import libxml2 |
| 2744 | log = "" |
| 2745 | |
| 2746 | class callback: |
| 2747 | def startDocument(self): |
| 2748 | global log |
| 2749 | log = log + "startDocument:" |
| 2750 | |
| 2751 | def endDocument(self): |
| 2752 | global log |
| 2753 | log = log + "endDocument:" |
| 2754 | |
| 2755 | def startElement(self, tag, attrs): |
| 2756 | global log |
| 2757 | log = log + "startElement %s %s:" % (tag, attrs) |
| 2758 | |
| 2759 | def endElement(self, tag): |
| 2760 | global log |
| 2761 | log = log + "endElement %s:" % (tag) |
| 2762 | |
| 2763 | def characters(self, data): |
| 2764 | global log |
| 2765 | log = log + "characters: %s:" % (data) |
| 2766 | |
| 2767 | def warning(self, msg): |
| 2768 | global log |
| 2769 | log = log + "warning: %s:" % (msg) |
| 2770 | |
| 2771 | def error(self, msg): |
| 2772 | global log |
| 2773 | log = log + "error: %s:" % (msg) |
| 2774 | |
| 2775 | def fatalError(self, msg): |
| 2776 | global log |
| 2777 | log = log + "fatalError: %s:" % (msg) |
| 2778 | |
| 2779 | handler = callback() |
| 2780 | |
| 2781 | ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml") |
| 2782 | chunk = " url='tst'>b" |
| 2783 | ctxt.parseChunk(chunk, len(chunk), 0) |
| 2784 | chunk = "ar</foo>" |
| 2785 | ctxt.parseChunk(chunk, len(chunk), 1) |
| 2786 | |
Daniel Veillard | fcbfa2d | 2002-02-21 17:54:27 +0000 | [diff] [blame] | 2787 | reference = "startDocument:startElement foo {'url': 'tst'}:" + \ |
| 2788 | "characters: bar:endElement foo:endDocument:" |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2789 | if log != reference: |
| 2790 | print "Error got: %s" % log |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2791 | print "Expected: %s" % reference</pre> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2792 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2793 | <p>The key object in that test is the handler, it provides a number |
| 2794 | ofentrypoints which can be called by the parser as it makes progresses |
| 2795 | toindicatethe information set obtained. The full set of callback is larger |
| 2796 | thanwhatthe callback class in that specific example implements (see |
| 2797 | theSAXdefinition for a complete list). The wrapper will only call those |
| 2798 | suppliedbythe object when activated. The startElement receives the names of |
| 2799 | theelementand a dictionary containing the attributes carried by this |
| 2800 | element.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2801 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2802 | <p>Also note that the reference string generated from the callback |
| 2803 | showsasingle character call even though the string "bar" is passed to |
| 2804 | theparserfrom 2 different call to parseChunk()</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2805 | |
| 2806 | <h3>xpath.py:</h3> |
| 2807 | |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 2808 | <p>This is a basic test of XPath wrappers support</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2809 | <pre>import libxml2 |
| 2810 | |
| 2811 | doc = libxml2.parseFile("tst.xml") |
| 2812 | ctxt = doc.xpathNewContext() |
| 2813 | res = ctxt.xpathEval("//*") |
| 2814 | if len(res) != 2: |
| 2815 | print "xpath query: wrong node set size" |
| 2816 | sys.exit(1) |
| 2817 | if res[0].name != "doc" or res[1].name != "foo": |
| 2818 | print "xpath query: wrong node set value" |
| 2819 | sys.exit(1) |
| 2820 | doc.freeDoc() |
| 2821 | ctxt.xpathFreeContext()</pre> |
| 2822 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2823 | <p>This test parses a file, then create an XPath context to |
| 2824 | evaluateXPathexpression on it. The xpathEval() method execute an XPath query |
| 2825 | andreturnsthe result mapped in a Python way. String and numbers are |
| 2826 | nativelyconverted,and node sets are returned as a tuple of libxml2 Python |
| 2827 | nodeswrappers. Likethe document, the XPath context need to be freed |
| 2828 | explicitly,also not thatthe result of the XPath query may point back to the |
| 2829 | documenttree and hencethe document must be freed after the result of the |
| 2830 | query isused.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2831 | |
| 2832 | <h3>xpathext.py:</h3> |
| 2833 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2834 | <p>This test shows how to extend the XPath engine with functions |
| 2835 | writteninpython:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2836 | <pre>import libxml2 |
| 2837 | |
| 2838 | def foo(ctx, x): |
| 2839 | return x + 1 |
| 2840 | |
| 2841 | doc = libxml2.parseFile("tst.xml") |
| 2842 | ctxt = doc.xpathNewContext() |
| 2843 | libxml2.registerXPathFunction(ctxt._o, "foo", None, foo) |
| 2844 | res = ctxt.xpathEval("foo(1)") |
| 2845 | if res != 2: |
| 2846 | print "xpath extension failure" |
| 2847 | doc.freeDoc() |
| 2848 | ctxt.xpathFreeContext()</pre> |
| 2849 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2850 | <p>Note how the extension function is registered with the context |
| 2851 | (butthatpart is not yet finalized, this may change slightly in the |
| 2852 | future).</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2853 | |
| 2854 | <h3>tstxpath.py:</h3> |
| 2855 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2856 | <p>This test is similar to the previous one but shows how |
| 2857 | theextensionfunction can access the XPath evaluation context:</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2858 | <pre>def foo(ctx, x): |
| 2859 | global called |
| 2860 | |
| 2861 | # |
| 2862 | # test that access to the XPath evaluation contexts |
| 2863 | # |
| 2864 | pctxt = libxml2.xpathParserContext(_obj=ctx) |
| 2865 | ctxt = pctxt.context() |
| 2866 | called = ctxt.function() |
| 2867 | return x + 1</pre> |
| 2868 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2869 | <p>All the interfaces around the XPath parser(or rather evaluation)contextare |
| 2870 | not finalized, but it should be sufficient to do contextual workat |
| 2871 | theevaluation point.</p> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2872 | |
| 2873 | <h3>Memory debugging:</h3> |
| 2874 | |
| 2875 | <p>last but not least, all tests starts with the following prologue:</p> |
| 2876 | <pre>#memory debug specific |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 2877 | libxml2.debugMemory(1)</pre> |
Daniel Veillard | 6dbcaf8 | 2002-02-20 14:37:47 +0000 | [diff] [blame] | 2878 | |
| 2879 | <p>and ends with the following epilogue:</p> |
| 2880 | <pre>#memory debug specific |
| 2881 | libxml2.cleanupParser() |
| 2882 | if libxml2.debugMemory(1) == 0: |
| 2883 | print "OK" |
| 2884 | else: |
| 2885 | print "Memory leak %d bytes" % (libxml2.debugMemory(1)) |
| 2886 | libxml2.dumpMemory()</pre> |
| 2887 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2888 | <p>Those activate the memory debugging interface of libxml2 whereallallocated |
| 2889 | block in the library are tracked. The prologue then cleans upthelibrary state |
| 2890 | and checks that all allocated memory has been freed. If notitcalls |
| 2891 | dumpMemory() which saves that list in a <code>.memdump</code>file.</p> |
Daniel Veillard | 8268716 | 2001-01-22 15:32:01 +0000 | [diff] [blame] | 2892 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 2893 | <h2><a name="architecture">libxml2 architecture</a></h2> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2894 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2895 | <p>Libxml2 is made of multiple components; some of them are optional, |
| 2896 | andmostof the block interfaces are public. The main components are:</p> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2897 | <ul> |
| 2898 | <li>an Input/Output layer</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 2899 | <li>FTP and HTTP client layers (optional)</li> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2900 | <li>an Internationalization layer managing the encodings support</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 2901 | <li>a URI module</li> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2902 | <li>the XML parser and its basic SAX interface</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 2903 | <li>an HTML parser using the same SAX interface (optional)</li> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2904 | <li>a SAX tree module to build an in-memory DOM representation</li> |
| 2905 | <li>a tree module to manipulate the DOM representation</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 2906 | <li>a validation module using the DOM representation (optional)</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 2907 | <li>an XPath module for global lookup in a DOM representation(optional)</li> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 2908 | <li>a debug module (optional)</li> |
Daniel Veillard | 4540be4 | 2000-08-19 16:40:28 +0000 | [diff] [blame] | 2909 | </ul> |
| 2910 | |
| 2911 | <p>Graphically this gives the following:</p> |
| 2912 | |
| 2913 | <p><img src="libxml.gif" alt="a graphical view of the various"></p> |
| 2914 | |
| 2915 | <p></p> |
| 2916 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2917 | <h2><a name="tree">The tree output</a></h2> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 2918 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2919 | <p>The parser returns a tree built during the document analysis. |
| 2920 | Thevaluereturned is an <strong>xmlDocPtr</strong>(i.e., a pointer |
| 2921 | toan<strong>xmlDoc</strong>structure). This structure contains |
| 2922 | informationsuchas the file name, the document type, and |
| 2923 | a<strong>children</strong>pointerwhich is the root of the document (or |
| 2924 | moreexactly the first child under theroot which is the document). The tree |
| 2925 | ismade of <strong>xmlNode</strong>s,chained in double-linked lists of |
| 2926 | siblingsand with a children<->parentrelationship. An xmlNode can also |
| 2927 | carryproperties (a chain of xmlAttrstructures). An attribute may have a |
| 2928 | valuewhich is a list of TEXT orENTITY_REF nodes.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 2929 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2930 | <p>Here is an example (erroneous with respect to the XML spec |
| 2931 | sincethereshould be only one ELEMENT under the root):</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 2932 | |
| 2933 | <p><img src="structure.gif" alt=" structure.gif "></p> |
| 2934 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2935 | <p>In the source package there is a small program (not installed |
| 2936 | bydefault)called <strong>xmllint</strong>which parses XML files given |
| 2937 | asargument andprints them back as parsed. This is useful for detecting |
| 2938 | errorsboth in XMLcode and in the XML parser itself. It has an |
| 2939 | option<strong>--debug</strong>which prints the actual in-memory structure of |
| 2940 | thedocument; here is theresult with the <a |
| 2941 | href="#example">example</a>givenbefore:</p> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 2942 | <pre>DOCUMENT |
| 2943 | version=1.0 |
| 2944 | standalone=true |
| 2945 | ELEMENT EXAMPLE |
| 2946 | ATTRIBUTE prop1 |
| 2947 | TEXT |
| 2948 | content=gnome is great |
| 2949 | ATTRIBUTE prop2 |
| 2950 | ENTITY_REF |
| 2951 | TEXT |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 2952 | content= linux too |
Daniel Veillard | 402e8c8 | 2000-02-29 22:57:47 +0000 | [diff] [blame] | 2953 | ELEMENT head |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 2954 | ELEMENT title |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 2955 | TEXT |
| 2956 | content=Welcome to Gnome |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 2957 | ELEMENT chapter |
| 2958 | ELEMENT title |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 2959 | TEXT |
| 2960 | content=The Linux adventure |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 2961 | ELEMENT p |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 2962 | TEXT |
| 2963 | content=bla bla bla ... |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 2964 | ELEMENT image |
| 2965 | ATTRIBUTE href |
| 2966 | TEXT |
| 2967 | content=linus.gif |
| 2968 | ELEMENT p |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 2969 | TEXT |
| 2970 | content=...</pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 2971 | |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 2972 | <p>This should be useful for learning the internal representation model.</p> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 2973 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 2974 | <h2><a name="interface">The SAX interface</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2975 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2976 | <p>Sometimes the DOM tree output is just too large to fit |
| 2977 | reasonablyintomemory. In that case (and if you don't expect to save back the |
| 2978 | XMLdocumentloaded using libxml), it's better to use the SAX interface of |
| 2979 | libxml.SAX isa <strong>callback-based interface</strong>to the parser. |
| 2980 | Beforeparsing,the application layer registers a customized set of callbacks |
| 2981 | whicharecalled by the library as it progresses through the XML input.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2982 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2983 | <p>To get more detailed step-by-step guidance on using the SAX |
| 2984 | interfaceoflibxml, see the <a |
| 2985 | href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">nicedocumentation</a>.writtenby |
| 2986 | <a href="mailto:james@daa.com.au">JamesHenstridge</a>.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2987 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 2988 | <p>You can debug the SAX behaviour by using |
| 2989 | the<strong>testSAX</strong>program located in the gnome-xml module (it's |
| 2990 | usuallynot shipped in thebinary packages of libxml, but you can find it in |
| 2991 | the tarsourcedistribution). Here is the sequence of callbacks that would be |
| 2992 | reportedbytestSAX when parsing the example XML document shown earlier:</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 2993 | <pre>SAX.setDocumentLocator() |
| 2994 | SAX.startDocument() |
| 2995 | SAX.getEntity(amp) |
| 2996 | SAX.startElement(EXAMPLE, prop1='gnome is great', prop2='&amp; linux too') |
| 2997 | SAX.characters( , 3) |
| 2998 | SAX.startElement(head) |
| 2999 | SAX.characters( , 4) |
| 3000 | SAX.startElement(title) |
| 3001 | SAX.characters(Welcome to Gnome, 16) |
| 3002 | SAX.endElement(title) |
| 3003 | SAX.characters( , 3) |
| 3004 | SAX.endElement(head) |
| 3005 | SAX.characters( , 3) |
| 3006 | SAX.startElement(chapter) |
| 3007 | SAX.characters( , 4) |
| 3008 | SAX.startElement(title) |
| 3009 | SAX.characters(The Linux adventure, 19) |
| 3010 | SAX.endElement(title) |
| 3011 | SAX.characters( , 4) |
| 3012 | SAX.startElement(p) |
| 3013 | SAX.characters(bla bla bla ..., 15) |
| 3014 | SAX.endElement(p) |
| 3015 | SAX.characters( , 4) |
| 3016 | SAX.startElement(image, href='linus.gif') |
| 3017 | SAX.endElement(image) |
| 3018 | SAX.characters( , 4) |
| 3019 | SAX.startElement(p) |
| 3020 | SAX.characters(..., 3) |
| 3021 | SAX.endElement(p) |
| 3022 | SAX.characters( , 3) |
| 3023 | SAX.endElement(chapter) |
| 3024 | SAX.characters( , 1) |
| 3025 | SAX.endElement(EXAMPLE) |
| 3026 | SAX.endDocument()</pre> |
| 3027 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3028 | <p>Most of the other interfaces of libxml2 are based on the |
| 3029 | DOMtree-buildingfacility, so nearly everything up to the end of this |
| 3030 | documentpresupposes theuse of the standard DOM tree build. Note that the DOM |
| 3031 | treeitself is built bya set of registered default callbacks, without |
| 3032 | internalspecificinterface.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 3033 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3034 | <h2><a name="Validation">Validation & DTDs</a></h2> |
| 3035 | |
| 3036 | <p>Table of Content:</p> |
| 3037 | <ol> |
| 3038 | <li><a href="#General5">General overview</a></li> |
| 3039 | <li><a href="#definition">The definition</a></li> |
| 3040 | <li><a href="#Simple">Simple rules</a> |
| 3041 | <ol> |
Daniel Veillard | 9c46682 | 2001-10-25 12:03:39 +0000 | [diff] [blame] | 3042 | <li><a href="#reference">How to reference a DTD from a document</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3043 | <li><a href="#Declaring">Declaring elements</a></li> |
| 3044 | <li><a href="#Declaring1">Declaring attributes</a></li> |
| 3045 | </ol> |
| 3046 | </li> |
| 3047 | <li><a href="#Some">Some examples</a></li> |
| 3048 | <li><a href="#validate">How to validate</a></li> |
| 3049 | <li><a href="#Other">Other resources</a></li> |
| 3050 | </ol> |
| 3051 | |
| 3052 | <h3><a name="General5">General overview</a></h3> |
| 3053 | |
| 3054 | <p>Well what is validation and what is a DTD ?</p> |
| 3055 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3056 | <p>DTD is the acronym for Document Type Definition. This is a |
| 3057 | descriptionofthe content for a family of XML files. This is part of the |
| 3058 | XML1.0specification, and allows one to describe and verify that a |
| 3059 | givendocumentinstance conforms to the set of rules detailing its structure |
| 3060 | andcontent.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3061 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3062 | <p>Validation is the process of checking a document against a |
| 3063 | DTD(moregenerally against a set of construction rules).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3064 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3065 | <p>The validation process and building DTDs are the two most difficultpartsof |
| 3066 | the XML life cycle. Briefly a DTD defines all the possible elementsto befound |
| 3067 | within your document, what is the formal shape of your documenttree(by |
| 3068 | defining the allowed content of an element; either text, aregularexpression |
| 3069 | for the allowed list of children, or mixed content i.e.both textand |
| 3070 | children). The DTD also defines the valid attributes for allelements andthe |
| 3071 | types of those attributes.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3072 | |
| 3073 | <h3><a name="definition1">The definition</a></h3> |
| 3074 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3075 | <p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a>(<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3076 | href="http://www.xml.com/axml/axml.html">Tim Bray's annotated |
| 3077 | versionofRev1</a>):</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3078 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3079 | <li><a |
| 3080 | href="http://www.w3.org/TR/REC-xml#elemdecls">Declaringelements</a></li> |
| 3081 | <li><a |
| 3082 | href="http://www.w3.org/TR/REC-xml#attdecls">Declaringattributes</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3083 | </ul> |
| 3084 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3085 | <p>(unfortunately) all this is inherited from the SGML world, the |
| 3086 | syntaxisancient...</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3087 | |
| 3088 | <h3><a name="Simple1">Simple rules</a></h3> |
| 3089 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3090 | <p>Writing DTDs can be done in many ways. The rules to build them if |
| 3091 | youneedsomething permanent or something which can evolve over time can |
| 3092 | beradicallydifferent. Really complex DTDs like DocBook ones are flexible |
| 3093 | butquiteharder to design. I will just focus on DTDs for a formats with a |
| 3094 | fixedsimplestructure. It is just a set of basic rules, and definitely |
| 3095 | notexhaustive norusable for complex DTD design.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3096 | |
| 3097 | <h4><a name="reference1">How to reference a DTD from a document</a>:</h4> |
| 3098 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3099 | <p>Assuming the top element of the document is <code>spec</code>and the |
| 3100 | dtdisplaced in the file <code>mydtd</code>in the |
| 3101 | subdirectory<code>dtds</code>ofthe directory from where the document were |
| 3102 | loaded:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3103 | |
| 3104 | <p><code><!DOCTYPE spec SYSTEM "dtds/mydtd"></code></p> |
| 3105 | |
| 3106 | <p>Notes:</p> |
| 3107 | <ul> |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 3108 | <li>The system string is actually an URI-Reference (as defined in <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3109 | href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can |
| 3110 | useafull URL string indicating the location of your DTD on the Web. This |
| 3111 | isareally good thing to do if you want others to validate |
| 3112 | yourdocument.</li> |
| 3113 | <li>It is also possible to associate a <code>PUBLIC</code>identifier(amagic |
| 3114 | string) so that the DTD is looked up in catalogs on the clientsidewithout |
| 3115 | having to locate it on the web.</li> |
| 3116 | <li>A DTD contains a set of element and attribute declarations, |
| 3117 | buttheydon't define what the root of the document should be. This |
| 3118 | isexplicitlytold to the parser/validator as the first element |
| 3119 | ofthe<code>DOCTYPE</code>declaration.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3120 | </ul> |
| 3121 | |
| 3122 | <h4><a name="Declaring2">Declaring elements</a>:</h4> |
| 3123 | |
| 3124 | <p>The following declares an element <code>spec</code>:</p> |
| 3125 | |
| 3126 | <p><code><!ELEMENT spec (front, body, back?)></code></p> |
| 3127 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3128 | <p>It also expresses that the spec element contains one<code>front</code>,one |
| 3129 | <code>body</code>and one optional<code>back</code>children elements inthis |
| 3130 | order. The declaration of oneelement of the structure and its contentare done |
| 3131 | in a single declaration.Similarly the following |
| 3132 | declares<code>div1</code>elements:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3133 | |
Daniel Veillard | 5173727 | 2002-01-23 23:10:38 +0000 | [diff] [blame] | 3134 | <p><code><!ELEMENT div1 (head, (p | list | note)*, div2?)></code></p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3135 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3136 | <p>which means div1 contains one <code>head</code>then a series |
| 3137 | ofoptional<code>p</code>, <code>list</code>s and <code>note</code>s and |
| 3138 | thenanoptional <code>div2</code>. And last but not least an element |
| 3139 | cancontaintext:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3140 | |
| 3141 | <p><code><!ELEMENT b (#PCDATA)></code></p> |
| 3142 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3143 | <p><code>b</code>contains text or being of mixed content (text and |
| 3144 | elementsinno particular order):</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3145 | |
| 3146 | <p><code><!ELEMENT p (#PCDATA|a|ul|b|i|em)*></code></p> |
| 3147 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3148 | <p><code>p </code>can contain text or |
| 3149 | <code>a</code>,<code>ul</code>,<code>b</code>, <code>i </code>or |
| 3150 | <code>em</code>elements inno particularorder.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3151 | |
| 3152 | <h4><a name="Declaring1">Declaring attributes</a>:</h4> |
| 3153 | |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 3154 | <p>Again the attributes declaration includes their content definition:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3155 | |
| 3156 | <p><code><!ATTLIST termdef name CDATA #IMPLIED></code></p> |
| 3157 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3158 | <p>means that the element <code>termdef</code>can have |
| 3159 | a<code>name</code>attribute containing text (<code>CDATA</code>) and which |
| 3160 | isoptional(<code>#IMPLIED</code>). The attribute value can also be |
| 3161 | definedwithin aset:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3162 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3163 | <p><code><!ATTLIST list |
| 3164 | type(bullets|ordered|glossary)"ordered"></code></p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3165 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3166 | <p>means <code>list</code>element have a <code>type</code>attribute |
| 3167 | with3allowed values "bullets", "ordered" or "glossary" and which |
| 3168 | defaultto"ordered" if the attribute is not explicitly specified.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3169 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3170 | <p>The content type of an attribute can be |
| 3171 | text(<code>CDATA</code>),anchor/reference/references(<code>ID</code>/<code>IDREF</code>/<code>IDREFS</code>),entity(ies)(<code>ENTITY</code>/<code>ENTITIES</code>) |
| 3172 | orname(s)(<code>NMTOKEN</code>/<code>NMTOKENS</code>). The following |
| 3173 | definesthat a<code>chapter</code>element can have an |
| 3174 | optional<code>id</code>attributeof type <code>ID</code>, usable for reference |
| 3175 | fromattribute of typeIDREF:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3176 | |
| 3177 | <p><code><!ATTLIST chapter id ID #IMPLIED></code></p> |
| 3178 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3179 | <p>The last value of an attribute definition can |
| 3180 | be<code>#REQUIRED</code>meaning that the attribute has to be |
| 3181 | given,<code>#IMPLIED</code>meaning that it is optional, or the default |
| 3182 | value(possibly prefixed by<code>#FIXED</code>if it is the only allowed).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3183 | |
| 3184 | <p>Notes:</p> |
| 3185 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3186 | <li>Usually the attributes pertaining to a given element are declared |
| 3187 | inasingle expression, but it is just a convention adopted by a lot |
| 3188 | ofDTDwriters: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3189 | <pre><!ATTLIST termdef |
| 3190 | id ID #REQUIRED |
| 3191 | name CDATA #IMPLIED></pre> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3192 | <p>The previous construct defines |
| 3193 | both<code>id</code>and<code>name</code>attributes for the |
| 3194 | element<code>termdef</code>.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3195 | </li> |
| 3196 | </ul> |
| 3197 | |
| 3198 | <h3><a name="Some1">Some examples</a></h3> |
| 3199 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3200 | <p>The directory <code>test/valid/dtds/</code>in the |
| 3201 | libxml2distributioncontains some complex DTD examples. The example in |
| 3202 | thefile<code>test/valid/dia.xml</code>shows an XML file where the simple |
| 3203 | DTDisdirectly included within the document.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3204 | |
| 3205 | <h3><a name="validate1">How to validate</a></h3> |
| 3206 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3207 | <p>The simplest way is to use the xmllint program included with |
| 3208 | libxml.The<code>--valid</code>option turns-on validation of the files given |
| 3209 | asinput.For example the following validates a copy of the first revision of |
| 3210 | theXML1.0 specification:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3211 | |
| 3212 | <p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p> |
| 3213 | |
Daniel Veillard | 0b28e88 | 2002-07-24 23:47:05 +0000 | [diff] [blame] | 3214 | <p>the -- noout is used to disable output of the resulting tree.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3215 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3216 | <p>The <code>--dtdvalid dtd</code>allows validation of the |
| 3217 | document(s)againsta given DTD.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3218 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 3219 | <p>Libxml2 exports an API to handle DTDs and validation, check the <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3220 | href="http://xmlsoft.org/html/libxml-valid.html">associateddescription</a>.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3221 | |
| 3222 | <h3><a name="Other1">Other resources</a></h3> |
| 3223 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3224 | <p>DTDs are as old as SGML. So there may be a number of examples |
| 3225 | on-line,Iwill just list one for now, others pointers welcome:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3226 | <ul> |
| 3227 | <li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li> |
| 3228 | </ul> |
| 3229 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3230 | <p>I suggest looking at the examples found under test/valid/dtd and any |
| 3231 | ofthelarge number of books available on XML. The dia example in |
| 3232 | test/validshouldbe both simple and complete enough to allow you to build your |
| 3233 | own.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3234 | |
| 3235 | <p></p> |
| 3236 | |
| 3237 | <h2><a name="Memory">Memory Management</a></h2> |
| 3238 | |
| 3239 | <p>Table of Content:</p> |
| 3240 | <ol> |
| 3241 | <li><a href="#General3">General overview</a></li> |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 3242 | <li><a href="#setting">Setting libxml2 set of memory routines</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3243 | <li><a href="#cleanup">Cleaning up after parsing</a></li> |
| 3244 | <li><a href="#Debugging">Debugging routines</a></li> |
| 3245 | <li><a href="#General4">General memory requirements</a></li> |
| 3246 | </ol> |
| 3247 | |
| 3248 | <h3><a name="General3">General overview</a></h3> |
| 3249 | |
| 3250 | <p>The module <code><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3251 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code>providesthe |
| 3252 | interfaces to the libxml2 memory system:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3253 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3254 | <li>libxml2 does not use the libc memory allocator directly |
| 3255 | butxmlFree(),xmlMalloc() and xmlRealloc()</li> |
| 3256 | <li>those routines can be reallocated to a specific set of |
| 3257 | routine,bydefault the libc ones i.e. free(), malloc() and realloc()</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3258 | <li>the xmlmemory.c module includes a set of debugging routine</li> |
| 3259 | </ul> |
| 3260 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 3261 | <h3><a name="setting">Setting libxml2 set of memory routines</a></h3> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3262 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3263 | <p>It is sometimes useful to not use the default memory allocator, |
| 3264 | eitherfordebugging, analysis or to implement a specific behaviour on |
| 3265 | memorymanagement(like on embedded systems). Two function calls are available |
| 3266 | to doso:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3267 | <ul> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3268 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3269 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet()</a>whichreturn |
| 3270 | the current set of functions in use by the parser</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3271 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3272 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a>whichallow |
| 3273 | to set up a new set of memory allocation functions</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3274 | </ul> |
| 3275 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3276 | <p>Of course a call to xmlMemSetup() should probably be done beforecallingany |
| 3277 | other libxml2 routines (unless you are sure your allocationsroutines |
| 3278 | arecompatibles).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3279 | |
| 3280 | <h3><a name="cleanup">Cleaning up after parsing</a></h3> |
| 3281 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3282 | <p>Libxml2 is not stateless, there is a few set of memory |
| 3283 | structuresneedingallocation before the parser is fully functional (some |
| 3284 | encodingstructuresfor example). This also mean that once parsing is finished |
| 3285 | there isa tinyamount of memory (a few hundred bytes) which can be recollected |
| 3286 | if youdon'treuse the parser immediately:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3287 | <ul> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3288 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3289 | href="http://xmlsoft.org/html/libxml-parser.html">xmlCleanupParser()</a>isa |
| 3290 | centralized routine to free the parsing states. Note that |
| 3291 | itwon'tdeallocate any produced tree if any (use the xmlFreeDoc() |
| 3292 | andrelatedroutines for this).</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3293 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3294 | href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser()</a>isthe |
| 3295 | dual routine allowing to preallocate the parsing statewhich can beuseful |
| 3296 | for example to avoid initialization reentrancyproblems when usinglibxml2 |
| 3297 | in multithreaded applications</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3298 | </ul> |
| 3299 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3300 | <p>Generally xmlCleanupParser() is safe, if needed the state will berebuildat |
| 3301 | the next invocation of parser routines, but be careful of theconsequencesin |
| 3302 | multithreaded applications.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3303 | |
| 3304 | <h3><a name="Debugging">Debugging routines</a></h3> |
| 3305 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3306 | <p>When configured using --with-mem-debug flag (off by default), libxml2usesa |
| 3307 | set of memory allocation debugging routines keeping track of |
| 3308 | allallocatedblocks and the location in the code where the routine was called. |
| 3309 | Acouple ofother debugging routines allow to dump the memory allocated infos |
| 3310 | toa fileor call a specific routine when a given block number is allocated:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3311 | <ul> |
| 3312 | <li><a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3313 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3314 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a>and<a |
| 3315 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a>arethe |
| 3316 | memory debugging replacement allocation routines</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3317 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3318 | href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump()</a>dumpsall |
| 3319 | the informations about the allocated memory block leftsin |
| 3320 | the<code>.memdump</code>file</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3321 | </ul> |
| 3322 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3323 | <p>When developing libxml2 memory debug is enabled, the tests |
| 3324 | programscallxmlMemoryDump () and the "make test" regression tests will check |
| 3325 | foranymemory leak during the full regression test sequence, this helps |
| 3326 | alotensuring that libxml2 does not leak memory and bullet |
| 3327 | proofmemoryallocations use (some libc implementations are known to be far |
| 3328 | toopermissiveresulting in major portability problems!).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3329 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3330 | <p>If the .memdump reports a leak, it displays the allocation functionandalso |
| 3331 | tries to give some informations about the content and structure |
| 3332 | oftheallocated blocks left. This is sufficient in most cases to find |
| 3333 | theculprit,but not always. Assuming the allocation problem is reproducible, |
| 3334 | itispossible to find more easily:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3335 | <ol> |
| 3336 | <li>write down the block number xxxx not allocated</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3337 | <li>export the environment variable XML_MEM_BREAKPOINT=xxxx , |
| 3338 | theeasiestwhen using GDB is to simply give the command |
Daniel Veillard | 7579482 | 2002-04-11 16:24:32 +0000 | [diff] [blame] | 3339 | <p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p> |
| 3340 | <p>before running the program.</p> |
| 3341 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3342 | <li>run the program under a debugger and set a |
| 3343 | breakpointonxmlMallocBreakpoint() a specific function called when this |
| 3344 | preciseblockis allocated</li> |
| 3345 | <li>when the breakpoint is reached you can then do a fine analysis |
| 3346 | oftheallocation an step to see the condition resulting in |
| 3347 | themissingdeallocation.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3348 | </ol> |
| 3349 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3350 | <p>I used to use a commercial tool to debug libxml2 memory problems |
| 3351 | butafternoticing that it was not detecting memory leaks that simple |
| 3352 | mechanismwasused and proved extremely efficient until now. Lately I have also |
| 3353 | used <a href="http://developer.kde.org/~sewardj/">valgrind</a>with quite |
| 3354 | somesuccess,it is tied to the i386 architecture since it works by emulating |
| 3355 | theprocessorand instruction set, it is slow but extremely efficient, i.e. |
| 3356 | itspot memoryusage errors in a very precise way.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3357 | |
| 3358 | <h3><a name="General4">General memory requirements</a></h3> |
| 3359 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3360 | <p>How much libxml2 memory require ? It's hard to tell in average itdependsof |
| 3361 | a number of things:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3362 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3363 | <li>the parser itself should work in a fixed amount of memory, |
| 3364 | exceptforinformation maintained about the stacks of names and |
| 3365 | entitieslocations.The I/O and encoding handlers will probably account for |
| 3366 | a fewKBytes.This is true for both the XML and HTML parser (though the |
| 3367 | HTMLparserneed more state).</li> |
| 3368 | <li>If you are generating the DOM tree then memory requirements |
| 3369 | willgrownearly linear with the size of the data. In general for |
| 3370 | abalancedtextual document the internal memory requirement is about 4 |
| 3371 | timesthesize of the UTF8 serialization of this document (example |
| 3372 | theXML-1.0recommendation is a bit more of 150KBytes and takes 650KBytes |
| 3373 | ofmainmemory when parsed). Validation will add a amount of memory |
| 3374 | requiredformaintaining the external Dtd state which should be linear |
| 3375 | withthecomplexity of the content model defined by the Dtd</li> |
| 3376 | <li>If you need to work with fixed memory requirements or don't needthefull |
| 3377 | DOM tree then using the <a href="xmlreader.html">xmlReaderinterface</a>is |
| 3378 | probably the best way toproceed, it still allows tovalidate or operate on |
| 3379 | subset of the tree ifneeded.</li> |
| 3380 | <li>If you don't care about the advanced features of libxml2likevalidation, |
| 3381 | DOM, XPath or XPointer, don't use entities, need to workwithfixed memory |
| 3382 | requirements, and try to get the fastest parsingpossiblethen the SAX |
| 3383 | interface should be used, but it has knownrestrictions.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3384 | </ul> |
| 3385 | |
| 3386 | <p></p> |
| 3387 | |
| 3388 | <h2><a name="Encodings">Encodings support</a></h2> |
| 3389 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3390 | <p>If you are not really familiar with Internationalization (usual |
| 3391 | shortcutisI18N) , Unicode, characters and glyphs, I suggest you read a <a |
| 3392 | href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a>byTim |
| 3393 | Bray on Unicode and why you should care about it.</p> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 3394 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3395 | <p>If you don't understand why <b>it does not make sense to have |
| 3396 | astringwithout knowing what encoding it uses</b>, then as Joel Spolsky said |
| 3397 | <a href="http://www.joelonsoftware.com/articles/Unicode.html">please do |
| 3398 | notwriteanother line of code until you finish reading that article.</a>. It |
| 3399 | isaprerequisite to understand this page, and avoid a lot of |
| 3400 | problemswithlibxml2, XML or text processing in general.</p> |
Daniel Veillard | e5d68de | 2005-03-10 15:03:40 +0000 | [diff] [blame] | 3401 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3402 | <p>Table of Content:</p> |
| 3403 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3404 | <li><a href="encoding.html#What">What does internationalization |
| 3405 | supportmean?</a></li> |
| 3406 | <li><a href="encoding.html#internal">The internal encoding, |
| 3407 | howandwhy</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3408 | <li><a href="encoding.html#implemente">How is it implemented ?</a></li> |
| 3409 | <li><a href="encoding.html#Default">Default supported encodings</a></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3410 | <li><a href="encoding.html#extend">How to extend theexistingsupport</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3411 | </ol> |
| 3412 | |
| 3413 | <h3><a name="What">What does internationalization support mean ?</a></h3> |
| 3414 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3415 | <p>XML was designed from the start to allow the support of any charactersetby |
| 3416 | using Unicode. Any conformant XML parser has to support the UTF-8andUTF-16 |
| 3417 | default encodings which can both express the full unicode ranges.UTF8is a |
| 3418 | variable length encoding whose greatest points are to reuse thesameencoding |
| 3419 | for ASCII and to save space for Western encodings, but it is abitmore complex |
| 3420 | to handle in practice. UTF-16 use 2 bytes per character(andsometimes combines |
| 3421 | two pairs), it makes implementation easier, but looksabit overkill for |
| 3422 | Western languages encoding. Moreover the XMLspecificationallows the document |
| 3423 | to be encoded in other encodings at thecondition thatthey are clearly labeled |
| 3424 | as such. For example the following isa wellformedXML document encoded in |
| 3425 | ISO-8859-1 and using accentuated lettersthat weFrench like for both markup |
| 3426 | and content:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3427 | <pre><?xml version="1.0" encoding="ISO-8859-1"?> |
| 3428 | <très>là </très></pre> |
| 3429 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 3430 | <p>Having internationalization support in libxml2 means the following:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3431 | <ul> |
| 3432 | <li>the document is properly parsed</li> |
| 3433 | <li>informations about it's encoding are saved</li> |
| 3434 | <li>it can be modified</li> |
| 3435 | <li>it can be saved in its original encoding</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3436 | <li>it can also be saved in another encoding supported by |
| 3437 | libxml2(forexample straight UTF8 or even an ASCII form)</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3438 | </ul> |
| 3439 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3440 | <p>Another very important point is that the whole libxml2 API, |
| 3441 | withtheexception of a few routines to read with a specific encoding or save |
| 3442 | toaspecific encoding, is completely agnostic about the original encoding |
| 3443 | ofthedocument.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3444 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3445 | <p>It should be noted too that the HTML parser embedded in libxml2 nowobeythe |
| 3446 | same rules too, the following document will be (as of 2.2.2) handledinan |
| 3447 | internationalized fashion by libxml2 too:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3448 | <pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" |
| 3449 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
| 3450 | <html lang="fr"> |
| 3451 | <head> |
| 3452 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| 3453 | </head> |
| 3454 | <body> |
| 3455 | <p>W3C crée des standards pour le Web.</body> |
| 3456 | </html></pre> |
| 3457 | |
| 3458 | <h3><a name="internal">The internal encoding, how and why</a></h3> |
| 3459 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3460 | <p>One of the core decisions was to force all documents to be converted |
| 3461 | toadefault internal encoding, and that encoding to be UTF-8, here |
| 3462 | aretherationales for those choices:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3463 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3464 | <li>keeping the native encoding in the internal form would force |
| 3465 | thelibxmlusers (or the code associated) to be fully aware of the encoding |
| 3466 | oftheoriginal document, for examples when adding a text node to |
| 3467 | adocument,the content would have to be provided in the document |
| 3468 | encoding,i.e. theclient code would have to check it before hand, make |
| 3469 | sure it'sconformantto the encoding, etc ... Very hard in practice, though |
| 3470 | in somespecificcases this may make sense.</li> |
| 3471 | <li>the second decision was which encoding. From the XML spec only |
| 3472 | UTF8andUTF16 really makes sense as being the two only encodings for |
| 3473 | whichthereis mandatory support. UCS-4 (32 bits fixed size encoding) |
| 3474 | couldbeconsidered an intelligent choice too since it's a direct |
| 3475 | Unicodemappingsupport. I selected UTF-8 on the basis of efficiency |
| 3476 | andcompatibilitywith surrounding software: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3477 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3478 | <li>UTF-8 while a bit more complex to convert from/to (i.e.slightlymore |
| 3479 | costly to import and export CPU wise) is also far morecompactthan |
| 3480 | UTF-16 (and UCS-4) for a majority of the documents I seeit usedfor |
| 3481 | right now (RPM RDF catalogs, advogato data, variousconfigurationfile |
| 3482 | formats, etc.) and the key point for today'scomputerarchitecture is |
| 3483 | efficient uses of caches. If one nearlydouble thememory requirement |
| 3484 | to store the same amount of data, thiswill trashcaches (main |
| 3485 | memory/external caches/internal caches) and mytake isthat this harms |
| 3486 | the system far more than the CPU requirementsneededfor the conversion |
| 3487 | to UTF-8</li> |
| 3488 | <li>Most of libxml2 version 1 users were using it with |
| 3489 | straightASCIImost of the time, doing the conversion with an |
| 3490 | internalencodingrequiring all their code to be rewritten was a |
| 3491 | seriousshow-stopperfor using UTF-16 or UCS-4.</li> |
| 3492 | <li>UTF-8 is being used as the de-facto internal encoding |
| 3493 | standardforrelated code like the <a |
| 3494 | href="http://www.pango.org/">pango</a>upcoming Gnome text widget, |
| 3495 | anda lot of Unix code (yet another placewhere Unix programmer base |
| 3496 | takesa different approach from Microsoft- they are using UTF-16)</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3497 | </ul> |
| 3498 | </li> |
| 3499 | </ul> |
| 3500 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 3501 | <p>What does this mean in practice for the libxml2 user:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3502 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3503 | <li>xmlChar, the libxml2 data type is a byte, those bytes must |
| 3504 | beassembledas UTF-8 valid strings. The proper way to terminate an xmlChar |
| 3505 | *stringis simply to append 0 byte, as usual.</li> |
| 3506 | <li>One just need to make sure that when using chars outside the |
| 3507 | ASCIIset,the values has been properly converted to UTF-8</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3508 | </ul> |
| 3509 | |
| 3510 | <h3><a name="implemente">How is it implemented ?</a></h3> |
| 3511 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3512 | <p>Let's describe how all this works within libxml, basically |
| 3513 | theI18N(internationalization) support get triggered only during I/O |
| 3514 | operation,i.e.when reading a document or saving one. Let's look first at |
| 3515 | thereadingsequence:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3516 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3517 | <li>when a document is processed, we usually don't know the |
| 3518 | encoding,asimple heuristic allows to detect UTF-16 and UCS-4 from |
| 3519 | encodingswherethe ASCII range (0-0x7F) maps with ASCII</li> |
| 3520 | <li>the xml declaration if available is parsed, including |
| 3521 | theencodingdeclaration. At that point, if the autodetected encoding |
| 3522 | isdifferentfrom the one declared a call to xmlSwitchEncoding() |
| 3523 | isissued.</li> |
| 3524 | <li>If there is no encoding declaration, then the input has to be |
| 3525 | ineitherUTF-8 or UTF-16, if it is not then at some point when |
| 3526 | processingtheinput, the converter/checker of UTF-8 form will raise an |
| 3527 | encodingerror.You may end-up with a garbled document, or no document at |
| 3528 | all !Example: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3529 | <pre>~/XML -> ./xmllint err.xml |
| 3530 | err.xml:1: error: Input is not proper UTF-8, indicate encoding ! |
| 3531 | <très>là </très> |
| 3532 | ^ |
| 3533 | err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C |
| 3534 | <très>là </très> |
| 3535 | ^</pre> |
| 3536 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3537 | <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize |
| 3538 | it,andthen search the default registered encoding converters for |
| 3539 | thatencoding.If it's not within the default set and iconv() support has |
| 3540 | beencompiledit, it will ask iconv for such an encoder. If this fails then |
| 3541 | theparserwill report an error and stops processing: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3542 | <pre>~/XML -> ./xmllint err2.xml |
| 3543 | err2.xml:1: error: Unsupported encoding UnsupportedEnc |
| 3544 | <?xml version="1.0" encoding="UnsupportedEnc"?> |
| 3545 | ^</pre> |
| 3546 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3547 | <li>From that point the encoder processes progressively the input |
| 3548 | (itisplugged as a front-end to the I/O module) for that entity. |
| 3549 | Itcapturesand converts on-the-fly the document to be parsed to UTF-8. |
| 3550 | Theparseritself just does UTF-8 checking of this input and |
| 3551 | processittransparently. The only difference is that the encoding |
| 3552 | informationhasbeen added to the parsing context (more precisely to |
| 3553 | theinputcorresponding to this entity).</li> |
| 3554 | <li>The result (when using DOM) is an internal form completely in |
| 3555 | UTF-8withjust an encoding information on the document node.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3556 | </ol> |
| 3557 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3558 | <p>Ok then what happens when saving the document (assuming |
| 3559 | youcollected/builtan xmlDoc DOM like structure) ? It depends on the |
| 3560 | functioncalled,xmlSaveFile() will just try to save in the original |
| 3561 | encoding,whilexmlSaveFileTo() and xmlSaveFileEnc() can optionally save to |
| 3562 | agivenencoding:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3563 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3564 | <li>if no encoding is given, libxml2 will look for an |
| 3565 | encodingvalueassociated to the document and if it exists will try to save |
| 3566 | tothatencoding, |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3567 | <p>otherwise everything is written in the internal form, i.e. UTF-8</p> |
| 3568 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3569 | <li>so if an encoding was specified, either at the API level or |
| 3570 | onthedocument, libxml2 will again canonicalize the encoding name, |
| 3571 | lookupfor aconverter in the registered set or through iconv. If not |
| 3572 | foundthefunction will return an error code</li> |
| 3573 | <li>the converter is placed before the I/O buffer layer, as another |
| 3574 | kindofbuffer, then libxml2 will simply push the UTF-8 serialization |
| 3575 | tothroughthat buffer, which will then progressively be converted and |
| 3576 | pushedontothe I/O layer.</li> |
| 3577 | <li>It is possible that the converter code fails on some input, |
| 3578 | forexampletrying to push an UTF-8 encoded Chinese character through |
| 3579 | theUTF-8 toISO-8859-1 converter won't work. Since the encoders |
| 3580 | areprogressive theywill just report the error and the number of |
| 3581 | bytesconverted, at thatpoint libxml2 will decode the offending |
| 3582 | character,remove it from thebuffer and replace it with the associated |
| 3583 | charRefencoding &#123; andresume the conversion. This guarantees that |
| 3584 | anydocument will be savedwithout losses (except for markup names where |
| 3585 | thisis not legal, this isa problem in the current version, in practice |
| 3586 | avoidusing non-asciicharacters for tag or attribute names). A special |
| 3587 | "ascii"encoding nameis used to save documents to a pure ascii form can be |
| 3588 | usedwhenportability is really crucial</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3589 | </ol> |
| 3590 | |
Daniel Veillard | abfca61 | 2004-01-07 23:38:02 +0000 | [diff] [blame] | 3591 | <p>Here are a few examples based on the same test document:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3592 | <pre>~/XML -> ./xmllint isolat1 |
| 3593 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 3594 | <très>là </très> |
| 3595 | ~/XML -> ./xmllint --encode UTF-8 isolat1 |
| 3596 | <?xml version="1.0" encoding="UTF-8"?> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3597 | <très>là  </très> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3598 | ~/XML -> </pre> |
| 3599 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3600 | <p>The same processing is applied (and reuse most of the code) for |
| 3601 | HTMLI18Nprocessing. Looking up and modifying the content encoding is a |
| 3602 | bitmoredifficult since it is located in a <meta> tag under |
| 3603 | the<head>,so a couple of functions htmlGetMetaEncoding() |
| 3604 | andhtmlSetMetaEncoding() havebeen provided. The parser also attempts to |
| 3605 | switchencoding on the fly whendetecting such a tag on input. Except for that |
| 3606 | theprocessing is the same(and again reuses the same code).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3607 | |
| 3608 | <h3><a name="Default">Default supported encodings</a></h3> |
| 3609 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3610 | <p>libxml2 has a set of default converters for the followingencodings(located |
| 3611 | in encoding.c):</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3612 | <ol> |
| 3613 | <li>UTF-8 is supported by default (null handlers)</li> |
| 3614 | <li>UTF-16, both little and big endian</li> |
| 3615 | <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li> |
| 3616 | <li>ASCII, useful mostly for saving</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3617 | <li>HTML, a specific handler for the conversion of UTF-8 to ASCII |
| 3618 | withHTMLpredefined entities like &copy; for the Copyright sign.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3619 | </ol> |
| 3620 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3621 | <p>More over when compiled on an Unix platform with iconv support the |
| 3622 | fullsetof encodings supported by iconv can be instantly be used by libxml. On |
| 3623 | alinuxmachine with glibc-2.1 the list of supported encodings and aliases |
| 3624 | fill3 fullpages, and include UCS-4, the full set of ISO-Latin encodings, and |
| 3625 | thevariousJapanese ones.</p> |
Daniel Veillard | 6795260 | 2006-01-05 15:29:44 +0000 | [diff] [blame] | 3626 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3627 | <p>To convert from the UTF-8 values returned from the API to |
| 3628 | anotherencodingthen it is possible to use the function provided from <a |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3629 | href="html/libxml-encoding.html">the encoding module</a>like <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3630 | href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or |
| 3631 | usethePOSIX <a |
| 3632 | href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a>APIdirectly.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3633 | |
| 3634 | <h4>Encoding aliases</h4> |
| 3635 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3636 | <p>From 2.2.3, libxml2 has support to register encoding names aliases.Thegoal |
| 3637 | is to be able to parse document whose encoding is supported butwherethe name |
| 3638 | differs (for example from the default set of names acceptedbyiconv). The |
| 3639 | following functions allow to register and handle new aliasesforexisting |
| 3640 | encodings. Once registered libxml2 will automatically lookupthealiases when |
| 3641 | handling a document:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3642 | <ul> |
| 3643 | <li>int xmlAddEncodingAlias(const char *name, const char *alias);</li> |
| 3644 | <li>int xmlDelEncodingAlias(const char *alias);</li> |
| 3645 | <li>const char * xmlGetEncodingAlias(const char *alias);</li> |
| 3646 | <li>void xmlCleanupEncodingAliases(void);</li> |
| 3647 | </ul> |
| 3648 | |
| 3649 | <h3><a name="extend">How to extend the existing support</a></h3> |
| 3650 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3651 | <p>Well adding support for new encoding, or overriding one of |
| 3652 | theencoders(assuming it is buggy) should not be hard, just write input |
| 3653 | andoutputconversion routines to/from UTF-8, and register |
| 3654 | themusingxmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they |
| 3655 | willbecalled automatically if the parser(s) encounter such an |
| 3656 | encodingname(register it uppercase, this will help). The description of |
| 3657 | theencoders,their arguments and expected return values are described in |
| 3658 | theencoding.hheader.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3659 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3660 | <h2><a name="IO">I/O Interfaces</a></h2> |
| 3661 | |
| 3662 | <p>Table of Content:</p> |
| 3663 | <ol> |
| 3664 | <li><a href="#General1">General overview</a></li> |
| 3665 | <li><a href="#basic">The basic buffer type</a></li> |
| 3666 | <li><a href="#Input">Input I/O handlers</a></li> |
| 3667 | <li><a href="#Output">Output I/O handlers</a></li> |
| 3668 | <li><a href="#entities">The entities loader</a></li> |
| 3669 | <li><a href="#Example2">Example of customized I/O</a></li> |
| 3670 | </ol> |
| 3671 | |
| 3672 | <h3><a name="General1">General overview</a></h3> |
| 3673 | |
| 3674 | <p>The module <code><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3675 | href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code>providestheinterfaces |
| 3676 | to the libxml2 I/O system. This consists of 4 main parts:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3677 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3678 | <li>Entities loader, this is a routine which tries to fetch |
| 3679 | theentities(files) based on their PUBLIC and SYSTEM identifiers. The |
| 3680 | defaultloaderdon't look at the public identifier since libxml2 do not |
| 3681 | maintainacatalog. You can redefine you own entity loader |
| 3682 | byusing<code>xmlGetExternalEntityLoader()</code>and<code>xmlSetExternalEntityLoader()</code>.<a |
| 3683 | href="#entities">Check theexample</a>.</li> |
| 3684 | <li>Input I/O buffers which are a commodity structure used by |
| 3685 | theparser(s)input layer to handle fetching the informations to feed |
| 3686 | theparser. Thisprovides buffering and is also a placeholder where |
| 3687 | theencodingconverters to UTF8 are piggy-backed.</li> |
| 3688 | <li>Output I/O buffers are similar to the Input ones and fulfillsimilartask |
| 3689 | but when generating a serialization from a tree.</li> |
| 3690 | <li>A mechanism to register sets of I/O callbacks and associate |
| 3691 | themwithspecific naming schemes like the protocol part of the URIs. |
| 3692 | <p>This affect the default I/O operations and allows to use |
| 3693 | specificI/Ohandlers for certain names.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3694 | </li> |
| 3695 | </ul> |
| 3696 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3697 | <p>The general mechanism used when loading |
| 3698 | http://rpmfind.net/xml.htmlforexample in the HTML parser is the following:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3699 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3700 | <li>The default entity loader |
| 3701 | calls<code>xmlNewInputFromFile()</code>withthe parsing context and the |
| 3702 | URIstring.</li> |
| 3703 | <li>the URI string is checked against the existing registered |
| 3704 | handlersusingtheir match() callback function, if the HTTP module was |
| 3705 | compiledin, it isregistered and its match() function will succeeds</li> |
| 3706 | <li>the open() function of the handler is called and if |
| 3707 | successfulwillreturn an I/O Input buffer</li> |
| 3708 | <li>the parser will the start reading from this buffer |
| 3709 | andprogressivelyfetch information from the resource, calling the |
| 3710 | read()function of thehandler until the resource is exhausted</li> |
| 3711 | <li>if an encoding change is detected it will be installed on |
| 3712 | theinputbuffer, providing buffering and efficient use of |
| 3713 | theconversionroutines</li> |
| 3714 | <li>once the parser has finished, the close() function of the |
| 3715 | handleriscalled once and the Input buffer and associated |
| 3716 | resourcesaredeallocated.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3717 | </ol> |
| 3718 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3719 | <p>The user defined callbacks are checked first to allow overriding |
| 3720 | ofthedefault libxml2 I/O routines.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3721 | |
| 3722 | <h3><a name="basic">The basic buffer type</a></h3> |
| 3723 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3724 | <p>All the buffer manipulation handling is done |
| 3725 | usingthe<code>xmlBuffer</code>type define in <code><a |
| 3726 | href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a></code>which |
| 3727 | isaresizable memory buffer. The buffer allocation strategy can be selected |
| 3728 | tobeeither best-fit or use an exponential doubling one (CPU vs. |
| 3729 | memoryusetrade-off). The values |
| 3730 | are<code>XML_BUFFER_ALLOC_EXACT</code>and<code>XML_BUFFER_ALLOC_DOUBLEIT</code>,and |
| 3731 | can be set individually or on asystem wide basis |
| 3732 | using<code>xmlBufferSetAllocationScheme()</code>. A numberof functions allows |
| 3733 | tomanipulate buffers with names starting |
| 3734 | withthe<code>xmlBuffer...</code>prefix.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3735 | |
| 3736 | <h3><a name="Input">Input I/O handlers</a></h3> |
| 3737 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3738 | <p>An Input I/O handler is a |
| 3739 | simplestructure<code>xmlParserInputBuffer</code>containing a context |
| 3740 | associated totheresource (file descriptor, or pointer to a protocol handler), |
| 3741 | the read()andclose() callbacks to use and an xmlBuffer. And extra xmlBuffer |
| 3742 | and acharsetencoding handler are also present to support charset |
| 3743 | conversionwhenneeded.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3744 | |
| 3745 | <h3><a name="Output">Output I/O handlers</a></h3> |
| 3746 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3747 | <p>An Output handler <code>xmlOutputBuffer</code>is completely similar |
| 3748 | toanInput one except the callbacks are write() and close().</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3749 | |
| 3750 | <h3><a name="entities">The entities loader</a></h3> |
| 3751 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3752 | <p>The entity loader resolves requests for new entities and create |
| 3753 | inputsforthe parser. Creating an input from a filename or an URI string |
| 3754 | isdonethrough the xmlNewInputFromFile() routine. The default entity loader |
| 3755 | donothandle the PUBLIC identifier associated with an entity (if any). So |
| 3756 | itjustcalls xmlNewInputFromFile() with the SYSTEM identifier (which |
| 3757 | ismandatory inXML).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3758 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3759 | <p>If you want to hook up a catalog mechanism then you simply need |
| 3760 | tooverridethe default entity loader, here is an example:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3761 | <pre>#include <libxml/xmlIO.h> |
| 3762 | |
| 3763 | xmlExternalEntityLoader defaultLoader = NULL; |
| 3764 | |
| 3765 | xmlParserInputPtr |
| 3766 | xmlMyExternalEntityLoader(const char *URL, const char *ID, |
| 3767 | xmlParserCtxtPtr ctxt) { |
| 3768 | xmlParserInputPtr ret; |
| 3769 | const char *fileID = NULL; |
| 3770 | /* lookup for the fileID depending on ID */ |
| 3771 | |
| 3772 | ret = xmlNewInputFromFile(ctxt, fileID); |
| 3773 | if (ret != NULL) |
| 3774 | return(ret); |
| 3775 | if (defaultLoader != NULL) |
| 3776 | ret = defaultLoader(URL, ID, ctxt); |
| 3777 | return(ret); |
| 3778 | } |
| 3779 | |
| 3780 | int main(..) { |
| 3781 | ... |
| 3782 | |
| 3783 | /* |
| 3784 | * Install our own entity loader |
| 3785 | */ |
| 3786 | defaultLoader = xmlGetExternalEntityLoader(); |
| 3787 | xmlSetExternalEntityLoader(xmlMyExternalEntityLoader); |
| 3788 | |
| 3789 | ... |
| 3790 | }</pre> |
| 3791 | |
| 3792 | <h3><a name="Example2">Example of customized I/O</a></h3> |
| 3793 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3794 | <p>This example come from <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3795 | href="http://xmlsoft.org/messages/0708.html">areal use case</a>,xmlDocDump() |
| 3796 | closes the FILE * passed by the applicationand this was aproblem. The <a |
| 3797 | href="http://xmlsoft.org/messages/0711.html">solution</a>wasto redefine anew |
| 3798 | output handler with the closing call deactivated:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3799 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3800 | <li>First define a new I/O output allocator where the output don't |
| 3801 | closethefile: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3802 | <pre>xmlOutputBufferPtr |
| 3803 | xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) { |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3804 | Â Â Â Â xmlOutputBufferPtr ret; |
| 3805 | Â Â Â Â |
| 3806 | Â Â Â Â if (xmlOutputCallbackInitialized == 0) |
| 3807 | Â Â Â Â Â Â Â Â xmlRegisterDefaultOutputCallbacks(); |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3808 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3809 | Â Â Â Â if (file == NULL) return(NULL); |
| 3810 | Â Â Â Â ret = xmlAllocOutputBuffer(encoder); |
| 3811 | Â Â Â Â if (ret != NULL) { |
| 3812 | Â Â Â Â Â Â Â Â ret->context = file; |
| 3813 | Â Â Â Â Â Â Â Â ret->writecallback = xmlFileWrite; |
| 3814 | Â Â Â Â Â Â Â Â ret->closecallback = NULL; /* No close callback */ |
| 3815 | Â Â Â Â } |
| 3816 | Â Â Â Â return(ret); |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3817 | } </pre> |
| 3818 | </li> |
| 3819 | <li>And then use it to save the document: |
| 3820 | <pre>FILE *f; |
| 3821 | xmlOutputBufferPtr output; |
| 3822 | xmlDocPtr doc; |
| 3823 | int res; |
| 3824 | |
| 3825 | f = ... |
| 3826 | doc = .... |
| 3827 | |
| 3828 | output = xmlOutputBufferCreateOwn(f, NULL); |
| 3829 | res = xmlSaveFileTo(output, doc, NULL); |
| 3830 | </pre> |
| 3831 | </li> |
| 3832 | </ol> |
| 3833 | |
| 3834 | <h2><a name="Catalog">Catalog support</a></h2> |
| 3835 | |
| 3836 | <p>Table of Content:</p> |
| 3837 | <ol> |
| 3838 | <li><a href="General2">General overview</a></li> |
| 3839 | <li><a href="#definition">The definition</a></li> |
| 3840 | <li><a href="#Simple">Using catalogs</a></li> |
| 3841 | <li><a href="#Some">Some examples</a></li> |
| 3842 | <li><a href="#reference">How to tune catalog usage</a></li> |
| 3843 | <li><a href="#validate">How to debug catalog processing</a></li> |
| 3844 | <li><a href="#Declaring">How to create and maintain catalogs</a></li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3845 | <li><a href="#implemento">The implementor corner quick review |
| 3846 | oftheAPI</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3847 | <li><a href="#Other">Other resources</a></li> |
| 3848 | </ol> |
| 3849 | |
| 3850 | <h3><a name="General2">General overview</a></h3> |
| 3851 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3852 | <p>What is a catalog? Basically it's a lookup mechanism used when an |
| 3853 | entity(afile or a remote resource) references another entity. The catalog |
| 3854 | lookupisinserted between the moment the reference is recognized by the |
| 3855 | software(XMLparser, stylesheet processing, or even images referenced for |
| 3856 | inclusionin arendering) and the time where loading that resource is |
| 3857 | actuallystarted.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3858 | |
| 3859 | <p>It is basically used for 3 things:</p> |
| 3860 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3861 | <li>mapping from "logical" names, the public identifiers and a |
| 3862 | moreconcretename usable for download (and URI). For example it can |
| 3863 | associatethelogical name |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3864 | <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3865 | <p>of the DocBook 4.1.2 XML DTD with the actual URL where it |
| 3866 | canbedownloaded</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3867 | <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p> |
| 3868 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3869 | <li>remapping from a given URL to another one, like an |
| 3870 | HTTPindirectionsaying that |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3871 | <p>"http://www.oasis-open.org/committes/tr.xsl"</p> |
| 3872 | <p>should really be looked at</p> |
| 3873 | <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p> |
| 3874 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3875 | <li>providing a local cache mechanism allowing to load |
| 3876 | theentitiesassociated to public identifiers or remote resources, this is |
| 3877 | areallyimportant feature for any significant deployment of XML or |
| 3878 | SGMLsince itallows to avoid the aleas and delays associated to |
| 3879 | fetchingremoteresources.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3880 | </ul> |
| 3881 | |
| 3882 | <h3><a name="definition">The definitions</a></h3> |
| 3883 | |
| 3884 | <p>Libxml, as of 2.4.3 implements 2 kind of catalogs:</p> |
| 3885 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3886 | <li>the older SGML catalogs, the official spec is SGML |
| 3887 | OpenTechnicalResolution TR9401:1997, but is better understood by reading |
| 3888 | <a href="http://www.jclark.com/sp/catalog.htm">the SP |
| 3889 | Catalogpage</a>fromJames Clark. This is relatively old and not the |
| 3890 | preferredmode ofoperation of libxml.</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 3891 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3892 | href="http://www.oasis-open.org/committees/entity/spec.html">XMLCatalogs</a>isfar |
| 3893 | more flexible, more recent, uses an XML syntax andshould scale |
| 3894 | quitebetter. This is the default option of libxml.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3895 | </ul> |
| 3896 | |
| 3897 | <p></p> |
| 3898 | |
| 3899 | <h3><a name="Simple">Using catalog</a></h3> |
| 3900 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3901 | <p>In a normal environment libxml2 will by default check the presence |
| 3902 | ofacatalog in /etc/xml/catalog, and assuming it has been |
| 3903 | correctlypopulated,the processing is completely transparent to the document |
| 3904 | user. Totake aconcrete example, suppose you are authoring a DocBook document, |
| 3905 | thisonestarts with the following DOCTYPE definition:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3906 | <pre><?xml version='1.0'?> |
| 3907 | <!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN" |
| 3908 | "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"></pre> |
| 3909 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3910 | <p>When validating the document with libxml, the catalog will |
| 3911 | beautomaticallyconsulted to lookup the public identifier "-//Norman |
| 3912 | Walsh//DTDDocBk XMLV3.1.4//EN" and the |
| 3913 | systemidentifier"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if |
| 3914 | theseentities havebeen installed on your system and the catalogs actually |
| 3915 | point tothem, libxmlwill fetch them from the local disk.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3916 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3917 | <p style="font-size: 10pt"><strong>Note</strong>: Really don't usethisDOCTYPE |
| 3918 | example it's a really old version, but is fine as an example.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3919 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3920 | <p>Libxml2 will check the catalog each time that it is requested to |
| 3921 | loadanentity, this includes DTD, external parsed entities, stylesheets, etc |
| 3922 | ...Ifyour system is correctly configured all the authoring phase |
| 3923 | andprocessingshould use only local files, even if your document stays |
| 3924 | portablebecause ituses the canonical public and system ID, referencing the |
| 3925 | remotedocument.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3926 | |
| 3927 | <h3><a name="Some">Some examples:</a></h3> |
| 3928 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3929 | <p>Here is a couple of fragments from XML Catalogs used in |
| 3930 | libxml2earlyregression tests in <code>test/catalogs</code>:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3931 | <pre><?xml version="1.0"?> |
| 3932 | <!DOCTYPE catalog PUBLIC |
| 3933 | "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" |
| 3934 | "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> |
| 3935 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> |
| 3936 | <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 3937 | uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> |
| 3938 | ...</pre> |
| 3939 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3940 | <p>This is the beginning of a catalog for DocBook 4.1.2, XML |
| 3941 | Catalogsarewritten in XML, there is a specific namespace for |
| 3942 | catalogelements"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry |
| 3943 | inthiscatalog is a <code>public</code>mapping it allows to associate |
| 3944 | aPublicIdentifier with an URI.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3945 | <pre>... |
| 3946 | <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" |
| 3947 | rewritePrefix="file:///usr/share/xml/docbook/"/> |
| 3948 | ...</pre> |
| 3949 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3950 | <p>A <code>rewriteSystem</code>is a very powerful instruction, it saysthatany |
| 3951 | URI starting with a given prefix should be looked at anotherURIconstructed by |
| 3952 | replacing the prefix with an new one. In effect this actslikea cache system |
| 3953 | for a full area of the Web. In practice it is extremelyusefulwith a file |
| 3954 | prefix if you have installed a copy of those resources onyourlocal system.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3955 | <pre>... |
| 3956 | <delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //" |
| 3957 | catalog="file:///usr/share/xml/docbook.xml"/> |
| 3958 | <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" |
| 3959 | catalog="file:///usr/share/xml/docbook.xml"/> |
| 3960 | <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" |
| 3961 | catalog="file:///usr/share/xml/docbook.xml"/> |
| 3962 | <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" |
| 3963 | catalog="file:///usr/share/xml/docbook.xml"/> |
| 3964 | <delegateURI uriStartString="http://www.oasis-open.org/docbook/" |
| 3965 | catalog="file:///usr/share/xml/docbook.xml"/> |
| 3966 | ...</pre> |
| 3967 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3968 | <p>Delegation is the core features which allows to build a tree |
| 3969 | ofcatalogs,easier to maintain than a single catalog, based on |
| 3970 | PublicIdentifier, SystemIdentifier or URI prefixes it instructs the |
| 3971 | catalogsoftware to look upentries in another resource. This feature allow to |
| 3972 | buildhierarchies ofcatalogs, the set of entries presented should be |
| 3973 | sufficient toredirect theresolution of all DocBook references to the specific |
| 3974 | catalogin<code>/usr/share/xml/docbook.xml</code>this one in turn could |
| 3975 | delegateallreferences for DocBook 4.2.1 to a specific catalog installed at |
| 3976 | the sametimeas the DocBook resources on the local machine.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3977 | |
| 3978 | <h3><a name="reference">How to tune catalog usage:</a></h3> |
| 3979 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3980 | <p>The user can change the default catalog behaviour by redirecting |
| 3981 | queriestoits own set of catalogs, this can be done by |
| 3982 | settingthe<code>XML_CATALOG_FILES</code>environment variable to a list of |
| 3983 | catalogs,anempty one should deactivate loading the |
| 3984 | default<code>/etc/xml/catalog</code>default catalog</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3985 | |
| 3986 | <h3><a name="validate">How to debug catalog processing:</a></h3> |
| 3987 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 3988 | <p>Setting up the <code>XML_DEBUG_CATALOG</code>environment variable |
| 3989 | willmakelibxml2 output debugging informations for each catalog |
| 3990 | operations,forexample:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 3991 | <pre>orchis:~/XML -> xmllint --memory --noout test/ent2 |
| 3992 | warning: failed to load external entity "title.xml" |
| 3993 | orchis:~/XML -> export XML_DEBUG_CATALOG= |
| 3994 | orchis:~/XML -> xmllint --memory --noout test/ent2 |
| 3995 | Failed to parse catalog /etc/xml/catalog |
| 3996 | Failed to parse catalog /etc/xml/catalog |
| 3997 | warning: failed to load external entity "title.xml" |
| 3998 | Catalogs cleanup |
| 3999 | orchis:~/XML -> </pre> |
| 4000 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4001 | <p>The test/ent2 references an entity, running the parser from memorymakesthe |
| 4002 | base URI unavailable and the the "title.xml" entity cannot beloaded.Setting |
| 4003 | up the debug environment variable allows to detect that anattempt ismade to |
| 4004 | load the <code>/etc/xml/catalog</code>but since it's notpresent theresolution |
| 4005 | fails.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4006 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4007 | <p>But the most advanced way to debug XML catalog processing is to |
| 4008 | usethe<strong>xmlcatalog</strong>command shipped with libxml2, it allows |
| 4009 | toloadcatalogs and make resolution queries to see what is going on. This |
| 4010 | isalsoused for the regression tests:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4011 | <pre>orchis:~/XML -> ./xmlcatalog test/catalogs/docbook.xml \ |
| 4012 | "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 4013 | http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd |
| 4014 | orchis:~/XML -> </pre> |
| 4015 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4016 | <p>For debugging what is going on, adding one -v flags increase |
| 4017 | theverbositylevel to indicate the processing done (adding a second flag |
| 4018 | alsoindicatewhat elements are recognized at parsing):</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4019 | <pre>orchis:~/XML -> ./xmlcatalog -v test/catalogs/docbook.xml \ |
| 4020 | "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 4021 | Parsing catalog test/catalogs/docbook.xml's content |
| 4022 | Found public match -//OASIS//DTD DocBook XML V4.1.2//EN |
| 4023 | http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd |
| 4024 | Catalogs cleanup |
| 4025 | orchis:~/XML -> </pre> |
| 4026 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4027 | <p>A shell interface is also available to debug and process |
| 4028 | multiplequeries(and for regression tests):</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4029 | <pre>orchis:~/XML -> ./xmlcatalog -shell test/catalogs/docbook.xml \ |
| 4030 | "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 4031 | > help |
| 4032 | Commands available: |
| 4033 | public PublicID: make a PUBLIC identifier lookup |
| 4034 | system SystemID: make a SYSTEM identifier lookup |
| 4035 | resolve PublicID SystemID: do a full resolver lookup |
| 4036 | add 'type' 'orig' 'replace' : add an entry |
| 4037 | del 'values' : remove values |
| 4038 | dump: print the current catalog state |
| 4039 | debug: increase the verbosity level |
| 4040 | quiet: decrease the verbosity level |
| 4041 | exit: quit the shell |
| 4042 | > public "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 4043 | http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd |
| 4044 | > quit |
| 4045 | orchis:~/XML -> </pre> |
| 4046 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4047 | <p>This should be sufficient for most debugging purpose, this wasactuallyused |
| 4048 | heavily to debug the XML Catalog implementation itself.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4049 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4050 | <h3><a name="Declaring">How to create and maintain</a>catalogs:</h3> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4051 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4052 | <p>Basically XML Catalogs are XML files, you can either use XML toolstomanage |
| 4053 | them or use <strong>xmlcatalog</strong>for this. The basic stepisto create a |
| 4054 | catalog the -create option provide this facility:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4055 | <pre>orchis:~/XML -> ./xmlcatalog --create tst.xml |
| 4056 | <?xml version="1.0"?> |
| 4057 | <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" |
| 4058 | "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> |
| 4059 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> |
| 4060 | orchis:~/XML -> </pre> |
| 4061 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4062 | <p>By default xmlcatalog does not overwrite the original catalog and |
| 4063 | savetheresult on the standard output, this can be overridden using |
| 4064 | the-nooutoption. The <code>-add</code>command allows to add entries |
| 4065 | inthecatalog:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4066 | <pre>orchis:~/XML -> ./xmlcatalog --noout --create --add "public" \ |
| 4067 | "-//OASIS//DTD DocBook XML V4.1.2//EN" \ |
| 4068 | http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml |
| 4069 | orchis:~/XML -> cat tst.xml |
| 4070 | <?xml version="1.0"?> |
| 4071 | <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \ |
| 4072 | "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> |
| 4073 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> |
| 4074 | <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 4075 | uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> |
| 4076 | </catalog> |
| 4077 | orchis:~/XML -> </pre> |
| 4078 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4079 | <p>The <code>-add</code>option will always take 3 parameters even if |
| 4080 | someofthe XML Catalog constructs (like nextCatalog) will have only |
| 4081 | asingleargument, just pass a third empty string, it will be ignored.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4082 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4083 | <p>Similarly the <code>-del</code>option remove matching entries |
| 4084 | fromthecatalog:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4085 | <pre>orchis:~/XML -> ./xmlcatalog --del \ |
| 4086 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml |
| 4087 | <?xml version="1.0"?> |
| 4088 | <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" |
| 4089 | "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> |
| 4090 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> |
| 4091 | orchis:~/XML -> </pre> |
| 4092 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4093 | <p>The catalog is now empty. Note that the matching |
| 4094 | of<code>-del</code>isexact and would have worked in a similar fashion with |
| 4095 | thePublic IDstring.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4096 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4097 | <p>This is rudimentary but should be sufficient to manage a not |
| 4098 | toocomplexcatalog tree of resources.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4099 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4100 | <h3><a name="implemento">The implementor corner quick review |
| 4101 | oftheAPI:</a></h3> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4102 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4103 | <p>First, and like for every other module of libxml, there is |
| 4104 | anautomaticallygenerated <a href="html/libxml-catalog.html">API page |
| 4105 | forcatalogsupport</a>.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4106 | |
| 4107 | <p>The header for the catalog interfaces should be included as:</p> |
| 4108 | <pre>#include <libxml/catalog.h></pre> |
| 4109 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4110 | <p>The API is voluntarily kept very simple. First it is not |
| 4111 | obviousthatapplications really need access to it since it is the default |
| 4112 | behaviouroflibxml2 (Note: it is possible to completely override libxml2 |
| 4113 | defaultcatalogby using <a |
| 4114 | href="html/libxml-parser.html">xmlSetExternalEntityLoader</a>toplug |
| 4115 | anapplication specific resolver).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4116 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 4117 | <p>Basically libxml2 support 2 catalog lists:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4118 | <ul> |
| 4119 | <li>the default one, global shared by all the application</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4120 | <li>a per-document catalog, this one is built if the document |
| 4121 | usesthe<code>oasis-xml-catalog</code>PIs to specify its own catalog list, |
| 4122 | itisassociated to the parser context and destroyed when the |
| 4123 | parsingcontextis destroyed.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4124 | </ul> |
| 4125 | |
| 4126 | <p>the document one will be used first if it exists.</p> |
| 4127 | |
| 4128 | <h4>Initialization routines:</h4> |
| 4129 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4130 | <p>xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() |
| 4131 | shouldbeused at startup to initialize the catalog, if the catalog |
| 4132 | shouldbeinitialized with specific values xmlLoadCatalog() |
| 4133 | orxmlLoadCatalogs()should be called before xmlInitializeCatalog() which |
| 4134 | wouldotherwise do adefault initialization first.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4135 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4136 | <p>The xmlCatalogAddLocal() call is used by the parser to grow thedocumentown |
| 4137 | catalog list if needed.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4138 | |
| 4139 | <h4>Preferences setup:</h4> |
| 4140 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4141 | <p>The XML Catalog spec requires the possibility to select |
| 4142 | defaultpreferencesbetween public and system |
| 4143 | delegation,xmlCatalogSetDefaultPrefer() allowsthis, xmlCatalogSetDefaults() |
| 4144 | andxmlCatalogGetDefaults() allow to control ifXML Catalogs resolution |
| 4145 | shouldbe forbidden, allowed for global catalog, fordocument catalog or both, |
| 4146 | thedefault is to allow both.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4147 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4148 | <p>And of course xmlCatalogSetDebug() allows to generate |
| 4149 | debugmessages(through the xmlGenericError() mechanism).</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4150 | |
| 4151 | <h4>Querying routines:</h4> |
| 4152 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4153 | <p>xmlCatalogResolve(), |
| 4154 | xmlCatalogResolveSystem(),xmlCatalogResolvePublic()and xmlCatalogResolveURI() |
| 4155 | are relatively explicitif you read the XMLCatalog specification they |
| 4156 | correspond to section 7algorithms, they shouldalso work if you have loaded an |
| 4157 | SGML catalog with asimplified semantic.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4158 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4159 | <p>xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the |
| 4160 | samebutoperate on the document catalog list</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4161 | |
| 4162 | <h4>Cleanup and Miscellaneous:</h4> |
| 4163 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4164 | <p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal()isthe |
| 4165 | per-document equivalent.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4166 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4167 | <p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically |
| 4168 | modifythefirst catalog in the global list, and xmlCatalogDump() allows to |
| 4169 | dumpacatalog state, those routines are primarily designed for xmlcatalog, |
| 4170 | I'mnotsure that exposing more complex interfaces (like navigation ones) |
| 4171 | wouldbereally useful.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4172 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4173 | <p>The xmlParseCatalogFile() is a function used to load XML Catalogfiles,it's |
| 4174 | similar as xmlParseFile() except it bypass all catalog lookups,it'sprovided |
| 4175 | because this functionality may be useful for client tools.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4176 | |
| 4177 | <h4>threaded environments:</h4> |
| 4178 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4179 | <p>Since the catalog tree is built progressively, some care has been |
| 4180 | takentotry to avoid troubles in multithreaded environments. The code is |
| 4181 | nowthreadsafe assuming that the libxml2 library has been compiled |
| 4182 | withthreadssupport.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4183 | |
| 4184 | <p></p> |
| 4185 | |
| 4186 | <h3><a name="Other">Other resources</a></h3> |
| 4187 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4188 | <p>The XML Catalog specification is relatively recent so there |
| 4189 | isn'tmuchliterature to point at:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4190 | <ul> |
Daniel Veillard | 63d8314 | 2002-05-20 06:51:05 +0000 | [diff] [blame] | 4191 | <li>You can find a good rant from Norm Walsh about <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4192 | href="http://www.arbortext.com/Think_Tank/XML_Resources/Issue_Three/issue_three.html">theneedfor |
| 4193 | catalogs</a>, it provides a lot of context informations even ifIdon't |
| 4194 | agree with everything presented. Norm also wrote a morerecentarticle <a |
| 4195 | href="http://wwws.sun.com/software/xml/developers/resolver/article/">XMLentitiesand |
| 4196 | URI resolvers</a>describing them.</li> |
| 4197 | <li>An <a |
| 4198 | href="http://home.ccil.org/~cowan/XML/XCatalog.html">oldXMLcatalog |
| 4199 | proposal</a>from John Cowan</li> |
| 4200 | <li>The <a href="http://www.rddl.org/">Resource |
| 4201 | DirectoryDescriptionLanguage</a>(RDDL) another catalog system but more |
| 4202 | orientedtowardproviding metadata for XML namespaces.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4203 | <li>the page from the OASIS Technical <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4204 | href="http://www.oasis-open.org/committees/entity/">Committee |
| 4205 | onEntityResolution</a>who maintains XML Catalog, you will find pointers |
| 4206 | tothespecification update, some background and pointers to |
| 4207 | otherstoolsproviding XML Catalog support</li> |
| 4208 | <li>There is a <a href="buildDocBookCatalog">shell script</a>to |
| 4209 | generateXMLCatalogs for DocBook 4.1.2 . If it can write to the |
| 4210 | /etc/xml/directory,it will set-up /etc/xml/catalog and /etc/xml/docbook |
| 4211 | based ontheresources found on the system. Otherwise it will just |
| 4212 | create~/xmlcatalogand ~/dbkxmlcatalog and doing: |
Daniel Veillard | 8594de9 | 2003-04-25 10:08:44 +0000 | [diff] [blame] | 4213 | <p><code>export XML_CATALOG_FILES=$HOME/xmlcatalog</code></p> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4214 | <p>should allow to process DocBook documentations withoutrequiringnetwork |
| 4215 | accesses for the DTD or stylesheets</p> |
Daniel Veillard | 35e937a | 2002-01-19 22:21:54 +0000 | [diff] [blame] | 4216 | </li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4217 | <li>I have uploaded <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4218 | href="ftp://xmlsoft.org/libxml2/test/dbk412catalog.tar.gz">asmalltarball</a>containing |
| 4219 | XML Catalogs for DocBook 4.1.2 which seemsto workfine for me too</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4220 | <li>The <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4221 | href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalogmanualpage</a></li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4222 | </ul> |
| 4223 | |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4224 | <p>If you have suggestions for corrections or additions, simply contactme:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4225 | |
| 4226 | <h2><a name="library">The parser interfaces</a></h2> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4227 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4228 | <p>This section is directly intended to help programmers |
| 4229 | gettingbootstrappedusing the XML tollkit from the C language. It is not |
| 4230 | intended tobeextensive. I hope the automatically generated documents will |
| 4231 | providethecompleteness required, but as a separate set of documents. The |
| 4232 | interfacesofthe XML parser are by principle low level, Those interested in a |
| 4233 | higherlevelAPI should <a href="#DOM">look at DOM</a>.</p> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 4234 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4235 | <p>The <a href="html/libxml-parser.html">parser interfaces |
| 4236 | forXML</a>areseparated from the <a |
| 4237 | href="html/libxml-htmlparser.html">HTMLparserinterfaces</a>. Let's have a |
| 4238 | look at how the XML parser can becalled:</p> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4239 | |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4240 | <h3><a name="Invoking">Invoking the parser : the pull method</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4241 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4242 | <p>Usually, the first thing to do is to read an XML input. The |
| 4243 | parseracceptsdocuments either from in-memory strings or from files. The |
| 4244 | functionsaredefined in "parser.h":</p> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4245 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4246 | <dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4247 | <dd><p>Parse a null-terminated string containing the document.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4248 | </dd> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4249 | </dl> |
| 4250 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4251 | <dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4252 | <dd><p>Parse an XML document contained in a (possibly compressed)file.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4253 | </dd> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4254 | </dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4255 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4256 | <p>The parser returns a pointer to the document structure (or NULL in |
| 4257 | caseoffailure).</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4258 | |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4259 | <h3 id="Invoking1">Invoking the parser: the push method</h3> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4260 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4261 | <p>In order for the application to keep the control when the document |
| 4262 | isbeingfetched (which is common for GUI based programs) libxml2 provides |
| 4263 | apushinterface, too, as of version 1.8.3. Here are the interfacefunctions:</p> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4264 | <pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, |
| 4265 | void *user_data, |
| 4266 | const char *chunk, |
| 4267 | int size, |
| 4268 | const char *filename); |
| 4269 | int xmlParseChunk (xmlParserCtxtPtr ctxt, |
| 4270 | const char *chunk, |
| 4271 | int size, |
| 4272 | int terminate);</pre> |
| 4273 | |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4274 | <p>and here is a simple example showing how to use the interface:</p> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4275 | <pre> FILE *f; |
| 4276 | |
| 4277 | f = fopen(filename, "r"); |
| 4278 | if (f != NULL) { |
| 4279 | int res, size = 1024; |
| 4280 | char chars[1024]; |
| 4281 | xmlParserCtxtPtr ctxt; |
| 4282 | |
| 4283 | res = fread(chars, 1, 4, f); |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4284 | if (res > 0) { |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4285 | ctxt = xmlCreatePushParserCtxt(NULL, NULL, |
| 4286 | chars, res, filename); |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4287 | while ((res = fread(chars, 1, size, f)) > 0) { |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4288 | xmlParseChunk(ctxt, chars, res, 0); |
| 4289 | } |
| 4290 | xmlParseChunk(ctxt, chars, 0, 1); |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4291 | doc = ctxt->myDoc; |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4292 | xmlFreeParserCtxt(ctxt); |
| 4293 | } |
| 4294 | }</pre> |
| 4295 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4296 | <p>The HTML parser embedded into libxml2 also has a push |
| 4297 | interface;thefunctions are just prefixed by "html" rather than "xml".</p> |
Daniel Veillard | 0142b84 | 2000-01-14 14:45:24 +0000 | [diff] [blame] | 4298 | |
| 4299 | <h3 id="Invoking2">Invoking the parser: the SAX interface</h3> |
| 4300 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4301 | <p>The tree-building interface makes the parser memory-hungry, |
| 4302 | firstloadingthe document in memory and then building the tree itself. Reading |
| 4303 | adocumentwithout building the tree is possible using the SAX interfaces |
| 4304 | (seeSAX.h and<a |
| 4305 | href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">JamesHenstridge'sdocumentation</a>). |
| 4306 | Note also that the push interface can belimited to SAX:just use the two first |
| 4307 | arguments of<code>xmlCreatePushParserCtxt()</code>.</p> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 4308 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4309 | <h3><a name="Building">Building a tree from scratch</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4310 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4311 | <p>The other way to get an XML tree in memory is by building |
| 4312 | it.Basicallythere is a set of functions dedicated to building new |
| 4313 | elements.(These arealso described in <libxml/tree.h>.) For example, |
| 4314 | here is apiece ofcode that produces the XML document used in the previous |
| 4315 | examples:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4316 | <pre> #include <libxml/tree.h> |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 4317 | xmlDocPtr doc; |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4318 | xmlNodePtr tree, subtree; |
| 4319 | |
| 4320 | doc = xmlNewDoc("1.0"); |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4321 | doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL); |
| 4322 | xmlSetProp(doc->children, "prop1", "gnome is great"); |
| 4323 | xmlSetProp(doc->children, "prop2", "& linux too"); |
| 4324 | tree = xmlNewChild(doc->children, NULL, "head", NULL); |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4325 | subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome"); |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4326 | tree = xmlNewChild(doc->children, NULL, "chapter", NULL); |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4327 | subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure"); |
| 4328 | subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ..."); |
| 4329 | subtree = xmlNewChild(tree, NULL, "image", NULL); |
| 4330 | xmlSetProp(subtree, "href", "linus.gif");</pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4331 | |
| 4332 | <p>Not really rocket science ...</p> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4333 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4334 | <h3><a name="Traversing">Traversing the tree</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4335 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4336 | <p>Basically by <a href="html/libxml-tree.html">including"tree.h"</a>yourcode |
| 4337 | has access to the internal structure of all the elementsof the tree.The names |
| 4338 | should be somewhat simple |
| 4339 | like<strong>parent</strong>,<strong>children</strong>, |
| 4340 | <strong>next</strong>,<strong>prev</strong>,<strong>properties</strong>, |
| 4341 | etc... For example, stillwith the previousexample:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4342 | <pre><code>doc->children->children->children</code></pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4343 | |
| 4344 | <p>points to the title element,</p> |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 4345 | <pre>doc->children->children->next->children->children</pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4346 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4347 | <p>points to the text node containing the chapter title |
| 4348 | "TheLinuxadventure".</p> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4349 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4350 | <p><strong>NOTE</strong>: XML allows <em>PI</em>s and |
| 4351 | <em>comments</em>tobepresent before the document root, so |
| 4352 | <code>doc->children</code>maypointto an element which is not the document |
| 4353 | Root Element; afunction<code>xmlDocGetRootElement()</code>was added for this |
| 4354 | purpose.</p> |
Daniel Veillard | b24054a | 1999-12-18 15:32:46 +0000 | [diff] [blame] | 4355 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4356 | <h3><a name="Modifying">Modifying the tree</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4357 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4358 | <p>Functions are provided for reading and writing the document content.Hereis |
| 4359 | an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4360 | <dl> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4361 | <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar |
| 4362 | *name,constxmlChar *value);</code></dt> |
| 4363 | <dd><p>This sets (or changes) an attribute carried by an ELEMENT |
| 4364 | node.Thevalue can be NULL.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4365 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4366 | </dl> |
| 4367 | <dl> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4368 | <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, |
| 4369 | constxmlChar*name);</code></dt> |
| 4370 | <dd><p>This function returns a pointer to new copy of thepropertycontent. |
| 4371 | Note that the user must deallocate the result.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4372 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4373 | </dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4374 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4375 | <p>Two functions are provided for reading and writing the text |
| 4376 | associatedwithelements:</p> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4377 | <dl> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4378 | <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, |
| 4379 | constxmlChar*value);</code></dt> |
| 4380 | <dd><p>This function takes an "external" string and converts it toonetext |
| 4381 | node or possibly to a list of entity and text nodes.Allnon-predefined |
| 4382 | entity references like &Gnome; will bestoredinternally as entity |
| 4383 | nodes, hence the result of the function maynot bea single node.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4384 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4385 | </dl> |
| 4386 | <dl> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4387 | <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr |
| 4388 | list,intinLine);</code></dt> |
| 4389 | <dd><p>This function is the inverseof<code>xmlStringGetNodeList()</code>. |
| 4390 | It generates a newstringcontaining the content of the text and entity |
| 4391 | nodes. Note theextraargument inLine. If this argument is set to 1, the |
| 4392 | function willexpandentity references. For example, instead of |
| 4393 | returning the&Gnome;XML encoding in the string, it will substitute |
| 4394 | it with itsvalue (say,"GNU Network Object Model Environment").</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4395 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4396 | </dl> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4397 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4398 | <h3><a name="Saving">Saving a tree</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4399 | |
| 4400 | <p>Basically 3 options are possible:</p> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4401 | <dl> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4402 | <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, |
| 4403 | xmlChar**mem,int*size);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4404 | <dd><p>Returns a buffer into which the document has been saved.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4405 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4406 | </dl> |
| 4407 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4408 | <dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4409 | <dd><p>Dumps a document to an open file descriptor.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4410 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4411 | </dl> |
| 4412 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4413 | <dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4414 | <dd><p>Saves the document to a file. In this case, |
| 4415 | thecompressioninterface is triggered if it has been turned on.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4416 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4417 | </dl> |
Daniel Veillard | 10c6a8f | 1998-10-28 01:00:12 +0000 | [diff] [blame] | 4418 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4419 | <h3><a name="Compressio">Compression</a></h3> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4420 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4421 | <p>The library transparently handles compression when |
| 4422 | doingfile-basedaccesses. The level of compression on saves can be turned on |
| 4423 | eithergloballyor individually for one file:</p> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4424 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4425 | <dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4426 | <dd><p>Gets the document compression ratio (0-9).</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4427 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4428 | </dl> |
| 4429 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4430 | <dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4431 | <dd><p>Sets the document compression ratio.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4432 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4433 | </dl> |
| 4434 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4435 | <dt><code>int xmlGetCompressMode(void);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4436 | <dd><p>Gets the default compression ratio.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4437 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4438 | </dl> |
| 4439 | <dl> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4440 | <dt><code>void xmlSetCompressMode(int mode);</code></dt> |
Daniel Veillard | 88f00ae | 2000-03-02 00:15:55 +0000 | [diff] [blame] | 4441 | <dd><p>Sets the default compression ratio.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4442 | </dd> |
Daniel Veillard | 25940b7 | 1998-10-29 05:51:30 +0000 | [diff] [blame] | 4443 | </dl> |
| 4444 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4445 | <h2><a name="Entities">Entities or no entities</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4446 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4447 | <p>Entities in principle are similar to simple C macros. An entity |
| 4448 | definesanabbreviation for a given string that you can reuse many times |
| 4449 | throughoutthecontent of your document. Entities are especially useful when a |
| 4450 | givenstringmay occur frequently within a document, or to confine the change |
| 4451 | neededto adocument to a restricted area in the internal subset of the |
| 4452 | document (atthebeginning). Example:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4453 | <pre>1 <?xml version="1.0"?> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4454 | 2 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [ |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4455 | 3 <!ENTITY xml "Extensible Markup Language"> |
| 4456 | 4 ]> |
| 4457 | 5 <EXAMPLE> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4458 | 6 &xml; |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4459 | 7 </EXAMPLE></pre> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4460 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4461 | <p>Line 3 declares the xml entity. Line 6 uses the xml entity, byprefixingits |
| 4462 | name with '&' and following it by ';' without any spacesadded. Thereare 5 |
| 4463 | predefined entities in libxml2 allowing you to escapecharacters |
| 4464 | withpredefined meaning in some parts of the xml |
| 4465 | documentcontent:<strong>&lt;</strong>for the character |
| 4466 | '<',<strong>&gt;</strong>for the character |
| 4467 | '>',<strong>&apos;</strong>for the |
| 4468 | character''',<strong>&quot;</strong>for the character |
| 4469 | '"',and<strong>&amp;</strong>for the character '&'.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4470 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4471 | <p>One of the problems related to entities is that you may want the |
| 4472 | parsertosubstitute an entity's content so that you can see the replacement |
| 4473 | textinyour application. Or you may prefer to keep entity references as such |
| 4474 | inthecontent to be able to save the document back without losing |
| 4475 | thisusuallyprecious information (if the user went through the pain |
| 4476 | ofexplicitlydefining entities, he may have a a rather negative attitude if |
| 4477 | youblindlysubstitute them as saving time). The <a |
| 4478 | href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault()</a>functionallows |
| 4479 | you to check and change the behaviour, which is to notsubstituteentities by |
| 4480 | default.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4481 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4482 | <p>Here is the DOM tree built by libxml2 for the previous document |
| 4483 | inthedefault case:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4484 | <pre>/gnome/src/gnome-xml -> ./xmllint --debug test/ent1 |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4485 | DOCUMENT |
| 4486 | version=1.0 |
| 4487 | ELEMENT EXAMPLE |
| 4488 | TEXT |
| 4489 | content= |
| 4490 | ENTITY_REF |
| 4491 | INTERNAL_GENERAL_ENTITY xml |
| 4492 | content=Extensible Markup Language |
| 4493 | TEXT |
| 4494 | content=</pre> |
| 4495 | |
| 4496 | <p>And here is the result when substituting entities:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4497 | <pre>/gnome/src/gnome-xml -> ./tester --debug --noent test/ent1 |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4498 | DOCUMENT |
| 4499 | version=1.0 |
| 4500 | ELEMENT EXAMPLE |
| 4501 | TEXT |
| 4502 | content= Extensible Markup Language</pre> |
| 4503 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4504 | <p>So, entities or no entities? Basically, it depends on your use |
| 4505 | case.Isuggest that you keep the non-substituting default behaviour and |
| 4506 | avoidusingentities in your XML document or data if you are not willing to |
| 4507 | handletheentity references elements in the DOM tree.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4508 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4509 | <p>Note that at save time libxml2 enforces the conversion of |
| 4510 | thepredefinedentities where necessary to prevent well-formedness problems, |
| 4511 | andwill alsotransparently replace those with chars (i.e. it will not |
| 4512 | generateentityreference elements in the DOM tree or call the reference() SAX |
| 4513 | callbackwhenfinding them in the input).</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4514 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4515 | <p><span style="background-color: #FF0000">WARNING</span>: handlingentitieson |
| 4516 | top of the libxml2 SAX interface is difficult!!! If you plan |
| 4517 | tousenon-predefined entities in your documents, then the learning curve |
| 4518 | tohandlethen using the SAX API may be long. If you plan to use |
| 4519 | complexdocuments, Istrongly suggest you consider using the DOM interface |
| 4520 | instead andlet libxmldeal with the complexity rather than trying to do it |
| 4521 | yourself.</p> |
Daniel Veillard | 7b9c4b7 | 2000-08-25 16:26:50 +0000 | [diff] [blame] | 4522 | |
Daniel Veillard | 2f4dfc4 | 1999-09-24 14:03:48 +0000 | [diff] [blame] | 4523 | <h2><a name="Namespaces">Namespaces</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4524 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 4525 | <p>The libxml2 library implements <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4526 | href="http://www.w3.org/TR/REC-xml-names/">XML |
| 4527 | namespaces</a>supportbyrecognizing namespace constructs in the input, and |
| 4528 | does namespacelookupautomatically when building the DOM tree. A namespace |
| 4529 | declarationisassociated with an in-memory structure and all elements or |
| 4530 | attributeswithinthat namespace point to it. Hence testing the namespace is a |
| 4531 | simple andfastequality operation at the user level.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4532 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4533 | <p>I suggest that people using libxml2 use a namespace, and declare it |
| 4534 | intheroot element of their document as the default namespace. Then they |
| 4535 | don'tneedto use the prefix in the content but we will have a basis for |
| 4536 | futuresemanticrefinement and merging of data from different sources. This |
| 4537 | doesn'tincreasethe size of the XML output significantly, but significantly |
| 4538 | increasesitsvalue in the long-term. Example:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4539 | <pre><mydoc xmlns="http://mydoc.example.org/schemas/"> |
| 4540 | <elem1>...</elem1> |
| 4541 | <elem2>...</elem2> |
| 4542 | </mydoc></pre> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4543 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4544 | <p>The namespace value has to be an absolute URL, but the URL doesn't |
| 4545 | havetopoint to any existing resource on the Web. It will bind all the |
| 4546 | elementandattributes with that URL. I suggest to use an URL within a |
| 4547 | domainyoucontrol, and that the URL should contain some kind of version |
| 4548 | informationifpossible. For example, |
| 4549 | <code>"http://www.gnome.org/gnumeric/1.0/"</code>isagood namespace scheme.</p> |
Daniel Veillard | ec30341 | 2000-03-24 13:41:54 +0000 | [diff] [blame] | 4550 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4551 | <p>Then when you load a file, make sure that a namespace |
| 4552 | carryingtheversion-independent prefix is installed on the root element of |
| 4553 | yourdocument,and if the version information don't match something you know, |
| 4554 | warnthe userand be liberal in what you accept as the input. Also do *not* try |
| 4555 | tobasenamespace checking on the prefix value. <foo:text> may be |
| 4556 | exactlythesame as <bar:text> in another document. What really matters |
| 4557 | is theURIassociated with the element or the attribute, not the prefix string |
| 4558 | (whichisjust a shortcut for the full URI). In libxml, element and attributes |
| 4559 | havean<code>ns</code>field pointing to an xmlNs structure detailing |
| 4560 | thenamespaceprefix and its URI.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4561 | |
| 4562 | <p>@@Interfaces@@</p> |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 4563 | <pre>xmlNodePtr node; |
Daniel Veillard | fc8dc35 | 2003-10-18 09:07:46 +0000 | [diff] [blame] | 4564 | if(!strncmp(node->name,"mytag",5) |
| 4565 | && node->ns |
| 4566 | && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) { |
| 4567 | ... |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 4568 | }</pre> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4569 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4570 | <p>Usually people object to using namespaces together with validitychecking.I |
| 4571 | will try to make sure that using namespaces won't break validitychecking,so |
| 4572 | even if you plan to use or currently are using validation Istronglysuggest |
| 4573 | adding namespaces to your document. A default |
| 4574 | namespacescheme<code>xmlns="http://...."</code>should not break validity even |
| 4575 | onlessflexible parsers. Using namespaces to mix and differentiate |
| 4576 | contentcomingfrom multiple DTDs will certainly break current validation |
| 4577 | schemes. Tochecksuch documents one needs to use schema-validation, which is |
| 4578 | supportedinlibxml2 as well. See <a |
| 4579 | href="http://www.relaxng.org/">relagx-ng</a>and <a |
Daniel Veillard | 3e35f8e | 2003-10-21 00:05:38 +0000 | [diff] [blame] | 4580 | href="http://www.w3c.org/XML/Schema">w3c-schema</a>.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4581 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4582 | <h2><a name="Upgrading">Upgrading 1.x code</a></h2> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4583 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4584 | <p>Incompatible changes:</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4585 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4586 | <p>Version 2 of libxml2 is the first version introducing |
| 4587 | seriousbackwardincompatible changes. The main goals were:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4588 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4589 | <li>a general cleanup. A number of mistakes inherited from the |
| 4590 | veryearlyversions couldn't be changed due to compatibility |
| 4591 | constraints.Examplethe "childs" element in the nodes.</li> |
| 4592 | <li>Uniformization of the various nodes, at least for their header |
| 4593 | andlinkparts (doc, parent, children, prev, next), the goal is |
| 4594 | asimplerprogramming model and simplifying the task of the |
| 4595 | DOMimplementors.</li> |
| 4596 | <li>better conformances to the XML specification, for example version1.xhad |
| 4597 | an heuristic to try to detect ignorable white spaces. As a resulttheSAX |
| 4598 | event generated were ignorableWhitespace() while the |
| 4599 | specrequirescharacter() in that case. This also mean that a number of |
| 4600 | DOMnodecontaining blank text may populate the DOM tree which were |
| 4601 | notpresentbefore.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4602 | </ul> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4603 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4604 | <h3>How to fix libxml-1.x code:</h3> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4605 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4606 | <p>So client code of libxml designed to run with version 1.x may have |
| 4607 | tobechanged to compile against version 2.x of libxml. Here is a list |
| 4608 | ofchangesthat I have collected, they may not be sufficient, so in case you |
| 4609 | findotherchange which are required, <a |
| 4610 | href="mailto:Daniel.Veillard@w3.org">dropme amail</a>:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4611 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4612 | <li>The package name have changed from libxml to libxml2, the librarynameis |
| 4613 | now -lxml2 . There is a new xml2-config script which should beused |
| 4614 | toselect the right parameters libxml2</li> |
| 4615 | <li>Node <strong>childs</strong>field has |
| 4616 | beenrenamed<strong>children</strong>so s/childs/children/g should |
| 4617 | beapplied(probability of having "childs" anywhere else is close to 0+</li> |
| 4618 | <li>The document don't have anymore a <strong>root</strong>element |
| 4619 | ithasbeen replaced by <strong>children</strong>and usually you will |
| 4620 | getalist of element here. For example a Dtd element for the |
| 4621 | internalsubsetand it's declaration may be found in that list, as well |
| 4622 | asprocessinginstructions or comments found before or after the |
| 4623 | documentroot element.Use <strong>xmlDocGetRootElement(doc)</strong>to get |
| 4624 | theroot element ofa document. Alternatively if you are sure to not |
| 4625 | referenceDTDs nor havePIs or comments before or after the |
| 4626 | rootelements/->root/->children/g will probably do it.</li> |
| 4627 | <li>The white space issue, this one is more complex, unless special |
| 4628 | caseofvalidating parsing, the line breaks and spaces usually used |
| 4629 | forindentingand formatting the document content becomes significant. So |
| 4630 | theyarereported by SAX and if your using the DOM tree, corresponding |
| 4631 | nodesaregenerated. Too approach can be taken: |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4632 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4633 | <li>lazy one, use the |
| 4634 | compatibilitycall<strong>xmlKeepBlanksDefault(0)</strong>but be aware |
| 4635 | that youarerelying on a special (and possibly broken) set of |
| 4636 | heuristicsoflibxml to detect ignorable blanks. Don't complain if it |
| 4637 | breaksormake your application not 100% clean w.r.t. to it's |
| 4638 | input.</li> |
| 4639 | <li>the Right Way: change you code to accept |
| 4640 | possiblyinsignificantblanks characters, or have your tree populated |
| 4641 | withweird blank textnodes. You can spot them using the |
| 4642 | commodityfunction<strong>xmlIsBlankNode(node)</strong>returning 1 for |
| 4643 | suchblanknodes.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4644 | </ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4645 | <p>Note also that with the new default the output functions don't |
| 4646 | addanyextra indentation when saving a tree in order to be able to |
| 4647 | roundtrip(read and save) without inflating the document with |
| 4648 | extraformattingchars.</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4649 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4650 | <li>The include path has changed to $prefix/libxml/ and |
| 4651 | theincludesthemselves uses this new prefix in includes instructions... |
| 4652 | Ifyou areusing (as expected) the |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4653 | <pre>xml2-config --cflags</pre> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4654 | <p>output to generate you compile commands this will probably work |
| 4655 | outofthe box</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4656 | </li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4657 | <li>xmlDetectCharEncoding takes an extra argument indicating the |
| 4658 | lengthinbyte of the head of the document available for character |
| 4659 | detection.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4660 | </ol> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4661 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4662 | <h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4663 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4664 | <p>Two new version of libxml (1.8.11) and libxml2 (2.3.4) have beenreleasedto |
| 4665 | allow smooth upgrade of existing libxml v1code whileretainingcompatibility. |
| 4666 | They offers the following:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4667 | <ol> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4668 | <li>similar include naming, one |
| 4669 | shoulduse<strong>#include<libxml/...></strong>in both cases.</li> |
| 4670 | <li>similar identifiers defined via macros for the child and |
| 4671 | rootfields:respectively<strong>xmlChildrenNode</strong>and<strong>xmlRootNode</strong></li> |
| 4672 | <li>a new macro <strong>LIBXML_TEST_VERSION</strong>which should |
| 4673 | beinsertedonce in the client code</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4674 | </ol> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4675 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4676 | <p>So the roadmap to upgrade your existing libxml applications |
| 4677 | isthefollowing:</p> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4678 | <ol> |
| 4679 | <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4680 | <li>find all occurrences where the xmlDoc <strong>root</strong>field |
| 4681 | isusedand change it to <strong>xmlRootNode</strong></li> |
| 4682 | <li>similarly find all occurrences where |
| 4683 | thexmlNode<strong>childs</strong>field is used and change |
| 4684 | itto<strong>xmlChildrenNode</strong></li> |
| 4685 | <li>add a <strong>LIBXML_TEST_VERSION</strong>macro somewhere |
| 4686 | inyour<strong>main()</strong>or in the library init entry point</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4687 | <li>Recompile, check compatibility, it should still work</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4688 | <li>Change your configure script to look first for xml2-config and |
| 4689 | fallbackusing xml-config . Use the --cflags and --libs output of the |
| 4690 | commandasthe Include and Linking parameters needed to use libxml.</li> |
| 4691 | <li>install libxml2-2.3.x and libxml2-devel-2.3.x |
| 4692 | (libxml-1.8.yandlibxml-devel-1.8.y can be kept simultaneously)</li> |
| 4693 | <li>remove your config.cache, relaunch your configuration |
| 4694 | mechanism,andrecompile, if steps 2 and 3 were done right it should |
| 4695 | compileas-is</li> |
| 4696 | <li>Test that your application is still running correctly, if not thismaybe |
| 4697 | due to extra empty nodes due to formating spaces being kept |
| 4698 | inlibxml2contrary to libxml1, in that case insert |
| 4699 | xmlKeepBlanksDefault(1)in yourcode before calling the parser |
| 4700 | (nextto<strong>LIBXML_TEST_VERSION</strong>is a fine place).</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4701 | </ol> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4702 | |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4703 | <p>Following those steps should work. It worked for some of my own code.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4704 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4705 | <p>Let me put some emphasis on the fact that there is far more |
| 4706 | changesfromlibxml 1.x to 2.x than the ones you may have to patch for. The |
| 4707 | overallcodehas been considerably cleaned up and the conformance to the |
| 4708 | XMLspecificationhas been drastically improved too. Don't take those changes |
| 4709 | asan excuse tonot upgrade, it may cost a lot on the long term ...</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4710 | |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 4711 | <h2><a name="Thread">Thread safety</a></h2> |
| 4712 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4713 | <p>Starting with 2.4.7, libxml2 makes provisions to ensure |
| 4714 | thatconcurrentthreads can safely work in parallel parsing different |
| 4715 | documents.There ishowever a couple of things to do to ensure it:</p> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 4716 | <ul> |
| 4717 | <li>configure the library accordingly using the --with-threads options</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4718 | <li>call xmlInitParser() in the "main" thread before using any ofthelibxml2 |
| 4719 | API (except possibly selecting a different memoryallocator)</li> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 4720 | </ul> |
| 4721 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4722 | <p>Note that the thread safety cannot be ensured for multiple |
| 4723 | threadssharingthe same document, the locking must be done at the application |
| 4724 | level,libxmlexports a basic mutex and reentrant mutexes API |
| 4725 | in<libxml/threads.h>.The parts of the library checked for thread |
| 4726 | safetyare:</p> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 4727 | <ul> |
| 4728 | <li>concurrent loading</li> |
| 4729 | <li>file access resolution</li> |
| 4730 | <li>catalog access</li> |
| 4731 | <li>catalog building</li> |
| 4732 | <li>entities lookup/accesses</li> |
| 4733 | <li>validation</li> |
| 4734 | <li>global variables per-thread override</li> |
| 4735 | <li>memory handling</li> |
| 4736 | </ul> |
| 4737 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4738 | <p>XPath is supposed to be thread safe now, but this |
| 4739 | wasn'ttestedseriously.</p> |
Daniel Veillard | 52dcab3 | 2001-10-30 12:51:17 +0000 | [diff] [blame] | 4740 | |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 4741 | <h2><a name="DOM"></a><a name="Principles">DOM Principles</a></h2> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4742 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4743 | <p><a href="http://www.w3.org/DOM/">DOM</a>stands for the |
| 4744 | <em>DocumentObjectModel</em>; this is an API for accessing XML or HTML |
| 4745 | structureddocuments.Native support for DOM in Gnome is on the way (module |
| 4746 | gnome-dom),and will bebased on gnome-xml. This will be a far cleaner |
| 4747 | interface tomanipulate XMLfiles within Gnome since it won't expose the |
| 4748 | internalstructure.</p> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4749 | |
Daniel Veillard | 8a46917 | 2003-06-12 16:05:07 +0000 | [diff] [blame] | 4750 | <p>The current DOM implementation on top of libxml2 is the <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4751 | href="http://cvs.gnome.org/lxr/source/gdome2/">gdome2 Gnome module</a>,thisis |
| 4752 | a full DOM interface, thanks to Paolo Casarini, check the <a |
| 4753 | href="http://www.cs.unibo.it/~casarini/gdome2/">Gdome2 |
| 4754 | homepage</a>formoreinformations.</p> |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4755 | |
Daniel Veillard | 3500838 | 1999-10-25 13:15:52 +0000 | [diff] [blame] | 4756 | <h2><a name="Example"></a><a name="real">A real example</a></h2> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4757 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4758 | <p>Here is a real size example, where the actual content of |
| 4759 | theapplicationdata is not kept in the DOM tree but uses internal structures. |
| 4760 | Itis based ona proposal to keep a database of jobs related to Gnome, with |
| 4761 | anXML basedstorage structure. Here is an <a href="gjobs.xml">XML |
| 4762 | encodedjobsbase</a>:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4763 | <pre><?xml version="1.0"?> |
| 4764 | <gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"> |
| 4765 | <gjob:Jobs> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4766 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4767 | <gjob:Job> |
| 4768 | <gjob:Project ID="3"/> |
| 4769 | <gjob:Application>GBackup</gjob:Application> |
| 4770 | <gjob:Category>Development</gjob:Category> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4771 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4772 | <gjob:Update> |
| 4773 | <gjob:Status>Open</gjob:Status> |
| 4774 | <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified> |
| 4775 | <gjob:Salary>USD 0.00</gjob:Salary> |
| 4776 | </gjob:Update> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4777 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4778 | <gjob:Developers> |
| 4779 | <gjob:Developer> |
| 4780 | </gjob:Developer> |
| 4781 | </gjob:Developers> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4782 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4783 | <gjob:Contact> |
| 4784 | <gjob:Person>Nathan Clemons</gjob:Person> |
| 4785 | <gjob:Email>nathan@windsofstorm.net</gjob:Email> |
| 4786 | <gjob:Company> |
| 4787 | </gjob:Company> |
| 4788 | <gjob:Organisation> |
| 4789 | </gjob:Organisation> |
| 4790 | <gjob:Webpage> |
| 4791 | </gjob:Webpage> |
| 4792 | <gjob:Snailmail> |
| 4793 | </gjob:Snailmail> |
| 4794 | <gjob:Phone> |
| 4795 | </gjob:Phone> |
| 4796 | </gjob:Contact> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4797 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4798 | <gjob:Requirements> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4799 | The program should be released as free software, under the GPL. |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4800 | </gjob:Requirements> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4801 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4802 | <gjob:Skills> |
| 4803 | </gjob:Skills> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4804 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4805 | <gjob:Details> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4806 | A GNOME based system that will allow a superuser to configure |
| 4807 | compressed and uncompressed files and/or file systems to be backed |
| 4808 | up with a supported media in the system. This should be able to |
| 4809 | perform via find commands generating a list of files that are passed |
| 4810 | to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine |
| 4811 | or via operations performed on the filesystem itself. Email |
| 4812 | notification and GUI status display very important. |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4813 | </gjob:Details> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4814 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4815 | </gjob:Job> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4816 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4817 | </gjob:Jobs> |
| 4818 | </gjob:Helping></pre> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4819 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4820 | <p>While loading the XML file into an internal DOM tree is a matter |
| 4821 | ofcallingonly a couple of functions, browsing the tree to gather the data |
| 4822 | andgeneratethe internal structures is harder, and more error prone.</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4823 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4824 | <p>The suggested principle is to be tolerant with respect to |
| 4825 | theinputstructure. For example, the ordering of the attributes is |
| 4826 | notsignificant,the XML specification is clear about it. It's also usually a |
| 4827 | goodidea not todepend on the order of the children of a given node, unless |
| 4828 | itreally makesthings harder. Here is some code to parse the information for |
| 4829 | aperson:</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4830 | <pre>/* |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4831 | * A person record |
| 4832 | */ |
| 4833 | typedef struct person { |
| 4834 | char *name; |
| 4835 | char *email; |
| 4836 | char *company; |
| 4837 | char *organisation; |
| 4838 | char *smail; |
| 4839 | char *webPage; |
| 4840 | char *phone; |
| 4841 | } person, *personPtr; |
| 4842 | |
| 4843 | /* |
| 4844 | * And the code needed to parse it |
| 4845 | */ |
| 4846 | personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { |
| 4847 | personPtr ret = NULL; |
| 4848 | |
| 4849 | DEBUG("parsePerson\n"); |
| 4850 | /* |
| 4851 | * allocate the struct |
| 4852 | */ |
| 4853 | ret = (personPtr) malloc(sizeof(person)); |
| 4854 | if (ret == NULL) { |
| 4855 | fprintf(stderr,"out of memory\n"); |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4856 | return(NULL); |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4857 | } |
| 4858 | memset(ret, 0, sizeof(person)); |
| 4859 | |
| 4860 | /* We don't care what the top level element name is */ |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4861 | cur = cur->xmlChildrenNode; |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4862 | while (cur != NULL) { |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4863 | if ((!strcmp(cur->name, "Person")) && (cur->ns == ns)) |
| 4864 | ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| 4865 | if ((!strcmp(cur->name, "Email")) && (cur->ns == ns)) |
| 4866 | ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| 4867 | cur = cur->next; |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4868 | } |
| 4869 | |
| 4870 | return(ret); |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4871 | }</pre> |
| 4872 | |
Daniel Veillard | 91e9d58 | 2001-02-26 07:31:12 +0000 | [diff] [blame] | 4873 | <p>Here are a couple of things to notice:</p> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4874 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4875 | <li>Usually a recursive parsing style is the more convenient one: XMLdatais |
| 4876 | by nature subject to repetitive constructs and usually |
| 4877 | exhibitshighlystructured patterns.</li> |
| 4878 | <li>The two arguments of type <em>xmlDocPtr</em>and |
| 4879 | <em>xmlNsPtr</em>,i.e.the pointer to the global XML document and the |
| 4880 | namespace reserved totheapplication. Document wide information are needed |
| 4881 | for example todecodeentities and it's a good coding practice to define a |
| 4882 | namespace foryourapplication set of data and test that the element and |
| 4883 | attributesyou'reanalyzing actually pertains to your application space. |
| 4884 | This isdone by asimple equality test (cur->ns == ns).</li> |
| 4885 | <li>To retrieve text and attributes value, you can use |
| 4886 | thefunction<em>xmlNodeListGetString</em>to gather all the text and |
| 4887 | entityreferencenodes generated by the DOM output and produce an single |
| 4888 | textstring.</li> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4889 | </ul> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4890 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4891 | <p>Here is another piece of code used to parse another level |
| 4892 | ofthestructure:</p> |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4893 | <pre>#include <libxml/tree.h> |
Daniel Veillard | 361d845 | 2000-04-03 19:48:13 +0000 | [diff] [blame] | 4894 | /* |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4895 | * a Description for a Job |
| 4896 | */ |
| 4897 | typedef struct job { |
| 4898 | char *projectID; |
| 4899 | char *application; |
| 4900 | char *category; |
| 4901 | personPtr contact; |
| 4902 | int nbDevelopers; |
| 4903 | personPtr developers[100]; /* using dynamic alloc is left as an exercise */ |
| 4904 | } job, *jobPtr; |
| 4905 | |
| 4906 | /* |
| 4907 | * And the code needed to parse it |
| 4908 | */ |
| 4909 | jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { |
| 4910 | jobPtr ret = NULL; |
| 4911 | |
| 4912 | DEBUG("parseJob\n"); |
| 4913 | /* |
| 4914 | * allocate the struct |
| 4915 | */ |
| 4916 | ret = (jobPtr) malloc(sizeof(job)); |
| 4917 | if (ret == NULL) { |
| 4918 | fprintf(stderr,"out of memory\n"); |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4919 | return(NULL); |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4920 | } |
| 4921 | memset(ret, 0, sizeof(job)); |
| 4922 | |
| 4923 | /* We don't care what the top level element name is */ |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4924 | cur = cur->xmlChildrenNode; |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4925 | while (cur != NULL) { |
| 4926 | |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4927 | if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) { |
| 4928 | ret->projectID = xmlGetProp(cur, "ID"); |
| 4929 | if (ret->projectID == NULL) { |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4930 | fprintf(stderr, "Project has no ID\n"); |
| 4931 | } |
| 4932 | } |
Daniel Veillard | 60979bd | 2000-07-10 12:17:33 +0000 | [diff] [blame] | 4933 | if ((!strcmp(cur->name, "Application")) && (cur->ns == ns)) |
| 4934 | ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| 4935 | if ((!strcmp(cur->name, "Category")) && (cur->ns == ns)) |
| 4936 | ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
| 4937 | if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns)) |
| 4938 | ret->contact = parsePerson(doc, ns, cur); |
| 4939 | cur = cur->next; |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4940 | } |
| 4941 | |
| 4942 | return(ret); |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4943 | }</pre> |
Daniel Veillard | 14fff06 | 1999-06-22 21:49:07 +0000 | [diff] [blame] | 4944 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4945 | <p>Once you are used to it, writing this kind of code is quite |
| 4946 | simple,butboring. Ultimately, it could be possible to write stubbers taking |
| 4947 | eitherCdata structure definitions, a set of XML examples or an XML DTD |
| 4948 | andproducethe code needed to import and export the content between C data |
| 4949 | andXMLstorage. This is left as an exercise to the reader :-)</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4950 | |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4951 | <p>Feel free to use <a href="example/gjobread.c">the code for the |
| 4952 | fullCparsing example</a>as a template, it is also available with Makefile |
| 4953 | intheGnome CVS base under gnome-xml/example</p> |
Daniel Veillard | b05deb7 | 1999-08-10 19:04:08 +0000 | [diff] [blame] | 4954 | |
Daniel Veillard | c310d56 | 2000-06-23 18:32:15 +0000 | [diff] [blame] | 4955 | <h2><a name="Contributi">Contributions</a></h2> |
| 4956 | <ul> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4957 | <li>Bjorn Reese, William Brack and Thomas Broyer have provided a |
| 4958 | numberofpatches, Gary Pennington worked on the validation API, |
| 4959 | threadingsupportand Solaris port.</li> |
Daniel Veillard | b8cfbd1 | 2001-10-25 10:53:28 +0000 | [diff] [blame] | 4960 | <li>John Fleck helps maintaining the documentation and man pages.</li> |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4961 | <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a>is |
| 4962 | nowthemaintainer of the Windows port, <a |
| 4963 | href="http://www.zlatkovic.com/projects/libxml/index.html">heprovidesbinaries</a></li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4964 | <li><a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a>provides<a |
| 4965 | href="http://garypennington.net/libxml2/">Solaris binaries</a></li> |
Daniel Veillard | e356c28 | 2001-03-10 12:32:04 +0000 | [diff] [blame] | 4966 | <li><a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4967 | href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">MattSergeant</a>developed<a |
| 4968 | href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl |
| 4969 | wrapperforlibxml2/libxslt as part of the <a |
| 4970 | href="http://axkit.com/">AxKitXMLapplication server</a></li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4971 | <li><a href="mailto:fnatter@gmx.net">Felix Natter</a>and <a |
| 4972 | href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a>provide <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4973 | href="libxml-doc.el">an emacs module</a>to lookup |
| 4974 | libxml(2)functionsdocumentation</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4975 | <li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a>provided <a |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 4976 | href="http://xmlsoft.org/messages/0488.html">man pages</a></li> |
Daniel Veillard | 5168dbf | 2001-07-07 00:18:23 +0000 | [diff] [blame] | 4977 | <li>there is a module for <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4978 | href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxsltsupportin |
| 4979 | OpenNSD/AOLServer</a></li> |
| 4980 | <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave |
| 4981 | Kuhlman</a>providedthefirst version of libxml/libxslt <a |
Daniel Veillard | 2d347fa | 2002-03-17 10:34:11 +0000 | [diff] [blame] | 4982 | href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li> |
Daniel Veillard | 1aadc44 | 2001-11-28 13:10:32 +0000 | [diff] [blame] | 4983 | <li>Petr Kozelka provides <a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4984 | href="http://sourceforge.net/projects/libxml2-pas">Pascal units |
| 4985 | togluelibxml2</a>with Kylix and Delphi and other Pascal compilers</li> |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 4986 | <li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a>implemented the<a |
Daniel Veillard | fabafd5 | 2006-06-08 08:16:33 +0000 | [diff] [blame^] | 4987 | href="http://www.w3.org/Signature/">XML Canonicalization and |
| 4988 | XMLDigitalSignature</a><a |
| 4989 | href="http://www.aleksey.com/xmlsec/">implementations forlibxml2</a></li> |
| 4990 | <li><a href="mailto:Steve.Ball@explain.com.au">SteveBall</a>andcontributors |
| 4991 | maintain <a href="http://tclxml.sourceforge.net/">tclbindings for libxml2 |
| 4992 | andlibxslt</a>, as well as <a |
| 4993 | href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a>a GUI |
| 4994 | forxmllintand <a |
| 4995 | href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>a GUIfor |
| 4996 | xsltproc.</li> |
Daniel Veillard | c310d56 | 2000-06-23 18:32:15 +0000 | [diff] [blame] | 4997 | </ul> |
| 4998 | |
Daniel Veillard | c8eab3a | 1999-09-04 18:27:23 +0000 | [diff] [blame] | 4999 | <p></p> |
Daniel Veillard | ccb0963 | 1998-10-27 06:21:04 +0000 | [diff] [blame] | 5000 | </body> |
| 5001 | </html> |