1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

applied syntax patch from Rick Jones and rebuilt the web site. Daniel

* doc/xml.html doc/*.html: applied syntax patch from Rick Jones
  and rebuilt the web site.
Daniel
This commit is contained in:
Daniel Veillard
2002-07-24 23:47:05 +00:00
parent 8e8a703c76
commit 0b28e88eb9
24 changed files with 908 additions and 865 deletions

View File

@ -1,4 +1,10 @@
Thu Jul 25 01:33:47 CEST 2002 Daniel Veillard <daniel@veillard.com>
* doc/xml.html doc/*.html: applied syntax patch from Rick Jones
and rebuilt the web site.
Mon Jul 22 11:04:48 PDT 2002 Aleksey Sanin <aleksey@aleksey.com> Mon Jul 22 11:04:48 PDT 2002 Aleksey Sanin <aleksey@aleksey.com>
* include/libxml/tree.h: added _private member to xmlNs struct * include/libxml/tree.h: added _private member to xmlNs struct
Sun Jul 21 17:48:47 CEST 2002 Daniel Veillard <daniel@veillard.com> Sun Jul 21 17:48:47 CEST 2002 Daniel Veillard <daniel@veillard.com>

View File

@ -87,12 +87,12 @@ A:link, A:visited, A:active { text-decoration: underline }
</table> </table>
</td></tr></table></td> </td></tr></table></td>
<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"> <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
<p>Table of Content:</p> <p>Table of Contents:</p>
<ul> <ul>
<li><a href="FAQ.html#License">License(s)</a></li> <li><a href="FAQ.html#License">License(s)</a></li>
<li><a href="FAQ.html#Installati">Installation</a></li> <li><a href="FAQ.html#Installati">Installation</a></li>
<li><a href="FAQ.html#Compilatio">Compilation</a></li> <li><a href="FAQ.html#Compilatio">Compilation</a></li>
<li><a href="FAQ.html#Developer">Developer corner</a></li> <li><a href="FAQ.html#Developer">Developer corner</a></li>
</ul> </ul>
<h3> <h3>
<a name="License">License</a>(s)</h3> <a name="License">License</a>(s)</h3>
@ -100,255 +100,257 @@ A:link, A:visited, A:active { text-decoration: underline }
<li> <li>
<em>Licensing Terms for libxml</em> <em>Licensing Terms for libxml</em>
<p>libxml is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT <p>libxml is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a>, see the file Copyright in the distribution for the precise License</a>; see the file Copyright in the distribution for the precise
wording</p> wording</p>
</li> </li>
<li> <li>
<em>Can I embed libxml in a proprietary application ?</em> <em>Can I embed libxml in a proprietary application ?</em>
<p>Yes. The MIT License allows you to also keep proprietary the changes <p>Yes. The MIT License allows you to keep proprietary the changes
you made to libxml, but it would be graceful to provide back bug fixes you made to libxml, but it would be graceful to send-back bug fixes
and improvements as patches for possible incorporation in the main and improvements as patches for possible incorporation in the main
development tree</p> development tree.</p>
</li> </li>
</ol> </ol>
<h3><a name="Installati">Installation</a></h3> <h3><a name="Installati">Installation</a></h3>
<ol> <ol>
<li>Unless you are forced to because your application links with a Gnome <li>Unless you are forced to because your application links with a Gnome
library requiring it, <strong><span style="background-color: #FF0000">Do library requiring it, <strong><span style="background-color: #FF0000">Do
Not Use libxml1</span></strong>, use libxml2</li> Not Use libxml1</span></strong>, use libxml2</li>
<li> <li>
<em>Where can I get libxml</em> ? <em>Where can I get libxml</em> ?
<p>The original distribution comes from <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/">gnome.org</a> <p>The original distribution comes from <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/">gnome.org</a>
</p> </p>
<p>Most Linux and BSD distributions include libxml, this is probably the <p>Most Linux and BSD distributions include libxml, this is probably the
safer way for end-users</p> safer way for end-users to use libxml.</p>
<p>David Doolin provides precompiled Windows versions at <a href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a> <p>David Doolin provides precompiled Windows versions at <a href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/%20%20%20%20%20%20%20%20%20">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a>
</p> </p>
</li> </li>
<li> <li>
<em>I see libxml and libxml2 releases, which one should I install ?</em> <em>I see libxml and libxml2 releases, which one should I install ?</em>
<ul> <ul>
<li>If you are not concerned by any existing backward compatibility <li>If you are not constrained by backward compatibility issues
with existing application, install libxml2 only</li> with existing applications, install libxml2 only</li>
<li>If you are not doing development, you can safely install both. <li>If you are not doing development, you can safely install both.
usually the packages <a href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are Usually the packages <a href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are
compatible (this is not the case for development packages)</li> compatible (this is not the case for development packages).</li>
<li>If you are a developer and your system provides separate packaging <li>If you are a developer and your system provides separate packaging
for shared libraries and the development components, it is possible for shared libraries and the development components, it is possible
to install libxml and libxml2, and also <a href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a> to install libxml and libxml2, and also <a href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>
and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>
too for libxml2 &gt;= 2.3.0</li> too for libxml2 &gt;= 2.3.0</li>
<li>If you are developing a new application, please develop against <li>If you are developing a new application, please develop against
libxml2(-devel)</li> libxml2(-devel)</li>
</ul> </ul>
</li> </li>
<li> <li>
<em>I can't install the libxml package it conflicts with libxml0</em> <em>I can't install the libxml package, it conflicts with libxml0</em>
<p>You probably have an old libxml0 package used to provide the shared <p>You probably have an old libxml0 package used to provide the shared
library for libxml.so.0, you can probably safely remove it. Anyway the library for libxml.so.0, you can probably safely remove it. The
libxml packages provided on <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> provides libxml packages provided on <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> provide
libxml.so.0</p> libxml.so.0</p>
</li> </li>
<li> <li>
<em>I can't install the libxml(2) RPM package due to failed <em>I can't install the libxml(2) RPM package due to failed
dependencies</em> dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and <p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p> rebuild it locally with</p>
<p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code></p> <p>
<p>if everything goes well it will generate two binary rpm (one providing <code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
the shared libs and xmllint, and the other one, the -devel package <p>If everything goes well it will generate two binary rpm packages (one providing
the shared libs and xmllint, and the other one, the -devel package,
providing includes, static libraries and scripts needed to build providing includes, static libraries and scripts needed to build
applications with libxml(2)) that you can install locally.</p> applications with libxml(2)) that you can install locally.</p>
</li> </li>
</ol> </ol>
<h3><a name="Compilatio">Compilation</a></h3> <h3><a name="Compilatio">Compilation</a></h3>
<ol> <ol>
<li> <li>
<em>What is the process to compile libxml ?</em> <em>What is the process to compile libxml ?</em>
<p>As most UNIX libraries libxml follows the &quot;standard&quot;:</p> <p>As most UNIX libraries libxml follows the &quot;standard&quot;:</p>
<p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p> <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libxml-xxxx</code></p> <p><code>cd libxml-xxxx</code></p>
<p><code>./configure --help</code></p> <p><code>./configure --help</code></p>
<p>to see the options, then the compilation/installation proper</p> <p>to see the options, then the compilation/installation proper</p>
<p><code>./configure [possible options]</code></p> <p><code>./configure [possible options]</code></p>
<p><code>make</code></p> <p><code>make</code></p>
<p><code>make install</code></p> <p><code>make install</code></p>
<p>At that point you may have to rerun ldconfig or similar utility to <p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p> update your list of installed shared libs.</p>
</li> </li>
<li> <li>
<em>What other libraries are needed to compile/install libxml ?</em> <em>What other libraries are needed to compile/install libxml ?</em>
<p>Libxml does not requires any other library, the normal C ANSI API <p>Libxml does not require any other library, the normal C ANSI API
should be sufficient (please report any violation to this rule you may should be sufficient (please report any violation to this rule you may
find).</p> find).</p>
<p>However if found at configuration time libxml will detect and use the <p>However if found at configuration time libxml will detect and use the
following libs:</p> following libs:</p>
<ul> <ul>
<li> <li>
<a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a <a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
highly portable and available widely compression library</li> highly portable and available widely compression library.</li>
<li>iconv: a powerful character encoding conversion library. It's <li>iconv: a powerful character encoding conversion library. It is
included by default on recent glibc libraries, so it doesn't need to included by default in recent glibc libraries, so it doesn't need to
be installed specifically on Linux. It seems it's now <a href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part be installed specifically on Linux. It now seems a <a href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part
of the official UNIX</a> specification. Here is one <a href="http://clisp.cons.org/~haible/packages-libiconv.html">implementation of the official UNIX</a> specification. Here is one <a href="http://clisp.cons.org/~haible/packages-libiconv.html">implementation
of the library</a> which source can be found <a href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li> of the library</a> which source can be found <a href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li>
</ul> </ul>
</li> </li>
<li> <li>
<em>make check fails on some platforms</em> <em>Make check fails on some platforms</em>
<p>Sometime the regression tests results don't completely match the value <p>Sometimes the regression tests' results don't completely match the value
produced by the parser, and the makefile uses diff to print the delta. On produced by the parser, and the makefile uses diff to print the delta. On
some platforms the diff return breaks the compilation process, if the some platforms the diff return breaks the compilation process; if the
diff is small this is probably not a serious problem.</p> diff is small this is probably not a serious problem.</p>
<p>Sometimes (especially on Solaris) make checks fails due to limitations <p>Sometimes (especially on Solaris) make checks fail due to limitations
in make. Try using GNU-make instead.</p> in make. Try using GNU-make instead.</p>
</li> </li>
<li> <li>
<em>I use the CVS version and there is no configure script</em> <em>I use the CVS version and there is no configure script</em>
<p>The configure (and other Makefiles) are generated. Use the autogen.sh <p>The configure script (and other Makefiles) are generated. Use the autogen.sh
script to regenerate the configure and Makefiles, like:</p> script to regenerate the configure script and Makefiles, like:</p>
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p> <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
</li> </li>
<li> <li>
<em>I have troubles when running make tests with gcc-3.0</em> <em>I have troubles when running make tests with gcc-3.0</em>
<p>It seems the initial release of gcc-3.0 has a problem with the <p>It seems the initial release of gcc-3.0 has a problem with the
optimizer which miscompiles the URI module. Please use another optimizer which miscompiles the URI module. Please use another
compiler</p> compiler.</p>
</li> </li>
</ol> </ol>
<h3> <h3>
<a name="Developer">Developer</a> corner</h3> <a name="Developer">Developer</a> corner</h3>
<ol> <ol>
<li> <li>
<em>xmlDocDump() generates output on one line</em> <em>xmlDocDump() generates output on one line.</em>
<p>libxml will not <strong>invent</strong> spaces in the content of a <p>Libxml will not <strong>invent</strong> spaces in the content of a
document since <strong>all spaces in the content of a document are document since <strong>all spaces in the content of a document are
significant</strong>. If you build a tree from the API and want significant</strong>. If you build a tree from the API and want
indentation:</p> indentation:</p>
<ol> <ol>
<li>the correct way is to generate those yourself too</li> <li>the correct way is to generate those yourself too.</li>
<li>the dangerous way is to ask libxml to add those blanks to your <li>the dangerous way is to ask libxml to add those blanks to your
content <strong>modifying the content of your document in the content <strong>modifying the content of your document in the
process</strong>. The result may not be what you expect. There is process</strong>. The result may not be what you expect. There is
<strong>NO</strong> way to guarantee that such a modification won't <strong>NO</strong> way to guarantee that such a modification won't
impact other part of the content of your document. See <a href="http://xmlsoft.org/html/libxml-parser.html#XMLKEEPBLANKSDEFAULT">xmlKeepBlanksDefault affect other parts of the content of your document. See <a href="http://xmlsoft.org/html/libxml-parser.html#XMLKEEPBLANKSDEFAULT">xmlKeepBlanksDefault
()</a> and <a href="http://xmlsoft.org/html/libxml-tree.html#XMLSAVEFORMATFILE">xmlSaveFormatFile ()</a> and <a href="http://xmlsoft.org/html/libxml-tree.html#XMLSAVEFORMATFILE">xmlSaveFormatFile
()</a> ()</a>
</li> </li>
</ol> </ol>
</li> </li>
<li>Extra nodes in the document: <li>Extra nodes in the document:
<p><em>For a XML file as below:</em></p> <p><em>For a XML file as below:</em></p>
<pre>&lt;?xml version=&quot;1.0&quot;?&gt; <pre>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;PLAN xmlns=&quot;http://www.argus.ca/autotest/1.0/&quot;&gt; &lt;PLAN xmlns=&quot;http://www.argus.ca/autotest/1.0/&quot;&gt;
&lt;NODE CommFlag=&quot;0&quot;/&gt; &lt;NODE CommFlag=&quot;0&quot;/&gt;
&lt;NODE CommFlag=&quot;1&quot;/&gt; &lt;NODE CommFlag=&quot;1&quot;/&gt;
&lt;/PLAN&gt;</pre> &lt;/PLAN&gt;</pre>
<p><em>after parsing it with the function <p><em>after parsing it with the function
pxmlDoc=xmlParseFile(...);</em></p> pxmlDoc=xmlParseFile(...);</em></p>
<p><em>I want to the get the content of the first node (node with the <p><em>I want to the get the content of the first node (node with the
CommFlag=&quot;0&quot;)</em></p> CommFlag=&quot;0&quot;)</em></p>
<p><em>so I did it as following;</em></p> <p><em>so I did it as following;</em></p>
<pre>xmlNodePtr pnode; <pre>xmlNodePtr pnode;
pnode=pxmlDoc-&gt;children-&gt;children;</pre> pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<p><em>but it does not work. If I change it to</em></p> <p><em>but it does not work. If I change it to</em></p>
<pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre> <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
<p><em>then it works. Can someone explain it to me.</em></p> <p><em>then it works. Can someone explain it to me.</em></p>
<p> <p>
<p>In XML all characters in the content of the document are significant <p>In XML all characters in the content of the document are significant
<strong>including blanks and formatting line breaks</strong>.</p> <strong>including blanks and formatting line breaks</strong>.</p>
<p>The extra nodes you are wondering about are just that, text nodes with <p>The extra nodes you are wondering about are just that, text nodes with
the formatting spaces which are part of the document but that people tend the formatting spaces which are part of the document but that people tend
to forget. There is a function <a href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault to forget. There is a function <a href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
()</a> to remove those at parse time, but that's an heuristic, and its ()</a> to remove those at parse time, but that's an heuristic, and its
use should be limited to case where you are sure there is no use should be limited to cases where you are certain there is no
mixed-content in the document.</p> mixed-content in the document.</p>
</li> </li>
<li> <li>
<em>I get compilation errors of existing code like when accessing <em>I get compilation errors of existing code like when accessing
<strong>root</strong> or <strong>childs fields</strong> of nodes</em> <strong>root</strong> or <strong>child fields</strong> of nodes.</em>
<p>You are compiling code developed for libxml version 1 and using a <p>You are compiling code developed for libxml version 1 and using a
libxml2 development environment. Either switch back to libxml v1 devel or libxml2 development environment. Either switch back to libxml v1 devel or
even better fix the code to compile with libxml2 (or both) by <a href="upgrade.html">following the instructions</a>.</p> even better fix the code to compile with libxml2 (or both) by <a href="upgrade.html">following the instructions</a>.</p>
</li> </li>
<li> <li>
<em>I get compilation errors about non existing <em>I get compilation errors about non existing
<strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong> <strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong>
fields</em> fields.</em>
<p>The source code you are using has been <a href="upgrade.html">upgraded</a> to be able to compile with both libxml <p>The source code you are using has been <a href="upgrade.html">upgraded</a> to be able to compile with both libxml
and libxml2, but you need to install a more recent version: and libxml2, but you need to install a more recent version:
libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p> libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
</li> </li>
<li> <li>
<em>XPath implementation looks seriously broken</em> <em>XPath implementation looks seriously broken</em>
<p>XPath implementation prior to 2.3.0 was really incomplete, upgrade to <p>XPath implementation prior to 2.3.0 was really incomplete. Upgrade to
a recent version, there is no known bug in the current version.</p> a recent version, there are no known bugs in the current version.</p>
</li> </li>
<li> <li>
<em>The example provided in the web page does not compile</em> <em>The example provided in the web page does not compile.</em>
<p>It's hard to maintain the documentation in sync with the code <p>It's hard to maintain the documentation in sync with the code
&lt;grin/&gt; ...</p> &lt;grin/&gt; ...</p>
<p>Check the previous points 1/ and 2/ raised before, and send <p>Check the previous points 1/ and 2/ raised before, and please send
patches.</p> patches.</p>
</li> </li>
<li> <li>
<em>Where can I get more examples and informations than in the web <em>Where can I get more examples and information than privoded on the web
page</em> page?</em>
<p>Ideally a libxml book would be nice. I have no such plan ... But you <p>Ideally a libxml book would be nice. I have no such plan ... But you
can:</p> can:</p>
<ul> <ul>
<li>check more deeply the <a href="html/libxml-lib.html">existing <li>check more deeply the <a href="html/libxml-lib.html">existing
generated doc</a> generated doc</a>
</li> </li>
<li>looks for examples of use for libxml function using the Gnome code <li>look for examples of use for libxml function using the Gnome code.
for example the following will query the full Gnome CVS base for the For example the following will query the full Gnome CVS base for the
use of the <strong>xmlAddChild()</strong> function: use of the <strong>xmlAddChild()</strong> function:
<p><a href="http://cvs.gnome.org/lxr/search?string=xmlAddChild">http://cvs.gnome.org/lxr/search?string=xmlAddChild</a></p> <p><a href="http://cvs.gnome.org/lxr/search?string=xmlAddChild">http://cvs.gnome.org/lxr/search?string=xmlAddChild</a></p>
<p>This may be slow, a large hardware donation to the gnome project <p>This may be slow, a large hardware donation to the gnome project
could cure this :-)</p> could cure this :-)</p>
</li> </li>
<li> <li>
<a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Browse <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Browse
the libxml source</a> , I try to write code as clean and documented the libxml source</a> , I try to write code as clean and documented
as possible, so looking at it may be helpful. Especially the code of as possible, so looking at it may be helpful. In particular the code of
xmllint.c and of the various testXXX.c tests programs should provide xmllint.c and of the various testXXX.c test programs should provide
good example on how to do things with the library.</li> good examples of how to do things with the library.</li>
</ul> </ul>
</li> </li>
<li>What about C++ ? <li>What about C++ ?
<p>libxml is written in pure C in order to allow easy reuse on a number <p>libxml is written in pure C in order to allow easy reuse on a number
of platforms, including embedded systems. I don't intend to convert to of platforms, including embedded systems. I don't intend to convert to
C++.</p> C++.</p>
<p>There is however a few C++ wrappers which may fulfill your needs:</p> <p>There are however a few C++ wrappers which may fulfill your needs:</p>
<ul> <ul>
<li>by Ari Johnson &lt;ari@btigate.com&gt;: <li>by Ari Johnson &lt;ari@btigate.com&gt;:
<p>Website: <a href="http://lusis.org/~ari/xml++/">http://lusis.org/~ari/xml++/</a> <p>Website: <a href="http://lusis.org/~ari/xml%2B%2B/">http://lusis.org/~ari/xml++/</a>
</p> </p>
<p>Download: <a href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a> <p>Download: <a href="http://lusis.org/~ari/xml%2B%2B/libxml%2B%2B.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a>
</p> </p>
</li> </li>
<li>by Peter Jones &lt;pjones@pmade.org&gt; <li>by Peter Jones &lt;pjones@pmade.org&gt;
<p>Website: <a href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a> <p>Website: <a href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a>
</p> </p>
</li>
</ul>
</li> </li>
</ul> <li>How to validate a document a posteriori ?
</li>
<li>How to validate a document a posteriori ?
<p>It is possible to validate documents which had not been validated at <p>It is possible to validate documents which had not been validated at
initial parsing time or documents who have been built from scratch using initial parsing time or documents which have been built from scratch using
the API. Use the <a href="http://xmlsoft.org/html/libxml-valid.html#XMLVALIDATEDTD">xmlValidateDtd()</a> the API. Use the <a href="http://xmlsoft.org/html/libxml-valid.html#XMLVALIDATEDTD">xmlValidateDtd()</a>
function. It is also possible to simply add a DTD to an existing function. It is also possible to simply add a DTD to an existing
document:</p> document:</p>
<pre>xmlDocPtr doc; /* your existing document */ <pre>xmlDocPtr doc; /* your existing document */
xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
dtd-&gt;name = xmlStrDup((xmlChar*)&quot;root_name&quot;); /* use the given root */ dtd-&gt;name = xmlStrDup((xmlChar*)&quot;root_name&quot;); /* use the given root */
doc-&gt;intSubset = dtd; doc-&gt;intSubset = dtd;
if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd); if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd); else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd);
</pre> </pre>
</li> </li>
<li>etc ...</li> <li>etc ...</li>
</ol> </ol>
<p> <p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>

View File

@ -103,15 +103,15 @@ document</a>:</p>
&lt;p&gt;...&lt;/p&gt; &lt;p&gt;...&lt;/p&gt;
&lt;/chapter&gt; &lt;/chapter&gt;
&lt;/EXAMPLE&gt;</pre> &lt;/EXAMPLE&gt;</pre>
<p>The first line specifies that it's an XML document and gives useful <p>The first line specifies that it is an XML document and gives useful
information about its encoding. Then the document is a text format whose information about its encoding. Then the rest of the document is a text format whose
structure is specified by tags between brackets. <strong>Each tag opened has structure is specified by tags between brackets. <strong>Each tag opened has
to be closed</strong>. XML is pedantic about this. However, if a tag is empty to be closed</strong>. XML is pedantic about this. However, if a tag is empty
(no content), a single tag can serve as both the opening and closing tag if (no content), a single tag can serve as both the opening and closing tag if
it ends with <code>/&gt;</code> rather than with <code>&gt;</code>. Note it ends with <code>/&gt;</code> rather than with <code>&gt;</code>. Note
that, for example, the image tag has no content (just an attribute) and is that, for example, the image tag has no content (just an attribute) and is
closed by ending the tag with <code>/&gt;</code>.</p> closed by ending the tag with <code>/&gt;</code>.</p>
<p>XML can be applied successfully to a wide range of uses, from long term <p>XML can be applied successfully to a wide range of tasks, ranging from long term
structured document maintenance (where it follows the steps of SGML) to structured document maintenance (where it follows the steps of SGML) to
simple data encoding mechanisms like configuration file formatting (glade), simple data encoding mechanisms like configuration file formatting (glade),
spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where

View File

@ -93,11 +93,10 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a <a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a
language for transforming XML documents into other XML documents (or language for transforming XML documents into other XML documents (or
HTML/textual output).</p> HTML/textual output).</p>
<p>A separate library called libxslt is being built on top of libxml2. This <p>A separate library called libxslt is being developed on top of libxml2. This
module &quot;libxslt&quot; can be found in the Gnome CVS base too.</p> module &quot;libxslt&quot; too can be found in the Gnome CVS base.</p>
<p>You can check the <a href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> <p>You can check the <a href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a>
supported and the progresses on the <a href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog" name="Changelog">Changelog</a> supported and the progresses on the <a href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog" name="Changelog">Changelog</a>.</p>
</p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -91,17 +91,17 @@ A:link, A:visited, A:active { text-decoration: underline }
of the block interfaces are public. The main components are:</p> of the block interfaces are public. The main components are:</p>
<ul> <ul>
<li>an Input/Output layer</li> <li>an Input/Output layer</li>
<li>FTP and HTTP client layers (optional)</li> <li>FTP and HTTP client layers (optional)</li>
<li>an Internationalization layer managing the encodings support</li> <li>an Internationalization layer managing the encodings support</li>
<li>a URI module</li> <li>a URI module</li>
<li>the XML parser and its basic SAX interface</li> <li>the XML parser and its basic SAX interface</li>
<li>an HTML parser using the same SAX interface (optional)</li> <li>an HTML parser using the same SAX interface (optional)</li>
<li>a SAX tree module to build an in-memory DOM representation</li> <li>a SAX tree module to build an in-memory DOM representation</li>
<li>a tree module to manipulate the DOM representation</li> <li>a tree module to manipulate the DOM representation</li>
<li>a validation module using the DOM representation (optional)</li> <li>a validation module using the DOM representation (optional)</li>
<li>an XPath module for global lookup in a DOM representation <li>an XPath module for global lookup in a DOM representation
(optional)</li> (optional)</li>
<li>a debug module (optional)</li> <li>a debug module (optional)</li>
</ul> </ul>
<p>Graphically this gives the following:</p> <p>Graphically this gives the following:</p>
<p><img src="libxml.gif" alt="a graphical view of the various"></p> <p><img src="libxml.gif" alt="a graphical view of the various"></p>

View File

@ -100,28 +100,26 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
<p>Check the following <strong><span style="color: #FF0000">before <p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p> posting</span></strong>:</p>
<ul> <ul>
<li>read the <a href="FAQ.html">FAQ</a> <li>Read the <a href="FAQ.html">FAQ</a>.</li>
</li> <li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent
<li>make sure you are <a href="ftp://xmlsoft.org/">using a recent version</a>, and that the problem still shows up in a recent version.</li>
version</a>, and that the problem still shows up in those</li> <li>Check the <a href="http://mail.gnome.org/archives/xml/">list
<li>check the <a href="http://mail.gnome.org/archives/xml/">list archives</a> to see if the problem was reported already. In this case
archives</a> to see if the problem was reported already, in this case
there is probably a fix available, similarly check the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">registered there is probably a fix available, similarly check the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">registered
open bugs</a> open bugs</a>.</li>
</li> <li>Make sure you can reproduce the bug with xmllint or one of the test
<li>make sure you can reproduce the bug with xmllint or one of the test programs found in source in the distribution.</li>
programs found in source in the distribution</li> <li>Please send the command showing the error as well as the input (as an
<li>Please send the command showing the error as well as the input (as an
attachment)</li> attachment)</li>
</ul> </ul>
<p>Then send the bug with associated informations to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml <p>Then send the bug with associated informations to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it.. Please do not send me mail directly, it makes related I will approve it.. Please do not send mail to me directly, it makes
things really harder to track and in some cases I'm not the best person to things really hard to track and in some cases I am not the best person to
answer a given question, ask the list instead.</p> answer a given question. Ask the list instead.</p>
<p>Of course, bugs reported with a suggested patch for fixing them will <p>Of course, bugs reported with a suggested patch for fixing them will
probably be processed faster.</p> probably be processed faster than those without.</p>
<p>If you're looking for help, a quick look at <a href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually <p>If you're looking for help, a quick look at <a href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually
provide the answer, I usually send source samples when answering libxml usage provide the answer. I usually send source samples when answering libxml usage
questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated
documentation</a> is not as polished as I would like (i need to learn more documentation</a> is not as polished as I would like (i need to learn more
about DocBook), but it's a good starting point.</p> about DocBook), but it's a good starting point.</p>

View File

@ -90,15 +90,15 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>Table of Content:</p> <p>Table of Content:</p>
<ol> <ol>
<li><a href="General2">General overview</a></li> <li><a href="General2">General overview</a></li>
<li><a href="#definition">The definition</a></li> <li><a href="#definition">The definition</a></li>
<li><a href="#Simple">Using catalogs</a></li> <li><a href="#Simple">Using catalogs</a></li>
<li><a href="#Some">Some examples</a></li> <li><a href="#Some">Some examples</a></li>
<li><a href="#reference">How to tune catalog usage</a></li> <li><a href="#reference">How to tune catalog usage</a></li>
<li><a href="#validate">How to debug catalog processing</a></li> <li><a href="#validate">How to debug catalog processing</a></li>
<li><a href="#Declaring">How to create and maintain catalogs</a></li> <li><a href="#Declaring">How to create and maintain catalogs</a></li>
<li><a href="#implemento">The implementor corner quick review of the <li><a href="#implemento">The implementor corner quick review of the
API</a></li> API</a></li>
<li><a href="#Other">Other resources</a></li> <li><a href="#Other">Other resources</a></li>
</ol> </ol>
<h3><a name="General2">General overview</a></h3> <h3><a name="General2">General overview</a></h3>
<p>What is a catalog? Basically it's a lookup mechanism used when an entity <p>What is a catalog? Basically it's a lookup mechanism used when an entity
@ -113,17 +113,17 @@ started.</p>
concrete name usable for download (and URI). For example it can associate concrete name usable for download (and URI). For example it can associate
the logical name the logical name
<p>&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;</p> <p>&quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;</p>
<p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be <p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be
downloaded</p> downloaded</p>
<p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p> <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
</li> </li>
<li>remapping from a given URL to another one, like an HTTP indirection <li>remapping from a given URL to another one, like an HTTP indirection
saying that saying that
<p>&quot;http://www.oasis-open.org/committes/tr.xsl&quot;</p> <p>&quot;http://www.oasis-open.org/committes/tr.xsl&quot;</p>
<p>should really be looked at</p> <p>should really be looked at</p>
<p>&quot;http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl&quot;</p> <p>&quot;http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl&quot;</p>
</li> </li>
<li>providing a local cache mechanism allowing to load the entities <li>providing a local cache mechanism allowing to load the entities
associated to public identifiers or remote resources, this is a really associated to public identifiers or remote resources, this is a really
important feature for any significant deployment of XML or SGML since it important feature for any significant deployment of XML or SGML since it
allows to avoid the aleas and delays associated to fetching remote allows to avoid the aleas and delays associated to fetching remote
@ -136,7 +136,7 @@ started.</p>
Resolution TR9401:1997, but is better understood by reading <a href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from Resolution TR9401:1997, but is better understood by reading <a href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from
James Clark. This is relatively old and not the preferred mode of James Clark. This is relatively old and not the preferred mode of
operation of libxml.</li> operation of libxml.</li>
<li> <li>
<a href="http://www.oasis-open.org/committees/entity/spec.html">XML <a href="http://www.oasis-open.org/committees/entity/spec.html">XML
Catalogs</a> is far more flexible, more recent, uses an XML syntax and Catalogs</a> is far more flexible, more recent, uses an XML syntax and
should scale quite better. This is the default option of libxml.</li> should scale quite better. This is the default option of libxml.</li>
@ -334,7 +334,7 @@ plug an application specific resolver).</p>
<p>Basically libxml support 2 catalog lists:</p> <p>Basically libxml support 2 catalog lists:</p>
<ul> <ul>
<li>the default one, global shared by all the application</li> <li>the default one, global shared by all the application</li>
<li>a per-document catalog, this one is built if the document uses the <li>a per-document catalog, this one is built if the document uses the
<code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
associated to the parser context and destroyed when the parsing context associated to the parser context and destroyed when the parsing context
is destroyed.</li> is destroyed.</li>
@ -390,28 +390,28 @@ literature to point at:</p>
I don't agree with everything presented. Norm also wrote a more recent I don't agree with everything presented. Norm also wrote a more recent
article <a href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML article <a href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML
entities and URI resolvers</a> describing them.</li> entities and URI resolvers</a> describing them.</li>
<li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML <li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML
catalog proposal</a> from John Cowan</li> catalog proposal</a> from John Cowan</li>
<li>The <a href="http://www.rddl.org/">Resource Directory Description <li>The <a href="http://www.rddl.org/">Resource Directory Description
Language</a> (RDDL) another catalog system but more oriented toward Language</a> (RDDL) another catalog system but more oriented toward
providing metadata for XML namespaces.</li> providing metadata for XML namespaces.</li>
<li>the page from the OASIS Technical <a href="http://www.oasis-open.org/committees/entity/">Committee on Entity <li>the page from the OASIS Technical <a href="http://www.oasis-open.org/committees/entity/">Committee on Entity
Resolution</a> who maintains XML Catalog, you will find pointers to the Resolution</a> who maintains XML Catalog, you will find pointers to the
specification update, some background and pointers to others tools specification update, some background and pointers to others tools
providing XML Catalog support</li> providing XML Catalog support</li>
<li>Here is a <a href="buildDocBookCatalog">shell script</a> to generate <li>Here is a <a href="buildDocBookCatalog">shell script</a> to generate
XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/ XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/
directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
the resources found on the system. Otherwise it will just create the resources found on the system. Otherwise it will just create
~/xmlcatalog and ~/dbkxmlcatalog and doing: ~/xmlcatalog and ~/dbkxmlcatalog and doing:
<p><code>export XMLCATALOG=$HOME/xmlcatalog</code></p> <p><code>export XMLCATALOG=$HOME/xmlcatalog</code></p>
<p>should allow to process DocBook documentations without requiring <p>should allow to process DocBook documentations without requiring
network accesses for the DTD or stylesheets</p> network accesses for the DTD or stylesheets</p>
</li> </li>
<li>I have uploaded <a href="ftp://xmlsoft.org/test/dbk412catalog.tar.gz">a <li>I have uploaded <a href="ftp://xmlsoft.org/test/dbk412catalog.tar.gz">a
small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems
to work fine for me too</li> to work fine for me too</li>
<li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog <li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog
manual page</a> manual page</a>
</li> </li>
</ul> </ul>

View File

@ -91,41 +91,41 @@ A:link, A:visited, A:active { text-decoration: underline }
<li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of <li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
patches, Gary Pennington worked on the validation API, threading support patches, Gary Pennington worked on the validation API, threading support
and Solaris port.</li> and Solaris port.</li>
<li>John Fleck helps maintaining the documentation and man pages.</li> <li>John Fleck helps maintaining the documentation and man pages.</li>
<li> <li>
<a href="mailto:igor@stud.fh-frankfurt.de">Igor Zlatkovic</a> is now <a href="mailto:igor@stud.fh-frankfurt.de">Igor Zlatkovic</a> is now
the maintainer of the Windows port, <a href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he the maintainer of the Windows port, <a href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he
provides binaries</a> provides binaries</a>
</li> </li>
<li> <li>
<a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides <a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides
<a href="http://garypennington.net/libxml2/">Solaris binaries</a> <a href="http://garypennington.net/libxml2/">Solaris binaries</a>
</li> </li>
<li> <li>
<a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt <a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
application server</a> application server</a>
</li> </li>
<li> <li>
<a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions <a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
documentation</li> documentation</li>
<li> <li>
<a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a href="http://xmlsoft.org/messages/0488.html">man pages</a> <a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a href="http://xmlsoft.org/messages/0488.html">man pages</a>
</li> </li>
<li>there is a module for <a href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support <li>there is a module for <a href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
in OpenNSD/AOLServer</a> in OpenNSD/AOLServer</a>
</li> </li>
<li> <li>
<a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the <a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the
first version of libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a> first version of libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>
</li> </li>
<li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue <li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
libxml2</a> with Kylix and Delphi and other Pascal compilers</li> libxml2</a> with Kylix and Delphi and other Pascal compilers</li>
<li> <li>
<a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the <a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the
<a href="http://www.w3.org/Signature/">XML Canonicalization and XML <a href="http://www.w3.org/Signature/">XML Canonicalization and XML
Digital Signature</a><a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a> Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a>
</li> </li>
</ul> </ul>
<p> <p>

View File

@ -87,32 +87,29 @@ A:link, A:visited, A:active { text-decoration: underline }
</table> </table>
</td></tr></table></td> </td></tr></table></td>
<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"> <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
<p>There are some on-line resources about using libxml:</p> <p>There are several on-line resources related to using libxml:</p>
<ol> <ol>
<li>Check the <a href="FAQ.html">FAQ</a> <li>Check the <a href="FAQ.html">FAQ.</a>
</li> </li>
<li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
documentation</a> automatically extracted from code comments (using <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk documentation</a> automatically extracted from code comments (using <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk
doc</a>).</li> doc</a>).</li>
<li>Look at the documentation about <a href="encoding.html">libxml <li>Look at the documentation about <a href="encoding.html">libxml
internationalization support</a> internationalization support</a>.</li>
</li> <li>This page provides a global overview and <a href="example.html">some
<li>This page provides a global overview and <a href="example.html">some
examples</a> on how to use libxml.</li> examples</a> on how to use libxml.</li>
<li>John Fleck's <a href="tutorial/index.html">libxml tutorial</a> <li>John Fleck's <a href="tutorial/index.html">libxml tutorial</a>.</li>
</li> <li>
<li>
<a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice <a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice
documentation</a> explaining how to use the libxml SAX interface.</li> documentation</a> explaining how to use the libxml SAX interface.</li>
<li>George Lebl wrote <a href="http://www-4.ibm.com/software/developer/library/gnome3/">an article <li>George Lebl wrote <a href="http://www-4.ibm.com/software/developer/library/gnome3/">an article
for IBM developerWorks</a> about using libxml.</li> for IBM developerWorks</a> about using libxml.</li>
<li>Check <a href="http://cvs.gnome.org/lxr/source/gnome-xml/TODO">the TODO <li>Check <a href="http://cvs.gnome.org/lxr/source/gnome-xml/TODO">the TODO
file</a> file</a>.</li>
</li> <li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a> description. If you are
<li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a>. If you are
starting a new project using libxml you should really use the 2.x starting a new project using libxml you should really use the 2.x
version.</li> version.</li>
<li>And don't forget to look at the <a href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li> <li>And don't forget to look at the <a href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li>
</ol> </ol>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>

View File

@ -99,10 +99,8 @@ Pennington</a> provides <a href="http://garypennington.net/libxml2/">Solaris
binaries</a>. <a href="mailto:Steve.Ball@zveno.com">Steve Ball</a> provides <a href="http://www.zveno.com/open_source/libxml2xslt.html">Mac Os X binaries</a>.</p> binaries</a>. <a href="mailto:Steve.Ball@zveno.com">Steve Ball</a> provides <a href="http://www.zveno.com/open_source/libxml2xslt.html">Mac Os X binaries</a>.</p>
<p><a name="Snapshot">Snapshot:</a></p> <p><a name="Snapshot">Snapshot:</a></p>
<ul> <ul>
<li>Code from the W3C cvs base libxml <a href="ftp://xmlsoft.org/cvs-snapshot.tar.gz">cvs-snapshot.tar.gz</a> <li>Code from the W3C cvs base libxml <a href="ftp://xmlsoft.org/cvs-snapshot.tar.gz">cvs-snapshot.tar.gz</a>.</li>
</li> <li>Docs, content of the web site, the list archive included <a href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
<li>Docs, content of the web site, the list archive included <a href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a>
</li>
</ul> </ul>
<p><a name="Contribs">Contributions:</a></p> <p><a name="Contribs">Contributions:</a></p>
<p>I do accept external contributions, especially if compiling on another <p>I do accept external contributions, especially if compiling on another
@ -111,10 +109,12 @@ languages have been provided, and can be found in the <a href="contribs.html">co
</p> </p>
<p>Libxml is also available from CVS:</p> <p>Libxml is also available from CVS:</p>
<ul> <ul>
<li><p>The <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome <li>
<p>The <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome
CVS base</a>. Check the <a href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a> CVS base</a>. Check the <a href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a>
page; the CVS module is <b>gnome-xml</b>.</p></li> page; the CVS module is <b>gnome-xml</b>.</p>
<li>The <strong>libxslt</strong> module is also present there</li> </li>
<li>The <strong>libxslt</strong> module is also present there</li>
</ul> </ul>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>

View File

@ -91,11 +91,11 @@ A:link, A:visited, A:active { text-decoration: underline }
<ol> <ol>
<li><a href="encoding.html#What">What does internationalization support <li><a href="encoding.html#What">What does internationalization support
mean ?</a></li> mean ?</a></li>
<li><a href="encoding.html#internal">The internal encoding, how and <li><a href="encoding.html#internal">The internal encoding, how and
why</a></li> why</a></li>
<li><a href="encoding.html#implemente">How is it implemented ?</a></li> <li><a href="encoding.html#implemente">How is it implemented ?</a></li>
<li><a href="encoding.html#Default">Default supported encodings</a></li> <li><a href="encoding.html#Default">Default supported encodings</a></li>
<li><a href="encoding.html#extend">How to extend the existing <li><a href="encoding.html#extend">How to extend the existing
support</a></li> support</a></li>
</ol> </ol>
<h3><a name="What">What does internationalization support mean ?</a></h3> <h3><a name="What">What does internationalization support mean ?</a></h3>
@ -116,10 +116,10 @@ likes for both markup and content:</p>
<p>Having internationalization support in libxml means the following:</p> <p>Having internationalization support in libxml means the following:</p>
<ul> <ul>
<li>the document is properly parsed</li> <li>the document is properly parsed</li>
<li>informations about it's encoding are saved</li> <li>informations about it's encoding are saved</li>
<li>it can be modified</li> <li>it can be modified</li>
<li>it can be saved in its original encoding</li> <li>it can be saved in its original encoding</li>
<li>it can also be saved in another encoding supported by libxml (for <li>it can also be saved in another encoding supported by libxml (for
example straight UTF8 or even an ASCII form)</li> example straight UTF8 or even an ASCII form)</li>
</ul> </ul>
<p>Another very important point is that the whole libxml API, with the <p>Another very important point is that the whole libxml API, with the
@ -150,7 +150,7 @@ rationale for those choices:</p>
client code would have to check it before hand, make sure it's conformant client code would have to check it before hand, make sure it's conformant
to the encoding, etc ... Very hard in practice, though in some specific to the encoding, etc ... Very hard in practice, though in some specific
cases this may make sense.</li> cases this may make sense.</li>
<li>the second decision was which encoding. From the XML spec only UTF8 and <li>the second decision was which encoding. From the XML spec only UTF8 and
UTF16 really makes sense as being the two only encodings for which there UTF16 really makes sense as being the two only encodings for which there
is mandatory support. UCS-4 (32 bits fixed size encoding) could be is mandatory support. UCS-4 (32 bits fixed size encoding) could be
considered an intelligent choice too since it's a direct Unicode mapping considered an intelligent choice too since it's a direct Unicode mapping
@ -167,16 +167,16 @@ rationale for those choices:</p>
caches (main memory/external caches/internal caches) and my take is caches (main memory/external caches/internal caches) and my take is
that this harms the system far more than the CPU requirements needed that this harms the system far more than the CPU requirements needed
for the conversion to UTF-8</li> for the conversion to UTF-8</li>
<li>Most of libxml version 1 users were using it with straight ASCII <li>Most of libxml version 1 users were using it with straight ASCII
most of the time, doing the conversion with an internal encoding most of the time, doing the conversion with an internal encoding
requiring all their code to be rewritten was a serious show-stopper requiring all their code to be rewritten was a serious show-stopper
for using UTF-16 or UCS-4.</li> for using UTF-16 or UCS-4.</li>
<li>UTF-8 is being used as the de-facto internal encoding standard for <li>UTF-8 is being used as the de-facto internal encoding standard for
related code like the <a href="http://www.pango.org/">pango</a> related code like the <a href="http://www.pango.org/">pango</a>
upcoming Gnome text widget, and a lot of Unix code (yep another place upcoming Gnome text widget, and a lot of Unix code (yep another place
where Unix programmer base takes a different approach from Microsoft where Unix programmer base takes a different approach from Microsoft
- they are using UTF-16)</li> - they are using UTF-16)</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<p>What does this mean in practice for the libxml user:</p> <p>What does this mean in practice for the libxml user:</p>
@ -184,7 +184,7 @@ rationale for those choices:</p>
<li>xmlChar, the libxml data type is a byte, those bytes must be assembled <li>xmlChar, the libxml data type is a byte, those bytes must be assembled
as UTF-8 valid strings. The proper way to terminate an xmlChar * string as UTF-8 valid strings. The proper way to terminate an xmlChar * string
is simply to append 0 byte, as usual.</li> is simply to append 0 byte, as usual.</li>
<li>One just need to make sure that when using chars outside the ASCII set, <li>One just need to make sure that when using chars outside the ASCII set,
the values has been properly converted to UTF-8</li> the values has been properly converted to UTF-8</li>
</ul> </ul>
<h3><a name="implemente">How is it implemented ?</a></h3> <h3><a name="implemente">How is it implemented ?</a></h3>
@ -196,10 +196,10 @@ sequence:</p>
<li>when a document is processed, we usually don't know the encoding, a <li>when a document is processed, we usually don't know the encoding, a
simple heuristic allows to detect UTF-18 and UCS-4 from whose where the simple heuristic allows to detect UTF-18 and UCS-4 from whose where the
ASCII range (0-0x7F) maps with ASCII</li> ASCII range (0-0x7F) maps with ASCII</li>
<li>the xml declaration if available is parsed, including the encoding <li>the xml declaration if available is parsed, including the encoding
declaration. At that point, if the autodetected encoding is different declaration. At that point, if the autodetected encoding is different
from the one declared a call to xmlSwitchEncoding() is issued.</li> from the one declared a call to xmlSwitchEncoding() is issued.</li>
<li>If there is no encoding declaration, then the input has to be in either <li>If there is no encoding declaration, then the input has to be in either
UTF-8 or UTF-16, if it is not then at some point when processing the UTF-8 or UTF-16, if it is not then at some point when processing the
input, the converter/checker of UTF-8 form will raise an encoding error. input, the converter/checker of UTF-8 form will raise an encoding error.
You may end-up with a garbled document, or no document at all ! Example: You may end-up with a garbled document, or no document at all ! Example:
@ -210,8 +210,8 @@ err.xml:1: error: Input is not proper UTF-8, indicate encoding !
err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
&lt;tr<EFBFBD>s&gt;l<EFBFBD>&lt;/tr<74>s&gt; &lt;tr<EFBFBD>s&gt;l<EFBFBD>&lt;/tr<74>s&gt;
^</pre> ^</pre>
</li> </li>
<li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and
then search the default registered encoding converters for that encoding. then search the default registered encoding converters for that encoding.
If it's not within the default set and iconv() support has been compiled If it's not within the default set and iconv() support has been compiled
it, it will ask iconv for such an encoder. If this fails then the parser it, it will ask iconv for such an encoder. If this fails then the parser
@ -220,15 +220,15 @@ err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
err2.xml:1: error: Unsupported encoding UnsupportedEnc err2.xml:1: error: Unsupported encoding UnsupportedEnc
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UnsupportedEnc&quot;?&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UnsupportedEnc&quot;?&gt;
^</pre> ^</pre>
</li> </li>
<li>From that point the encoder processes progressively the input (it is <li>From that point the encoder processes progressively the input (it is
plugged as a front-end to the I/O module) for that entity. It captures plugged as a front-end to the I/O module) for that entity. It captures
and convert on-the-fly the document to be parsed to UTF-8. The parser and convert on-the-fly the document to be parsed to UTF-8. The parser
itself just does UTF-8 checking of this input and process it itself just does UTF-8 checking of this input and process it
transparently. The only difference is that the encoding information has transparently. The only difference is that the encoding information has
been added to the parsing context (more precisely to the input been added to the parsing context (more precisely to the input
corresponding to this entity).</li> corresponding to this entity).</li>
<li>The result (when using DOM) is an internal form completely in UTF-8 <li>The result (when using DOM) is an internal form completely in UTF-8
with just an encoding information on the document node.</li> with just an encoding information on the document node.</li>
</ol> </ol>
<p>Ok then what happens when saving the document (assuming you <p>Ok then what happens when saving the document (assuming you
@ -241,16 +241,16 @@ encoding:</p>
associated to the document and if it exists will try to save to that associated to the document and if it exists will try to save to that
encoding, encoding,
<p>otherwise everything is written in the internal form, i.e. UTF-8</p> <p>otherwise everything is written in the internal form, i.e. UTF-8</p>
</li> </li>
<li>so if an encoding was specified, either at the API level or on the <li>so if an encoding was specified, either at the API level or on the
document, libxml will again canonicalize the encoding name, lookup for a document, libxml will again canonicalize the encoding name, lookup for a
converter in the registered set or through iconv. If not found the converter in the registered set or through iconv. If not found the
function will return an error code</li> function will return an error code</li>
<li>the converter is placed before the I/O buffer layer, as another kind of <li>the converter is placed before the I/O buffer layer, as another kind of
buffer, then libxml will simply push the UTF-8 serialization to through buffer, then libxml will simply push the UTF-8 serialization to through
that buffer, which will then progressively be converted and pushed onto that buffer, which will then progressively be converted and pushed onto
the I/O layer.</li> the I/O layer.</li>
<li>It is possible that the converter code fails on some input, for example <li>It is possible that the converter code fails on some input, for example
trying to push an UTF-8 encoded Chinese character through the UTF-8 to trying to push an UTF-8 encoded Chinese character through the UTF-8 to
ISO-8859-1 converter won't work. Since the encoders are progressive they ISO-8859-1 converter won't work. Since the encoders are progressive they
will just report the error and the number of bytes converted, at that will just report the error and the number of bytes converted, at that
@ -283,10 +283,10 @@ detecting such a tag on input. Except for that the processing is the same
(located in encoding.c):</p> (located in encoding.c):</p>
<ol> <ol>
<li>UTF-8 is supported by default (null handlers)</li> <li>UTF-8 is supported by default (null handlers)</li>
<li>UTF-16, both little and big endian</li> <li>UTF-16, both little and big endian</li>
<li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li> <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li>
<li>ASCII, useful mostly for saving</li> <li>ASCII, useful mostly for saving</li>
<li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML <li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML
predefined entities like &amp;copy; for the Copyright sign.</li> predefined entities like &amp;copy; for the Copyright sign.</li>
</ol> </ol>
<p>More over when compiled on an Unix platform with iconv support the full <p>More over when compiled on an Unix platform with iconv support the full
@ -303,9 +303,9 @@ existing encodings. Once registered libxml will automatically lookup the
aliases when handling a document:</p> aliases when handling a document:</p>
<ul> <ul>
<li>int xmlAddEncodingAlias(const char *name, const char *alias);</li> <li>int xmlAddEncodingAlias(const char *name, const char *alias);</li>
<li>int xmlDelEncodingAlias(const char *alias);</li> <li>int xmlDelEncodingAlias(const char *alias);</li>
<li>const char * xmlGetEncodingAlias(const char *alias);</li> <li>const char * xmlGetEncodingAlias(const char *alias);</li>
<li>void xmlCleanupEncodingAliases(void);</li> <li>void xmlCleanupEncodingAliases(void);</li>
</ul> </ul>
<h3><a name="extend">How to extend the existing support</a></h3> <h3><a name="extend">How to extend the existing support</a></h3>
<p>Well adding support for new encoding, or overriding one of the encoders <p>Well adding support for new encoding, or overriding one of the encoders

View File

@ -203,14 +203,14 @@ DEBUG(&quot;parsePerson\n&quot;);
<li>Usually a recursive parsing style is the more convenient one: XML data <li>Usually a recursive parsing style is the more convenient one: XML data
is by nature subject to repetitive constructs and usually exhibits highly is by nature subject to repetitive constructs and usually exhibits highly
structured patterns.</li> structured patterns.</li>
<li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>, <li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>,
i.e. the pointer to the global XML document and the namespace reserved to i.e. the pointer to the global XML document and the namespace reserved to
the application. Document wide information are needed for example to the application. Document wide information are needed for example to
decode entities and it's a good coding practice to define a namespace for decode entities and it's a good coding practice to define a namespace for
your application set of data and test that the element and attributes your application set of data and test that the element and attributes
you're analyzing actually pertains to your application space. This is you're analyzing actually pertains to your application space. This is
done by a simple equality test (cur-&gt;ns == ns).</li> done by a simple equality test (cur-&gt;ns == ns).</li>
<li>To retrieve text and attributes value, you can use the function <li>To retrieve text and attributes value, you can use the function
<em>xmlNodeListGetString</em> to gather all the text and entity reference <em>xmlNodeListGetString</em> to gather all the text and entity reference
nodes generated by the DOM output and produce an single text string.</li> nodes generated by the DOM output and produce an single text string.</li>
</ul> </ul>

View File

@ -89,17 +89,17 @@ A:link, A:visited, A:active { text-decoration: underline }
<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"> <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
<p>You can help the project in various ways, the best thing to do first is to <p>You can help the project in various ways, the best thing to do first is to
subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome bug subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome bug
database:</a>:</p> database</a>:</p>
<ol> <ol>
<li>provide patches when you find problems</li> <li>Provide patches when you find problems.</li>
<li>provide the diffs when you port libxml to a new platform. They may not <li>Provide the diffs when you port libxml to a new platform. They may not
be integrated in all cases but help pinpointing portability problems be integrated in all cases but help pinpointing portability problems
and</li> and</li>
<li>provide documentation fixes (either as patches to the code comments or <li>Provide documentation fixes (either as patches to the code comments or
as HTML diffs).</li> as HTML diffs).</li>
<li>provide new documentations pieces (translations, examples, etc ...)</li> <li>Provide new documentations pieces (translations, examples, etc ...).</li>
<li>Check the TODO file and try to close one of the items</li> <li>Check the TODO file and try to close one of the items.</li>
<li>take one of the points raised in the archive or the bug database and <li>Take one of the points raised in the archive or the bug database and
provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me
</a>before to avoid synchronization problems and check that the suggested </a>before to avoid synchronization problems and check that the suggested
fix will fit in nicely :-)</li> fix will fit in nicely :-)</li>

View File

@ -91,79 +91,79 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>Libxml is the XML C library developed for the Gnome project. XML itself <p>Libxml is the XML C library developed for the Gnome project. XML itself
is a metalanguage to design markup languages, i.e. text language where is a metalanguage to design markup languages, i.e. text language where
semantic and structure are added to the content using extra &quot;markup&quot; semantic and structure are added to the content using extra &quot;markup&quot;
information enclosed between angle bracket. HTML is the most well-known information enclosed between angle brackets. HTML is the most well-known
markup language. Though the library is written in C <a href="python.html">a markup language. Though the library is written in C <a href="python.html">a
variety of language binding</a> makes it available in other environments.</p> variety of language bindings</a> make it available in other environments.</p>
<p>Libxml2 implements a number of existing standards related to markup <p>Libxml2 implements a number of existing standards related to markup
languages:</p> languages:</p>
<ul> <ul>
<li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a> <li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>
</li> </li>
<li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a> <li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a>
</li> </li>
<li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> <li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
</li> </li>
<li> <li>
<a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> : <a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a> Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>
</li> </li>
<li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a> <li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a>
</li> </li>
<li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a> <li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a>
</li> </li>
<li>most of XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a> <li>most of XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a>
</li> </li>
<li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a> <li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a>
</li> </li>
<li>[ISO-8859-1], <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8] <li>[ISO-8859-1], <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a> and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
[UTF-16] core encodings</li> [UTF-16] core encodings</li>
<li>part of SGML Open Technical Resolution TR9401:1997</li> <li>part of SGML Open Technical Resolution TR9401:1997</li>
<li>XML Catalogs Working Draft 06 August 2001: <a 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>XML Catalogs Working Draft 06 August 2001: <a 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> </li>
<li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a> <li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a> and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a>
</li> </li>
</ul> </ul>
<p>In most cases libxml tries to implement the specifications in a relatively <p>In most cases libxml tries to implement the specifications in a relatively
strict way. As of release 2.4.16, libxml2 passes all 1800+ tests from the <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests strictly compliant way. As of release 2.4.16, libxml2 passes all 1800+ tests from the <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
Suite</a>.</p> Suite</a>.</p>
<p>To some extent libxml2 provide some support for the following other <p>To some extent libxml2 provides support for the following additional
specification but don't claim to implement them:</p> specifications but doesn't claim to implement them completely:</p>
<ul> <ul>
<li>Document Object Model (DOM) <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a> <li>Document Object Model (DOM) <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
it doesn't implement the API itself, gdome2 does this in top of it doesn't implement the API itself, gdome2 does this on top of
libxml2</li> libxml2</li>
<li> <li>
<a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> : <a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
libxml implements a basic FTP client code</li> libxml implements a basic FTP client code</li>
<li> <li>
<a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> : <a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
HTTP/1.0, again a basic HTTP client code</li> HTTP/1.0, again a basic HTTP client code</li>
<li>SAX: a minimal SAX implementation compatible with early expat <li>SAX: a minimal SAX implementation compatible with early expat
versions</li> versions</li>
<li>DocBook SGML v4: libxml2 includes a hackish parser to transition to <li>DocBook SGML v4: libxml2 includes a hackish parser to transition to
XML</li> XML</li>
</ul> </ul>
<p>XML Schemas is being worked on but it would be far too early to make any <p>XML Schemas is being worked on but it would be far too early to make any
conformance statement about it at the moment.</p> conformance statement about it at the moment.</p>
<p>Libxml2 is known to be very portable, the library should build and work <p>Libxml2 is known to be very portable, the library should build and work
without serious troubles on a variety of systems (Linux, Unix, Windows, without serious troubles on a variety of systems (Linux, Unix, Windows,
CygWin, MacOs, MacOsX, RISC Os, OS/2, VMS, QNX, MVS, ...)</p> CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)</p>
<p>Separate documents:</p> <p>Separate documents:</p>
<ul> <ul>
<li> <li>
<a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an <a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an
implementation of XSLT 1.0 and common extensions like EXSLT for implementation of XSLT 1.0 and common extensions like EXSLT for
libxml2</li> libxml2</li>
<li> <li>
<a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page</a> <a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page</a>
: a standard DOM2 implementation for libxml2</li> : a standard DOM2 implementation for libxml2</li>
<li> <li>
<a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an <a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an
implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
Digital Signature</a> for libxml2</li> Digital Signature</a> for libxml2</li>
<li>also check the related links section below for more related and active <li>also check the related links section below for more related and active
projects.</li> projects.</li>
</ul> </ul>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>

View File

@ -93,20 +93,20 @@ structured documents/data.</p>
<ul> <ul>
<li>Libxml exports Push (progressive) and Pull (blocking) type parser <li>Libxml exports Push (progressive) and Pull (blocking) type parser
interfaces for both XML and HTML.</li> interfaces for both XML and HTML.</li>
<li>Libxml can do DTD validation at parse time, using a parsed document <li>Libxml can do DTD validation at parse time, using a parsed document
instance, or with an arbitrary DTD.</li> instance, or with an arbitrary DTD.</li>
<li>Libxml includes complete <a href="http://www.w3.org/TR/xpath">XPath</a>, <a href="http://www.w3.org/TR/xptr">XPointer</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a> implementations.</li> <li>Libxml includes complete <a href="http://www.w3.org/TR/xpath">XPath</a>, <a href="http://www.w3.org/TR/xptr">XPointer</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a> implementations.</li>
<li>It is written in plain C, making as few assumptions as possible, and <li>It is written in plain C, making as few assumptions as possible, and
sticking closely to ANSI C/POSIX for easy embedding. Works on sticking closely to ANSI C/POSIX for easy embedding. Works on
Linux/Unix/Windows, ported to a number of other platforms.</li> Linux/Unix/Windows, ported to a number of other platforms.</li>
<li>Basic support for HTTP and FTP client allowing applications to fetch <li>Basic support for HTTP and FTP client allowing applications to fetch
remote resources</li> remote resources.</li>
<li>The design is modular, most of the extensions can be compiled out.</li> <li>The design is modular, most of the extensions can be compiled out.</li>
<li>The internal document representation is as close as possible to the <a href="http://www.w3.org/DOM/">DOM</a> interfaces.</li> <li>The internal document representation is as close as possible to the <a href="http://www.w3.org/DOM/">DOM</a> interfaces.</li>
<li>Libxml also has a <a href="http://www.megginson.com/SAX/index.html">SAX <li>Libxml also has a <a href="http://www.megginson.com/SAX/index.html">SAX
like interface</a>; the interface is designed to be compatible with <a href="http://www.jclark.com/xml/expat.html">Expat</a>.</li> like interface</a>; the interface is designed to be compatible with <a href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
<li>This library is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT <li>This library is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a> see the Copyright file in the distribution for the precise License</a>. See the Copyright file in the distribution for the precise
wording.</li> wording.</li>
</ul> </ul>
<p>Warning: unless you are forced to because your application links with a <p>Warning: unless you are forced to because your application links with a

View File

@ -103,12 +103,16 @@ documents either from in-memory strings or from files. The functions are
defined in &quot;parser.h&quot;:</p> defined in &quot;parser.h&quot;:</p>
<dl> <dl>
<dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt> <dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
<dd><p>Parse a null-terminated string containing the document.</p></dd> <dd>
<p>Parse a null-terminated string containing the document.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt> <dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt>
<dd><p>Parse an XML document contained in a (possibly compressed) <dd>
file.</p></dd> <p>Parse an XML document contained in a (possibly compressed)
file.</p>
</dd>
</dl> </dl>
<p>The parser returns a pointer to the document structure (or NULL in case of <p>The parser returns a pointer to the document structure (or NULL in case of
failure).</p> failure).</p>
@ -200,52 +204,66 @@ is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
<dl> <dl>
<dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
xmlChar *value);</code></dt> xmlChar *value);</code></dt>
<dd><p>This sets (or changes) an attribute carried by an ELEMENT node. <dd>
The value can be NULL.</p></dd> <p>This sets (or changes) an attribute carried by an ELEMENT node.
The value can be NULL.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar
*name);</code></dt> *name);</code></dt>
<dd><p>This function returns a pointer to new copy of the property <dd>
content. Note that the user must deallocate the result.</p></dd> <p>This function returns a pointer to new copy of the property
content. Note that the user must deallocate the result.</p>
</dd>
</dl> </dl>
<p>Two functions are provided for reading and writing the text associated <p>Two functions are provided for reading and writing the text associated
with elements:</p> with elements:</p>
<dl> <dl>
<dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
*value);</code></dt> *value);</code></dt>
<dd><p>This function takes an &quot;external&quot; string and converts it to one <dd>
<p>This function takes an &quot;external&quot; string and converts it to one
text node or possibly to a list of entity and text nodes. All text node or possibly to a list of entity and text nodes. All
non-predefined entity references like &amp;Gnome; will be stored non-predefined entity references like &amp;Gnome; will be stored
internally as entity nodes, hence the result of the function may not be internally as entity nodes, hence the result of the function may not be
a single node.</p></dd> a single node.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int
inLine);</code></dt> inLine);</code></dt>
<dd><p>This function is the inverse of <dd>
<p>This function is the inverse of
<code>xmlStringGetNodeList()</code>. It generates a new string <code>xmlStringGetNodeList()</code>. It generates a new string
containing the content of the text and entity nodes. Note the extra containing the content of the text and entity nodes. Note the extra
argument inLine. If this argument is set to 1, the function will expand argument inLine. If this argument is set to 1, the function will expand
entity references. For example, instead of returning the &amp;Gnome; entity references. For example, instead of returning the &amp;Gnome;
XML encoding in the string, it will substitute it with its value (say, XML encoding in the string, it will substitute it with its value (say,
&quot;GNU Network Object Model Environment&quot;).</p></dd> &quot;GNU Network Object Model Environment&quot;).</p>
</dd>
</dl> </dl>
<h3><a name="Saving">Saving a tree</a></h3> <h3><a name="Saving">Saving a tree</a></h3>
<p>Basically 3 options are possible:</p> <p>Basically 3 options are possible:</p>
<dl> <dl>
<dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int
*size);</code></dt> *size);</code></dt>
<dd><p>Returns a buffer into which the document has been saved.</p></dd> <dd>
<p>Returns a buffer into which the document has been saved.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt> <dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt>
<dd><p>Dumps a document to an open file descriptor.</p></dd> <dd>
<p>Dumps a document to an open file descriptor.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt> <dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt>
<dd><p>Saves the document to a file. In this case, the compression <dd>
interface is triggered if it has been turned on.</p></dd> <p>Saves the document to a file. In this case, the compression
interface is triggered if it has been turned on.</p>
</dd>
</dl> </dl>
<h3><a name="Compressio">Compression</a></h3> <h3><a name="Compressio">Compression</a></h3>
<p>The library transparently handles compression when doing file-based <p>The library transparently handles compression when doing file-based
@ -253,19 +271,27 @@ accesses. The level of compression on saves can be turned on either globally
or individually for one file:</p> or individually for one file:</p>
<dl> <dl>
<dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt> <dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt>
<dd><p>Gets the document compression ratio (0-9).</p></dd> <dd>
<p>Gets the document compression ratio (0-9).</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt> <dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt>
<dd><p>Sets the document compression ratio.</p></dd> <dd>
<p>Sets the document compression ratio.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>int xmlGetCompressMode(void);</code></dt> <dt><code>int xmlGetCompressMode(void);</code></dt>
<dd><p>Gets the default compression ratio.</p></dd> <dd>
<p>Gets the default compression ratio.</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt><code>void xmlSetCompressMode(int mode);</code></dt> <dt><code>void xmlSetCompressMode(int mode);</code></dt>
<dd><p>Sets the default compression ratio.</p></dd> <dd>
<p>Sets the default compression ratio.</p>
</dd>
</dl> </dl>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>

View File

@ -91,30 +91,32 @@ A:link, A:visited, A:active { text-decoration: underline }
for a really accurate description</h3> for a really accurate description</h3>
<p>Items not finished and worked on, get in touch with the list if you want <p>Items not finished and worked on, get in touch with the list if you want
to test those</p> to test those</p>
<ul><li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML <ul>
<li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a> Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a>
</li></ul> </li>
</ul>
<h3>2.4.23: July 6 2002</h3> <h3>2.4.23: July 6 2002</h3>
<ul> <ul>
<li>performances patches: Peter Jacobi</li> <li>performances patches: Peter Jacobi</li>
<li>c14n fixes, testsuite and performances: Aleksey Sanin</li> <li>c14n fixes, testsuite and performances: Aleksey Sanin</li>
<li>added xmlDocFormatDump: Chema Celorio</li> <li>added xmlDocFormatDump: Chema Celorio</li>
<li>new tutorial: John Fleck</li> <li>new tutorial: John Fleck</li>
<li>new hash functions and performances: Sander Vesik, portability fix from <li>new hash functions and performances: Sander Vesik, portability fix from
Peter Jacobi</li> Peter Jacobi</li>
<li>a number of bug fixes: XPath (William Brack, Richard Jinks), XML and <li>a number of bug fixes: XPath (William Brack, Richard Jinks), XML and
HTML parsers, ID lookup function</li> HTML parsers, ID lookup function</li>
<li>removal of all remaining sprintf: Aleksey Sanin</li> <li>removal of all remaining sprintf: Aleksey Sanin</li>
</ul> </ul>
<h3>2.4.22: May 27 2002</h3> <h3>2.4.22: May 27 2002</h3>
<ul> <ul>
<li>a number of bug fixes: configure scripts, base handling, parser, memory <li>a number of bug fixes: configure scripts, base handling, parser, memory
usage, HTML parser, XPath, documentation (Christian Cornelssen), usage, HTML parser, XPath, documentation (Christian Cornelssen),
indentation, URI parsing</li> indentation, URI parsing</li>
<li>Optimizations for XMLSec, fixing and making public some of the network <li>Optimizations for XMLSec, fixing and making public some of the network
protocol handlers (Aleksey)</li> protocol handlers (Aleksey)</li>
<li>performance patch from Gary Pennington</li> <li>performance patch from Gary Pennington</li>
<li>Charles Bozeman provided date and time support for XML Schemas <li>Charles Bozeman provided date and time support for XML Schemas
datatypes</li> datatypes</li>
</ul> </ul>
<h3>2.4.21: Apr 29 2002</h3> <h3>2.4.21: Apr 29 2002</h3>
@ -125,298 +127,302 @@ progress and don't even think of putting this code in a production system,
it's actually not compiled in by default. The real fixes are:</p> it's actually not compiled in by default. The real fixes are:</p>
<ul> <ul>
<li>a couple of bugs or limitations introduced in 2.4.20</li> <li>a couple of bugs or limitations introduced in 2.4.20</li>
<li>patches for Borland C++ and MSC by Igor</li> <li>patches for Borland C++ and MSC by Igor</li>
<li>some fixes on XPath strings and conformance patches by Richard <li>some fixes on XPath strings and conformance patches by Richard
Jinks</li> Jinks</li>
<li>patch from Aleksey for the ExcC14N specification</li> <li>patch from Aleksey for the ExcC14N specification</li>
<li>OSF/1 bug fix by Bjorn</li> <li>OSF/1 bug fix by Bjorn</li>
</ul> </ul>
<h3>2.4.20: Apr 15 2002</h3> <h3>2.4.20: Apr 15 2002</h3>
<ul> <ul>
<li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li> <li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li>
<li>XPath conformance testing by Richard Jinks</li> <li>XPath conformance testing by Richard Jinks</li>
<li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings, <li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings,
libxml.m4</li> libxml.m4</li>
</ul> </ul>
<h3>2.4.19: Mar 25 2002</h3> <h3>2.4.19: Mar 25 2002</h3>
<ul> <ul>
<li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8 <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
encoder</li> encoder</li>
<li>portability fixes in the HTTP code</li> <li>portability fixes in the HTTP code</li>
<li>memory allocation checks using valgrind, and profiling tests</li> <li>memory allocation checks using valgrind, and profiling tests</li>
<li>revamp of the Windows build and Makefiles</li> <li>revamp of the Windows build and Makefiles</li>
</ul> </ul>
<h3>2.4.18: Mar 18 2002</h3> <h3>2.4.18: Mar 18 2002</h3>
<ul> <ul>
<li>bug fixes: tree, SAX, canonicalization, validation, portability, <li>bug fixes: tree, SAX, canonicalization, validation, portability,
XPath</li> XPath</li>
<li>removed the --with-buffer option it was becoming unmaintainable</li> <li>removed the --with-buffer option it was becoming unmaintainable</li>
<li>serious cleanup of the Python makefiles</li> <li>serious cleanup of the Python makefiles</li>
<li>speedup patch to XPath very effective for DocBook stylesheets</li> <li>speedup patch to XPath very effective for DocBook stylesheets</li>
<li>Fixes for Windows build, cleanup of the documentation</li> <li>Fixes for Windows build, cleanup of the documentation</li>
</ul> </ul>
<h3>2.4.17: Mar 8 2002</h3> <h3>2.4.17: Mar 8 2002</h3>
<ul> <ul>
<li>a lot of bug fixes, including &quot;namespace nodes have no parents in <li>a lot of bug fixes, including &quot;namespace nodes have no parents in
XPath&quot;</li> XPath&quot;</li>
<li>fixed/improved the Python wrappers, added more examples and more <li>fixed/improved the Python wrappers, added more examples and more
regression tests, XPath extension functions can now return node-sets</li> regression tests, XPath extension functions can now return node-sets</li>
<li>added the XML Canonicalization support from Aleksey Sanin</li> <li>added the XML Canonicalization support from Aleksey Sanin</li>
</ul> </ul>
<h3>2.4.16: Feb 20 2002</h3> <h3>2.4.16: Feb 20 2002</h3>
<ul> <ul>
<li>a lot of bug fixes, most of them were triggered by the XML Testsuite <li>a lot of bug fixes, most of them were triggered by the XML Testsuite
from OASIS and W3C. Compliance has been significantly improved.</li> from OASIS and W3C. Compliance has been significantly improved.</li>
<li>a couple of portability fixes too.</li> <li>a couple of portability fixes too.</li>
</ul> </ul>
<h3>2.4.15: Feb 11 2002</h3> <h3>2.4.15: Feb 11 2002</h3>
<ul> <ul>
<li>Fixed the Makefiles, especially the python module ones</li> <li>Fixed the Makefiles, especially the python module ones</li>
<li>A few bug fixes and cleanup</li> <li>A few bug fixes and cleanup</li>
<li>Includes cleanup</li> <li>Includes cleanup</li>
</ul> </ul>
<h3>2.4.14: Feb 8 2002</h3> <h3>2.4.14: Feb 8 2002</h3>
<ul> <ul>
<li>Change of License to the <a href="http://www.opensource.org/licenses/mit-license.html">MIT <li>Change of License to the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a> basically for integration in XFree86 codebase, and removing License</a> basically for integration in XFree86 codebase, and removing
confusion around the previous dual-licensing</li> confusion around the previous dual-licensing</li>
<li>added Python bindings, beta software but should already be quite <li>added Python bindings, beta software but should already be quite
complete</li> complete</li>
<li>a large number of fixes and cleanups, especially for all tree <li>a large number of fixes and cleanups, especially for all tree
manipulations</li> manipulations</li>
<li>cleanup of the headers, generation of a reference API definition in <li>cleanup of the headers, generation of a reference API definition in
XML</li> XML</li>
</ul> </ul>
<h3>2.4.13: Jan 14 2002</h3> <h3>2.4.13: Jan 14 2002</h3>
<ul> <ul>
<li>update of the documentation: John Fleck and Charlie Bozeman</li> <li>update of the documentation: John Fleck and Charlie Bozeman</li>
<li>cleanup of timing code from Justin Fletcher</li> <li>cleanup of timing code from Justin Fletcher</li>
<li>fixes for Windows and initial thread support on Win32: Igor and Serguei <li>fixes for Windows and initial thread support on Win32: Igor and Serguei
Narojnyi</li> Narojnyi</li>
<li>Cygwin patch from Robert Collins</li> <li>Cygwin patch from Robert Collins</li>
<li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li> <li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li>
</ul> </ul>
<h3>2.4.12: Dec 7 2001</h3> <h3>2.4.12: Dec 7 2001</h3>
<ul> <ul>
<li>a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman), <li>a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman),
XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups
(robert)</li> (robert)</li>
<li>Eric Lavigne contributed project files for MacOS</li> <li>Eric Lavigne contributed project files for MacOS</li>
<li>some makefiles cleanups</li> <li>some makefiles cleanups</li>
</ul> </ul>
<h3>2.4.11: Nov 26 2001</h3> <h3>2.4.11: Nov 26 2001</h3>
<ul> <ul>
<li>fixed a couple of errors in the includes, fixed a few bugs, some code <li>fixed a couple of errors in the includes, fixed a few bugs, some code
cleanups</li> cleanups</li>
<li>xmllint man pages improvement by Heiko Rupp</li> <li>xmllint man pages improvement by Heiko Rupp</li>
<li>updated VMS build instructions from John A Fotheringham</li> <li>updated VMS build instructions from John A Fotheringham</li>
<li>Windows Makefiles updates from Igor</li> <li>Windows Makefiles updates from Igor</li>
</ul> </ul>
<h3>2.4.10: Nov 10 2001</h3> <h3>2.4.10: Nov 10 2001</h3>
<ul> <ul>
<li>URI escaping fix (Joel Young)</li> <li>URI escaping fix (Joel Young)</li>
<li>added xmlGetNodePath() (for paths or XPointers generation)</li> <li>added xmlGetNodePath() (for paths or XPointers generation)</li>
<li>Fixes namespace handling problems when using DTD and validation</li> <li>Fixes namespace handling problems when using DTD and validation</li>
<li>improvements on xmllint: Morus Walter patches for --format and <li>improvements on xmllint: Morus Walter patches for --format and
--encode, Stefan Kost and Heiko Rupp improvements on the --shell</li> --encode, Stefan Kost and Heiko Rupp improvements on the --shell</li>
<li>fixes for xmlcatalog linking pointed by Weiqi Gao</li> <li>fixes for xmlcatalog linking pointed by Weiqi Gao</li>
<li>fixes to the HTML parser</li> <li>fixes to the HTML parser</li>
</ul> </ul>
<h3>2.4.9: Nov 6 2001</h3> <h3>2.4.9: Nov 6 2001</h3>
<ul> <ul>
<li>fixes more catalog bugs</li> <li>fixes more catalog bugs</li>
<li>avoid a compilation problem, improve xmlGetLineNo()</li> <li>avoid a compilation problem, improve xmlGetLineNo()</li>
</ul> </ul>
<h3>2.4.8: Nov 4 2001</h3> <h3>2.4.8: Nov 4 2001</h3>
<ul> <ul>
<li>fixed SGML catalogs broken in previous release, updated xmlcatalog <li>fixed SGML catalogs broken in previous release, updated xmlcatalog
tool</li> tool</li>
<li>fixed a compile errors and some includes troubles.</li> <li>fixed a compile errors and some includes troubles.</li>
</ul> </ul>
<h3>2.4.7: Oct 30 2001</h3> <h3>2.4.7: Oct 30 2001</h3>
<ul> <ul>
<li>exported some debugging interfaces</li> <li>exported some debugging interfaces</li>
<li>serious rewrite of the catalog code</li> <li>serious rewrite of the catalog code</li>
<li>integrated Gary Pennington thread safety patch, added configure option <li>integrated Gary Pennington thread safety patch, added configure option
and regression tests</li> and regression tests</li>
<li>removed an HTML parser bug</li> <li>removed an HTML parser bug</li>
<li>fixed a couple of potentially serious validation bugs</li> <li>fixed a couple of potentially serious validation bugs</li>
<li>integrated the SGML DocBook support in xmllint</li> <li>integrated the SGML DocBook support in xmllint</li>
<li>changed the nanoftp anonymous login passwd</li> <li>changed the nanoftp anonymous login passwd</li>
<li>some I/O cleanup and a couple of interfaces for Perl wrapper</li> <li>some I/O cleanup and a couple of interfaces for Perl wrapper</li>
<li>general bug fixes</li> <li>general bug fixes</li>
<li>updated xmllint man page by John Fleck</li> <li>updated xmllint man page by John Fleck</li>
<li>some VMS and Windows updates</li> <li>some VMS and Windows updates</li>
</ul> </ul>
<h3>2.4.6: Oct 10 2001</h3> <h3>2.4.6: Oct 10 2001</h3>
<ul> <ul>
<li>added an updated man pages by John Fleck</li> <li>added an updated man pages by John Fleck</li>
<li>portability and configure fixes</li> <li>portability and configure fixes</li>
<li>an infinite loop on the HTML parser was removed (William)</li> <li>an infinite loop on the HTML parser was removed (William)</li>
<li>Windows makefile patches from Igor</li> <li>Windows makefile patches from Igor</li>
<li>fixed half a dozen bugs reported for libxml or libxslt</li> <li>fixed half a dozen bugs reported for libxml or libxslt</li>
<li>updated xmlcatalog to be able to modify SGML super catalogs</li> <li>updated xmlcatalog to be able to modify SGML super catalogs</li>
</ul> </ul>
<h3>2.4.5: Sep 14 2001</h3> <h3>2.4.5: Sep 14 2001</h3>
<ul> <ul>
<li>Remove a few annoying bugs in 2.4.4</li> <li>Remove a few annoying bugs in 2.4.4</li>
<li>forces the HTML serializer to output decimal charrefs since some <li>forces the HTML serializer to output decimal charrefs since some
version of Netscape can't handle hexadecimal ones</li> version of Netscape can't handle hexadecimal ones</li>
</ul> </ul>
<h3>1.8.16: Sep 14 2001</h3> <h3>1.8.16: Sep 14 2001</h3>
<ul><li>maintenance release of the old libxml1 branch, couple of bug and <ul>
portability fixes</li></ul> <li>maintenance release of the old libxml1 branch, couple of bug and
portability fixes</li>
</ul>
<h3>2.4.4: Sep 12 2001</h3> <h3>2.4.4: Sep 12 2001</h3>
<ul> <ul>
<li>added --convert to xmlcatalog, bug fixes and cleanups of XML <li>added --convert to xmlcatalog, bug fixes and cleanups of XML
Catalog</li> Catalog</li>
<li>a few bug fixes and some portability changes</li> <li>a few bug fixes and some portability changes</li>
<li>some documentation cleanups</li> <li>some documentation cleanups</li>
</ul> </ul>
<h3>2.4.3: Aug 23 2001</h3> <h3>2.4.3: Aug 23 2001</h3>
<ul> <ul>
<li>XML Catalog support see the doc</li> <li>XML Catalog support see the doc</li>
<li>New NaN/Infinity floating point code</li> <li>New NaN/Infinity floating point code</li>
<li>A few bug fixes</li> <li>A few bug fixes</li>
</ul> </ul>
<h3>2.4.2: Aug 15 2001</h3> <h3>2.4.2: Aug 15 2001</h3>
<ul> <ul>
<li>adds xmlLineNumbersDefault() to control line number generation</li> <li>adds xmlLineNumbersDefault() to control line number generation</li>
<li>lot of bug fixes</li> <li>lot of bug fixes</li>
<li>the Microsoft MSC projects files should now be up to date</li> <li>the Microsoft MSC projects files should now be up to date</li>
<li>inheritance of namespaces from DTD defaulted attributes</li> <li>inheritance of namespaces from DTD defaulted attributes</li>
<li>fixes a serious potential security bug</li> <li>fixes a serious potential security bug</li>
<li>added a --format option to xmllint</li> <li>added a --format option to xmllint</li>
</ul> </ul>
<h3>2.4.1: July 24 2001</h3> <h3>2.4.1: July 24 2001</h3>
<ul> <ul>
<li>possibility to keep line numbers in the tree</li> <li>possibility to keep line numbers in the tree</li>
<li>some computation NaN fixes</li> <li>some computation NaN fixes</li>
<li>extension of the XPath API</li> <li>extension of the XPath API</li>
<li>cleanup for alpha and ia64 targets</li> <li>cleanup for alpha and ia64 targets</li>
<li>patch to allow saving through HTTP PUT or POST</li> <li>patch to allow saving through HTTP PUT or POST</li>
</ul> </ul>
<h3>2.4.0: July 10 2001</h3> <h3>2.4.0: July 10 2001</h3>
<ul> <ul>
<li>Fixed a few bugs in XPath, validation, and tree handling.</li> <li>Fixed a few bugs in XPath, validation, and tree handling.</li>
<li>Fixed XML Base implementation, added a couple of examples to the <li>Fixed XML Base implementation, added a couple of examples to the
regression tests</li> regression tests</li>
<li>A bit of cleanup</li> <li>A bit of cleanup</li>
</ul> </ul>
<h3>2.3.14: July 5 2001</h3> <h3>2.3.14: July 5 2001</h3>
<ul> <ul>
<li>fixed some entities problems and reduce memory requirement when <li>fixed some entities problems and reduce memory requirement when
substituting them</li> substituting them</li>
<li>lots of improvements in the XPath queries interpreter can be <li>lots of improvements in the XPath queries interpreter can be
substantially faster</li> substantially faster</li>
<li>Makefiles and configure cleanups</li> <li>Makefiles and configure cleanups</li>
<li>Fixes to XPath variable eval, and compare on empty node set</li> <li>Fixes to XPath variable eval, and compare on empty node set</li>
<li>HTML tag closing bug fixed</li> <li>HTML tag closing bug fixed</li>
<li>Fixed an URI reference computation problem when validating</li> <li>Fixed an URI reference computation problem when validating</li>
</ul> </ul>
<h3>2.3.13: June 28 2001</h3> <h3>2.3.13: June 28 2001</h3>
<ul> <ul>
<li>2.3.12 configure.in was broken as well as the push mode XML parser</li> <li>2.3.12 configure.in was broken as well as the push mode XML parser</li>
<li>a few more fixes for compilation on Windows MSC by Yon Derek</li> <li>a few more fixes for compilation on Windows MSC by Yon Derek</li>
</ul> </ul>
<h3>1.8.14: June 28 2001</h3> <h3>1.8.14: June 28 2001</h3>
<ul> <ul>
<li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li> <li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li>
<li>Small Makefile fix</li> <li>Small Makefile fix</li>
</ul> </ul>
<h3>2.3.12: June 26 2001</h3> <h3>2.3.12: June 26 2001</h3>
<ul> <ul>
<li>lots of cleanup</li> <li>lots of cleanup</li>
<li>a couple of validation fix</li> <li>a couple of validation fix</li>
<li>fixed line number counting</li> <li>fixed line number counting</li>
<li>fixed serious problems in the XInclude processing</li> <li>fixed serious problems in the XInclude processing</li>
<li>added support for UTF8 BOM at beginning of entities</li> <li>added support for UTF8 BOM at beginning of entities</li>
<li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0 <li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
miscompile uri.c (William), Thomas Leitner provided a fix for the miscompile uri.c (William), Thomas Leitner provided a fix for the
optimizer on Tru64</li> optimizer on Tru64</li>
<li>incorporated Yon Derek and Igor Zlatkovic fixes and improvements for <li>incorporated Yon Derek and Igor Zlatkovic fixes and improvements for
compilation on Windows MSC</li> compilation on Windows MSC</li>
<li>update of libxml-doc.el (Felix Natter)</li> <li>update of libxml-doc.el (Felix Natter)</li>
<li>fixed 2 bugs in URI normalization code</li> <li>fixed 2 bugs in URI normalization code</li>
</ul> </ul>
<h3>2.3.11: June 17 2001</h3> <h3>2.3.11: June 17 2001</h3>
<ul> <ul>
<li>updates to trio, Makefiles and configure should fix some portability <li>updates to trio, Makefiles and configure should fix some portability
problems (alpha)</li> problems (alpha)</li>
<li>fixed some HTML serialization problems (pre, script, and block/inline <li>fixed some HTML serialization problems (pre, script, and block/inline
handling), added encoding aware APIs, cleanup of this code</li> handling), added encoding aware APIs, cleanup of this code</li>
<li>added xmlHasNsProp()</li> <li>added xmlHasNsProp()</li>
<li>implemented a specific PI for encoding support in the DocBook SGML <li>implemented a specific PI for encoding support in the DocBook SGML
parser</li> parser</li>
<li>some XPath fixes (-Infinity, / as a function parameter and namespaces <li>some XPath fixes (-Infinity, / as a function parameter and namespaces
node selection)</li> node selection)</li>
<li>fixed a performance problem and an error in the validation code</li> <li>fixed a performance problem and an error in the validation code</li>
<li>fixed XInclude routine to implement the recursive behaviour</li> <li>fixed XInclude routine to implement the recursive behaviour</li>
<li>fixed xmlFreeNode problem when libxml is included statically twice</li> <li>fixed xmlFreeNode problem when libxml is included statically twice</li>
<li>added --version to xmllint for bug reports</li> <li>added --version to xmllint for bug reports</li>
</ul> </ul>
<h3>2.3.10: June 1 2001</h3> <h3>2.3.10: June 1 2001</h3>
<ul> <ul>
<li>fixed the SGML catalog support</li> <li>fixed the SGML catalog support</li>
<li>a number of reported bugs got fixed, in XPath, iconv detection, <li>a number of reported bugs got fixed, in XPath, iconv detection,
XInclude processing</li> XInclude processing</li>
<li>XPath string function should now handle unicode correctly</li> <li>XPath string function should now handle unicode correctly</li>
</ul> </ul>
<h3>2.3.9: May 19 2001</h3> <h3>2.3.9: May 19 2001</h3>
<p>Lots of bugfixes, and added a basic SGML catalog support:</p> <p>Lots of bugfixes, and added a basic SGML catalog support:</p>
<ul> <ul>
<li>HTML push bugfix #54891 and another patch from Jonas Borgstr<74>m</li> <li>HTML push bugfix #54891 and another patch from Jonas Borgstr<74>m</li>
<li>some serious speed optimization again</li> <li>some serious speed optimization again</li>
<li>some documentation cleanups</li> <li>some documentation cleanups</li>
<li>trying to get better linking on Solaris (-R)</li> <li>trying to get better linking on Solaris (-R)</li>
<li>XPath API cleanup from Thomas Broyer</li> <li>XPath API cleanup from Thomas Broyer</li>
<li>Validation bug fixed #54631, added a patch from Gary Pennington, fixed <li>Validation bug fixed #54631, added a patch from Gary Pennington, fixed
xmlValidGetValidElements()</li> xmlValidGetValidElements()</li>
<li>Added an INSTALL file</li> <li>Added an INSTALL file</li>
<li>Attribute removal added to API: #54433</li> <li>Attribute removal added to API: #54433</li>
<li>added a basic support for SGML catalogs</li> <li>added a basic support for SGML catalogs</li>
<li>fixed xmlKeepBlanksDefault(0) API</li> <li>fixed xmlKeepBlanksDefault(0) API</li>
<li>bugfix in xmlNodeGetLang()</li> <li>bugfix in xmlNodeGetLang()</li>
<li>fixed a small configure portability problem</li> <li>fixed a small configure portability problem</li>
<li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li> <li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li>
</ul> </ul>
<h3>1.8.13: May 14 2001</h3> <h3>1.8.13: May 14 2001</h3>
<ul><li>bugfixes release of the old libxml1 branch used by Gnome</li></ul> <ul>
<li>bugfixes release of the old libxml1 branch used by Gnome</li>
</ul>
<h3>2.3.8: May 3 2001</h3> <h3>2.3.8: May 3 2001</h3>
<ul> <ul>
<li>Integrated an SGML DocBook parser for the Gnome project</li> <li>Integrated an SGML DocBook parser for the Gnome project</li>
<li>Fixed a few things in the HTML parser</li> <li>Fixed a few things in the HTML parser</li>
<li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating <li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating
point portability issue</li> point portability issue</li>
<li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for
DOM+validation using the XML REC as input and a 700MHz celeron).</li> DOM+validation using the XML REC as input and a 700MHz celeron).</li>
<li>incorporated more Windows cleanup</li> <li>incorporated more Windows cleanup</li>
<li>added xmlSaveFormatFile()</li> <li>added xmlSaveFormatFile()</li>
<li>fixed problems in copying nodes with entities references (gdome)</li> <li>fixed problems in copying nodes with entities references (gdome)</li>
<li>removed some troubles surrounding the new validation module</li> <li>removed some troubles surrounding the new validation module</li>
</ul> </ul>
<h3>2.3.7: April 22 2001</h3> <h3>2.3.7: April 22 2001</h3>
<ul> <ul>
<li>lots of small bug fixes, corrected XPointer</li> <li>lots of small bug fixes, corrected XPointer</li>
<li>Non deterministic content model validation support</li> <li>Non deterministic content model validation support</li>
<li>added xmlDocCopyNode for gdome2</li> <li>added xmlDocCopyNode for gdome2</li>
<li>revamped the way the HTML parser handles end of tags</li> <li>revamped the way the HTML parser handles end of tags</li>
<li>XPath: corrections of namespaces support and number formatting</li> <li>XPath: corrections of namespaces support and number formatting</li>
<li>Windows: Igor Zlatkovic patches for MSC compilation</li> <li>Windows: Igor Zlatkovic patches for MSC compilation</li>
<li>HTML output fixes from P C Chow and William M. Brack</li> <li>HTML output fixes from P C Chow and William M. Brack</li>
<li>Improved validation speed sensible for DocBook</li> <li>Improved validation speed sensible for DocBook</li>
<li>fixed a big bug with ID declared in external parsed entities</li> <li>fixed a big bug with ID declared in external parsed entities</li>
<li>portability fixes, update of Trio from Bjorn Reese</li> <li>portability fixes, update of Trio from Bjorn Reese</li>
</ul> </ul>
<h3>2.3.6: April 8 2001</h3> <h3>2.3.6: April 8 2001</h3>
<ul> <ul>
<li>Code cleanup using extreme gcc compiler warning options, found and <li>Code cleanup using extreme gcc compiler warning options, found and
cleared half a dozen potential problem</li> cleared half a dozen potential problem</li>
<li>the Eazel team found an XML parser bug</li> <li>the Eazel team found an XML parser bug</li>
<li>cleaned up the user of some of the string formatting function. used the <li>cleaned up the user of some of the string formatting function. used the
trio library code to provide the one needed when the platform is missing trio library code to provide the one needed when the platform is missing
them</li> them</li>
<li>xpath: removed a memory leak and fixed the predicate evaluation <li>xpath: removed a memory leak and fixed the predicate evaluation
problem, extended the testsuite and cleaned up the result. XPointer seems problem, extended the testsuite and cleaned up the result. XPointer seems
broken ...</li> broken ...</li>
</ul> </ul>
@ -424,193 +430,197 @@ it's actually not compiled in by default. The real fixes are:</p>
<ul> <ul>
<li>Biggest change is separate parsing and evaluation of XPath expressions, <li>Biggest change is separate parsing and evaluation of XPath expressions,
there is some new APIs for this too</li> there is some new APIs for this too</li>
<li>included a number of bug fixes(XML push parser, 51876, notations, <li>included a number of bug fixes(XML push parser, 51876, notations,
52299)</li> 52299)</li>
<li>Fixed some portability issues</li> <li>Fixed some portability issues</li>
</ul> </ul>
<h3>2.3.4: Mar 10 2001</h3> <h3>2.3.4: Mar 10 2001</h3>
<ul> <ul>
<li>Fixed bugs #51860 and #51861</li> <li>Fixed bugs #51860 and #51861</li>
<li>Added a global variable xmlDefaultBufferSize to allow default buffer <li>Added a global variable xmlDefaultBufferSize to allow default buffer
size to be application tunable.</li> size to be application tunable.</li>
<li>Some cleanup in the validation code, still a bug left and this part <li>Some cleanup in the validation code, still a bug left and this part
should probably be rewritten to support ambiguous content model :-\</li> should probably be rewritten to support ambiguous content model :-\</li>
<li>Fix a couple of serious bugs introduced or raised by changes in 2.3.3 <li>Fix a couple of serious bugs introduced or raised by changes in 2.3.3
parser</li> parser</li>
<li>Fixed another bug in xmlNodeGetContent()</li> <li>Fixed another bug in xmlNodeGetContent()</li>
<li>Bjorn fixed XPath node collection and Number formatting</li> <li>Bjorn fixed XPath node collection and Number formatting</li>
<li>Fixed a loop reported in the HTML parsing</li> <li>Fixed a loop reported in the HTML parsing</li>
<li>blank space are reported even if the Dtd content model proves that they <li>blank space are reported even if the Dtd content model proves that they
are formatting spaces, this is for XML conformance</li> are formatting spaces, this is for XML conformance</li>
</ul> </ul>
<h3>2.3.3: Mar 1 2001</h3> <h3>2.3.3: Mar 1 2001</h3>
<ul> <ul>
<li>small change in XPath for XSLT</li> <li>small change in XPath for XSLT</li>
<li>documentation cleanups</li> <li>documentation cleanups</li>
<li>fix in validation by Gary Pennington</li> <li>fix in validation by Gary Pennington</li>
<li>serious parsing performances improvements</li> <li>serious parsing performances improvements</li>
</ul> </ul>
<h3>2.3.2: Feb 24 2001</h3> <h3>2.3.2: Feb 24 2001</h3>
<ul> <ul>
<li>chasing XPath bugs, found a bunch, completed some TODO</li> <li>chasing XPath bugs, found a bunch, completed some TODO</li>
<li>fixed a Dtd parsing bug</li> <li>fixed a Dtd parsing bug</li>
<li>fixed a bug in xmlNodeGetContent</li> <li>fixed a bug in xmlNodeGetContent</li>
<li>ID/IDREF support partly rewritten by Gary Pennington</li> <li>ID/IDREF support partly rewritten by Gary Pennington</li>
</ul> </ul>
<h3>2.3.1: Feb 15 2001</h3> <h3>2.3.1: Feb 15 2001</h3>
<ul> <ul>
<li>some XPath and HTML bug fixes for XSLT</li> <li>some XPath and HTML bug fixes for XSLT</li>
<li>small extension of the hash table interfaces for DOM gdome2 <li>small extension of the hash table interfaces for DOM gdome2
implementation</li> implementation</li>
<li>A few bug fixes</li> <li>A few bug fixes</li>
</ul> </ul>
<h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3> <h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3>
<ul> <ul>
<li>Lots of XPath bug fixes</li> <li>Lots of XPath bug fixes</li>
<li>Add a mode with Dtd lookup but without validation error reporting for <li>Add a mode with Dtd lookup but without validation error reporting for
XSLT</li> XSLT</li>
<li>Add support for text node without escaping (XSLT)</li> <li>Add support for text node without escaping (XSLT)</li>
<li>bug fixes for xmlCheckFilename</li> <li>bug fixes for xmlCheckFilename</li>
<li>validation code bug fixes from Gary Pennington</li> <li>validation code bug fixes from Gary Pennington</li>
<li>Patch from Paul D. Smith correcting URI path normalization</li> <li>Patch from Paul D. Smith correcting URI path normalization</li>
<li>Patch to allow simultaneous install of libxml-devel and <li>Patch to allow simultaneous install of libxml-devel and
libxml2-devel</li> libxml2-devel</li>
<li>the example Makefile is now fixed</li> <li>the example Makefile is now fixed</li>
<li>added HTML to the RPM packages</li> <li>added HTML to the RPM packages</li>
<li>tree copying bugfixes</li> <li>tree copying bugfixes</li>
<li>updates to Windows makefiles</li> <li>updates to Windows makefiles</li>
<li>optimization patch from Bjorn Reese</li> <li>optimization patch from Bjorn Reese</li>
</ul> </ul>
<h3>2.2.11: Jan 4 2001</h3> <h3>2.2.11: Jan 4 2001</h3>
<ul> <ul>
<li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li> <li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li>
<li>added htmlHandleOmittedElem()</li> <li>added htmlHandleOmittedElem()</li>
<li>Applied Bjorn Reese's IPV6 first patch</li> <li>Applied Bjorn Reese's IPV6 first patch</li>
<li>Applied Paul D. Smith patches for validation of XInclude results</li> <li>Applied Paul D. Smith patches for validation of XInclude results</li>
<li>added XPointer xmlns() new scheme support</li> <li>added XPointer xmlns() new scheme support</li>
</ul> </ul>
<h3>2.2.10: Nov 25 2000</h3> <h3>2.2.10: Nov 25 2000</h3>
<ul> <ul>
<li>Fix the Windows problems of 2.2.8</li> <li>Fix the Windows problems of 2.2.8</li>
<li>integrate OpenVMS patches</li> <li>integrate OpenVMS patches</li>
<li>better handling of some nasty HTML input</li> <li>better handling of some nasty HTML input</li>
<li>Improved the XPointer implementation</li> <li>Improved the XPointer implementation</li>
<li>integrate a number of provided patches</li> <li>integrate a number of provided patches</li>
</ul> </ul>
<h3>2.2.9: Nov 25 2000</h3> <h3>2.2.9: Nov 25 2000</h3>
<ul><li>erroneous release :-(</li></ul> <ul>
<li>erroneous release :-(</li>
</ul>
<h3>2.2.8: Nov 13 2000</h3> <h3>2.2.8: Nov 13 2000</h3>
<ul> <ul>
<li>First version of <a href="http://www.w3.org/TR/xinclude">XInclude</a> <li>First version of <a href="http://www.w3.org/TR/xinclude">XInclude</a>
support</li> support</li>
<li>Patch in conditional section handling</li> <li>Patch in conditional section handling</li>
<li>updated MS compiler project</li> <li>updated MS compiler project</li>
<li>fixed some XPath problems</li> <li>fixed some XPath problems</li>
<li>added an URI escaping function</li> <li>added an URI escaping function</li>
<li>some other bug fixes</li> <li>some other bug fixes</li>
</ul> </ul>
<h3>2.2.7: Oct 31 2000</h3> <h3>2.2.7: Oct 31 2000</h3>
<ul> <ul>
<li>added message redirection</li> <li>added message redirection</li>
<li>XPath improvements (thanks TOM !)</li> <li>XPath improvements (thanks TOM !)</li>
<li>xmlIOParseDTD() added</li> <li>xmlIOParseDTD() added</li>
<li>various small fixes in the HTML, URI, HTTP and XPointer support</li> <li>various small fixes in the HTML, URI, HTTP and XPointer support</li>
<li>some cleanup of the Makefile, autoconf and the distribution content</li> <li>some cleanup of the Makefile, autoconf and the distribution content</li>
</ul> </ul>
<h3>2.2.6: Oct 25 2000:</h3> <h3>2.2.6: Oct 25 2000:</h3>
<ul> <ul>
<li>Added an hash table module, migrated a number of internal structure to <li>Added an hash table module, migrated a number of internal structure to
those</li> those</li>
<li>Fixed a posteriori validation problems</li> <li>Fixed a posteriori validation problems</li>
<li>HTTP module cleanups</li> <li>HTTP module cleanups</li>
<li>HTML parser improvements (tag errors, script/style handling, attribute <li>HTML parser improvements (tag errors, script/style handling, attribute
normalization)</li> normalization)</li>
<li>coalescing of adjacent text nodes</li> <li>coalescing of adjacent text nodes</li>
<li>couple of XPath bug fixes, exported the internal API</li> <li>couple of XPath bug fixes, exported the internal API</li>
</ul> </ul>
<h3>2.2.5: Oct 15 2000:</h3> <h3>2.2.5: Oct 15 2000:</h3>
<ul> <ul>
<li>XPointer implementation and testsuite</li> <li>XPointer implementation and testsuite</li>
<li>Lot of XPath fixes, added variable and functions registration, more <li>Lot of XPath fixes, added variable and functions registration, more
tests</li> tests</li>
<li>Portability fixes, lots of enhancements toward an easy Windows build <li>Portability fixes, lots of enhancements toward an easy Windows build
and release</li> and release</li>
<li>Late validation fixes</li> <li>Late validation fixes</li>
<li>Integrated a lot of contributed patches</li> <li>Integrated a lot of contributed patches</li>
<li>added memory management docs</li> <li>added memory management docs</li>
<li>a performance problem when using large buffer seems fixed</li> <li>a performance problem when using large buffer seems fixed</li>
</ul> </ul>
<h3>2.2.4: Oct 1 2000:</h3> <h3>2.2.4: Oct 1 2000:</h3>
<ul> <ul>
<li>main XPath problem fixed</li> <li>main XPath problem fixed</li>
<li>Integrated portability patches for Windows</li> <li>Integrated portability patches for Windows</li>
<li>Serious bug fixes on the URI and HTML code</li> <li>Serious bug fixes on the URI and HTML code</li>
</ul> </ul>
<h3>2.2.3: Sep 17 2000</h3> <h3>2.2.3: Sep 17 2000</h3>
<ul> <ul>
<li>bug fixes</li> <li>bug fixes</li>
<li>cleanup of entity handling code</li> <li>cleanup of entity handling code</li>
<li>overall review of all loops in the parsers, all sprintf usage has been <li>overall review of all loops in the parsers, all sprintf usage has been
checked too</li> checked too</li>
<li>Far better handling of larges Dtd. Validating against DocBook XML Dtd <li>Far better handling of larges Dtd. Validating against DocBook XML Dtd
works smoothly now.</li> works smoothly now.</li>
</ul> </ul>
<h3>1.8.10: Sep 6 2000</h3> <h3>1.8.10: Sep 6 2000</h3>
<ul><li>bug fix release for some Gnome projects</li></ul> <ul>
<li>bug fix release for some Gnome projects</li>
</ul>
<h3>2.2.2: August 12 2000</h3> <h3>2.2.2: August 12 2000</h3>
<ul> <ul>
<li>mostly bug fixes</li> <li>mostly bug fixes</li>
<li>started adding routines to access xml parser context options</li> <li>started adding routines to access xml parser context options</li>
</ul> </ul>
<h3>2.2.1: July 21 2000</h3> <h3>2.2.1: July 21 2000</h3>
<ul> <ul>
<li>a purely bug fixes release</li> <li>a purely bug fixes release</li>
<li>fixed an encoding support problem when parsing from a memory block</li> <li>fixed an encoding support problem when parsing from a memory block</li>
<li>fixed a DOCTYPE parsing problem</li> <li>fixed a DOCTYPE parsing problem</li>
<li>removed a bug in the function allowing to override the memory <li>removed a bug in the function allowing to override the memory
allocation routines</li> allocation routines</li>
</ul> </ul>
<h3>2.2.0: July 14 2000</h3> <h3>2.2.0: July 14 2000</h3>
<ul> <ul>
<li>applied a lot of portability fixes</li> <li>applied a lot of portability fixes</li>
<li>better encoding support/cleanup and saving (content is now always <li>better encoding support/cleanup and saving (content is now always
encoded in UTF-8)</li> encoded in UTF-8)</li>
<li>the HTML parser now correctly handles encodings</li> <li>the HTML parser now correctly handles encodings</li>
<li>added xmlHasProp()</li> <li>added xmlHasProp()</li>
<li>fixed a serious problem with &amp;#38;</li> <li>fixed a serious problem with &amp;#38;</li>
<li>propagated the fix to FTP client</li> <li>propagated the fix to FTP client</li>
<li>cleanup, bugfixes, etc ...</li> <li>cleanup, bugfixes, etc ...</li>
<li>Added a page about <a href="encoding.html">libxml Internationalization <li>Added a page about <a href="encoding.html">libxml Internationalization
support</a> support</a>
</li> </li>
</ul> </ul>
<h3>1.8.9: July 9 2000</h3> <h3>1.8.9: July 9 2000</h3>
<ul> <ul>
<li>fixed the spec the RPMs should be better</li> <li>fixed the spec the RPMs should be better</li>
<li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve <li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve
rpmfind users problem</li> rpmfind users problem</li>
</ul> </ul>
<h3>2.1.1: July 1 2000</h3> <h3>2.1.1: July 1 2000</h3>
<ul> <ul>
<li>fixes a couple of bugs in the 2.1.0 packaging</li> <li>fixes a couple of bugs in the 2.1.0 packaging</li>
<li>improvements on the HTML parser</li> <li>improvements on the HTML parser</li>
</ul> </ul>
<h3>2.1.0 and 1.8.8: June 29 2000</h3> <h3>2.1.0 and 1.8.8: June 29 2000</h3>
<ul> <ul>
<li>1.8.8 is mostly a commodity package for upgrading to libxml2 according <li>1.8.8 is mostly a commodity package for upgrading to libxml2 according
to <a href="upgrade.html">new instructions</a>. It fixes a nasty problem to <a href="upgrade.html">new instructions</a>. It fixes a nasty problem
about &amp;#38; charref parsing</li> about &amp;#38; charref parsing</li>
<li>2.1.0 also ease the upgrade from libxml v1 to the recent version. it <li>2.1.0 also ease the upgrade from libxml v1 to the recent version. it
also contains numerous fixes and enhancements: also contains numerous fixes and enhancements:
<ul> <ul>
<li>added xmlStopParser() to stop parsing</li> <li>added xmlStopParser() to stop parsing</li>
<li>improved a lot parsing speed when there is large CDATA blocs</li> <li>improved a lot parsing speed when there is large CDATA blocs</li>
<li>includes XPath patches provided by Picdar Technology</li> <li>includes XPath patches provided by Picdar Technology</li>
<li>tried to fix as much as possible DTD validation and namespace <li>tried to fix as much as possible DTD validation and namespace
related problems</li> related problems</li>
<li>output to a given encoding has been added/tested</li> <li>output to a given encoding has been added/tested</li>
<li>lot of various fixes</li> <li>lot of various fixes</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<h3>2.0.0: Apr 12 2000</h3> <h3>2.0.0: Apr 12 2000</h3>
@ -619,53 +629,53 @@ it's actually not compiled in by default. The real fixes are:</p>
idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially
scheduled for Apr 3 the release occurred only on Apr 12 due to massive scheduled for Apr 3 the release occurred only on Apr 12 due to massive
workload.</li> workload.</li>
<li>The include are now located under $prefix/include/libxml (instead of <li>The include are now located under $prefix/include/libxml (instead of
$prefix/include/gnome-xml), they also are referenced by $prefix/include/gnome-xml), they also are referenced by
<pre>#include &lt;libxml/xxx.h&gt;</pre> <pre>#include &lt;libxml/xxx.h&gt;</pre>
<p>instead of</p> <p>instead of</p>
<pre>#include &quot;xxx.h&quot;</pre> <pre>#include &quot;xxx.h&quot;</pre>
</li> </li>
<li>a new URI module for parsing URIs and following strictly RFC 2396</li> <li>a new URI module for parsing URIs and following strictly RFC 2396</li>
<li>the memory allocation routines used by libxml can now be overloaded <li>the memory allocation routines used by libxml can now be overloaded
dynamically by using xmlMemSetup()</li> dynamically by using xmlMemSetup()</li>
<li>The previously CVS only tool tester has been renamed <li>The previously CVS only tool tester has been renamed
<strong>xmllint</strong> and is now installed as part of the libxml2 <strong>xmllint</strong> and is now installed as part of the libxml2
package</li> package</li>
<li>The I/O interface has been revamped. There is now ways to plug in <li>The I/O interface has been revamped. There is now ways to plug in
specific I/O modules, either at the URI scheme detection level using specific I/O modules, either at the URI scheme detection level using
xmlRegisterInputCallbacks() or by passing I/O functions when creating a xmlRegisterInputCallbacks() or by passing I/O functions when creating a
parser context using xmlCreateIOParserCtxt()</li> parser context using xmlCreateIOParserCtxt()</li>
<li>there is a C preprocessor macro LIBXML_VERSION providing the version <li>there is a C preprocessor macro LIBXML_VERSION providing the version
number of the libxml module in use</li> number of the libxml module in use</li>
<li>a number of optional features of libxml can now be excluded at <li>a number of optional features of libxml can now be excluded at
configure time (FTP/HTTP/HTML/XPath/Debug)</li> configure time (FTP/HTTP/HTML/XPath/Debug)</li>
</ul> </ul>
<h3>2.0.0beta: Mar 14 2000</h3> <h3>2.0.0beta: Mar 14 2000</h3>
<ul> <ul>
<li>This is a first Beta release of libxml version 2</li> <li>This is a first Beta release of libxml version 2</li>
<li>It's available only from<a href="ftp://xmlsoft.org/">xmlsoft.org <li>It's available only from<a href="ftp://xmlsoft.org/">xmlsoft.org
FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and
RPMs</li> RPMs</li>
<li>This version is now the head in the Gnome CVS base, the old one is <li>This version is now the head in the Gnome CVS base, the old one is
available under the tag LIB_XML_1_X</li> available under the tag LIB_XML_1_X</li>
<li>This includes a very large set of changes. From a programmatic point <li>This includes a very large set of changes. From a programmatic point
of view applications should not have to be modified too much, check the of view applications should not have to be modified too much, check the
<a href="upgrade.html">upgrade page</a> <a href="upgrade.html">upgrade page</a>
</li> </li>
<li>Some interfaces may changes (especially a bit about encoding).</li> <li>Some interfaces may changes (especially a bit about encoding).</li>
<li>the updates includes: <li>the updates includes:
<ul> <ul>
<li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
handled now</li> handled now</li>
<li>Better handling of entities, especially well-formedness checking <li>Better handling of entities, especially well-formedness checking
and proper PEref extensions in external subsets</li> and proper PEref extensions in external subsets</li>
<li>DTD conditional sections</li> <li>DTD conditional sections</li>
<li>Validation now correctly handle entities content</li> <li>Validation now correctly handle entities content</li>
<li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change <li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change
structures to accommodate DOM</a></li> structures to accommodate DOM</a></li>
</ul> </ul>
</li> </li>
<li>Serious progress were made toward compliance, <a href="conf/result.html">here are the result of the test</a> against the <li>Serious progress were made toward compliance, <a href="conf/result.html">here are the result of the test</a> against the
OASIS testsuite (except the Japanese tests since I don't support that OASIS testsuite (except the Japanese tests since I don't support that
encoding yet). This URL is rebuilt every couple of hours using the CVS encoding yet). This URL is rebuilt every couple of hours using the CVS
head version.</li> head version.</li>
@ -673,94 +683,96 @@ it's actually not compiled in by default. The real fixes are:</p>
<h3>1.8.7: Mar 6 2000</h3> <h3>1.8.7: Mar 6 2000</h3>
<ul> <ul>
<li>This is a bug fix release:</li> <li>This is a bug fix release:</li>
<li>It is possible to disable the ignorable blanks heuristic used by <li>It is possible to disable the ignorable blanks heuristic used by
libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
that for adherence to XML spec, this behaviour will be disabled by that for adherence to XML spec, this behaviour will be disabled by
default in 2.x . The same function will allow to keep compatibility for default in 2.x . The same function will allow to keep compatibility for
old code.</li> old code.</li>
<li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore, <li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore,
avoiding heuristic is really the Right Way :-\</li> avoiding heuristic is really the Right Way :-\</li>
<li>The unchecked use of snprintf which was breaking libxml-1.8.6 <li>The unchecked use of snprintf which was breaking libxml-1.8.6
compilation on some platforms has been fixed</li> compilation on some platforms has been fixed</li>
<li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing <li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
URIs</li> URIs</li>
</ul> </ul>
<h3>1.8.6: Jan 31 2000</h3> <h3>1.8.6: Jan 31 2000</h3>
<ul><li>added a nanoFTP transport module, debugged until the new version of <a href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a> can use <ul>
it without troubles</li></ul> <li>added a nanoFTP transport module, debugged until the new version of <a href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a> can use
it without troubles</li>
</ul>
<h3>1.8.5: Jan 21 2000</h3> <h3>1.8.5: Jan 21 2000</h3>
<ul> <ul>
<li>adding APIs to parse a well balanced chunk of XML (production <a href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the <li>adding APIs to parse a well balanced chunk of XML (production <a href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the
XML spec)</li> XML spec)</li>
<li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li> <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li>
<li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying <li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying
to solve the zlib checks problems</li> to solve the zlib checks problems</li>
<li>The current state in gnome CVS base is expected to ship as 1.8.5 with <li>The current state in gnome CVS base is expected to ship as 1.8.5 with
gnumeric soon</li> gnumeric soon</li>
</ul> </ul>
<h3>1.8.4: Jan 13 2000</h3> <h3>1.8.4: Jan 13 2000</h3>
<ul> <ul>
<li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li> <li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li>
<li>all exit() call should have been removed from libxml</li> <li>all exit() call should have been removed from libxml</li>
<li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li> <li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li>
<li>added newDocFragment()</li> <li>added newDocFragment()</li>
</ul> </ul>
<h3>1.8.3: Jan 5 2000</h3> <h3>1.8.3: Jan 5 2000</h3>
<ul> <ul>
<li>a Push interface for the XML and HTML parsers</li> <li>a Push interface for the XML and HTML parsers</li>
<li>a shell-like interface to the document tree (try tester --shell :-)</li> <li>a shell-like interface to the document tree (try tester --shell :-)</li>
<li>lots of bug fixes and improvement added over XMas holidays</li> <li>lots of bug fixes and improvement added over XMas holidays</li>
<li>fixed the DTD parsing code to work with the xhtml DTD</li> <li>fixed the DTD parsing code to work with the xhtml DTD</li>
<li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li> <li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li>
<li>Fixed bugs in xmlNewNs()</li> <li>Fixed bugs in xmlNewNs()</li>
<li>External entity loading code has been revamped, now it uses <li>External entity loading code has been revamped, now it uses
xmlLoadExternalEntity(), some fix on entities processing were added</li> xmlLoadExternalEntity(), some fix on entities processing were added</li>
<li>cleaned up WIN32 includes of socket stuff</li> <li>cleaned up WIN32 includes of socket stuff</li>
</ul> </ul>
<h3>1.8.2: Dec 21 1999</h3> <h3>1.8.2: Dec 21 1999</h3>
<ul> <ul>
<li>I got another problem with includes and C++, I hope this issue is fixed <li>I got another problem with includes and C++, I hope this issue is fixed
for good this time</li> for good this time</li>
<li>Added a few tree modification functions: xmlReplaceNode, <li>Added a few tree modification functions: xmlReplaceNode,
xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and
xmlDocSetRootElement</li> xmlDocSetRootElement</li>
<li>Tried to improve the HTML output with help from <a href="mailto:clahey@umich.edu">Chris Lahey</a> <li>Tried to improve the HTML output with help from <a href="mailto:clahey@umich.edu">Chris Lahey</a>
</li> </li>
</ul> </ul>
<h3>1.8.1: Dec 18 1999</h3> <h3>1.8.1: Dec 18 1999</h3>
<ul> <ul>
<li>various patches to avoid troubles when using libxml with C++ compilers <li>various patches to avoid troubles when using libxml with C++ compilers
the &quot;namespace&quot; keyword and C escaping in include files</li> the &quot;namespace&quot; keyword and C escaping in include files</li>
<li>a problem in one of the core macros IS_CHAR was corrected</li> <li>a problem in one of the core macros IS_CHAR was corrected</li>
<li>fixed a bug introduced in 1.8.0 breaking default namespace processing, <li>fixed a bug introduced in 1.8.0 breaking default namespace processing,
and more specifically the Dia application</li> and more specifically the Dia application</li>
<li>fixed a posteriori validation (validation after parsing, or by using a <li>fixed a posteriori validation (validation after parsing, or by using a
Dtd not specified in the original document)</li> Dtd not specified in the original document)</li>
<li>fixed a bug in</li> <li>fixed a bug in</li>
</ul> </ul>
<h3>1.8.0: Dec 12 1999</h3> <h3>1.8.0: Dec 12 1999</h3>
<ul> <ul>
<li>cleanup, especially memory wise</li> <li>cleanup, especially memory wise</li>
<li>the parser should be more reliable, especially the HTML one, it should <li>the parser should be more reliable, especially the HTML one, it should
not crash, whatever the input !</li> not crash, whatever the input !</li>
<li>Integrated various patches, especially a speedup improvement for large <li>Integrated various patches, especially a speedup improvement for large
dataset from <a href="mailto:cnygard@bellatlantic.net">Carl Nygard</a>, dataset from <a href="mailto:cnygard@bellatlantic.net">Carl Nygard</a>,
configure with --with-buffers to enable them.</li> configure with --with-buffers to enable them.</li>
<li>attribute normalization, oops should have been added long ago !</li> <li>attribute normalization, oops should have been added long ago !</li>
<li>attributes defaulted from DTDs should be available, xmlSetProp() now <li>attributes defaulted from DTDs should be available, xmlSetProp() now
does entities escaping by default.</li> does entities escaping by default.</li>
</ul> </ul>
<h3>1.7.4: Oct 25 1999</h3> <h3>1.7.4: Oct 25 1999</h3>
<ul> <ul>
<li>Lots of HTML improvement</li> <li>Lots of HTML improvement</li>
<li>Fixed some errors when saving both XML and HTML</li> <li>Fixed some errors when saving both XML and HTML</li>
<li>More examples, the regression tests should now look clean</li> <li>More examples, the regression tests should now look clean</li>
<li>Fixed a bug with contiguous charref</li> <li>Fixed a bug with contiguous charref</li>
</ul> </ul>
<h3>1.7.3: Sep 29 1999</h3> <h3>1.7.3: Sep 29 1999</h3>
<ul> <ul>
<li>portability problems fixed</li> <li>portability problems fixed</li>
<li>snprintf was used unconditionally, leading to link problems on system <li>snprintf was used unconditionally, leading to link problems on system
were it's not available, fixed</li> were it's not available, fixed</li>
</ul> </ul>
<h3>1.7.1: Sep 24 1999</h3> <h3>1.7.1: Sep 24 1999</h3>
@ -770,19 +782,19 @@ it's actually not compiled in by default. The real fixes are:</p>
is that CHAR was conflicting with a predefined type on Windows. However is that CHAR was conflicting with a predefined type on Windows. However
on non WIN32 environment, compatibility is provided by the way of a on non WIN32 environment, compatibility is provided by the way of a
<strong>#define </strong>.</li> <strong>#define </strong>.</li>
<li>Changed another error : the use of a structure field called errno, and <li>Changed another error : the use of a structure field called errno, and
leading to troubles on platforms where it's a macro</li> leading to troubles on platforms where it's a macro</li>
</ul> </ul>
<h3>1.7.0: Sep 23 1999</h3> <h3>1.7.0: Sep 23 1999</h3>
<ul> <ul>
<li>Added the ability to fetch remote DTD or parsed entities, see the <a href="html/libxml-nanohttp.html">nanohttp</a> module.</li> <li>Added the ability to fetch remote DTD or parsed entities, see the <a href="html/libxml-nanohttp.html">nanohttp</a> module.</li>
<li>Added an errno to report errors by another mean than a simple printf <li>Added an errno to report errors by another mean than a simple printf
like callback</li> like callback</li>
<li>Finished ID/IDREF support and checking when validation</li> <li>Finished ID/IDREF support and checking when validation</li>
<li>Serious memory leaks fixed (there is now a <a href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li> <li>Serious memory leaks fixed (there is now a <a href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li>
<li>Improvement of <a href="http://www.w3.org/TR/xpath">XPath</a> <li>Improvement of <a href="http://www.w3.org/TR/xpath">XPath</a>
implementation</li> implementation</li>
<li>Added an HTML parser front-end</li> <li>Added an HTML parser front-end</li>
</ul> </ul>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>

View File

@ -87,7 +87,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</table> </table>
</td></tr></table></td> </td></tr></table></td>
<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"> <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
<p>There is a number of language bindings and wrappers available for libxml2, <p>There are a number of language bindings and wrappers available for libxml2,
the list below is not exhaustive. Please contact the <a href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a> the list below is not exhaustive. Please contact the <a href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>
(<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in (<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in
order to get updates to this list or to discuss the specific topic of libxml2 order to get updates to this list or to discuss the specific topic of libxml2
@ -96,38 +96,35 @@ or libxslt wrappers or bindings:</p>
<li> <li>
<a href="mailto:ari@lusis.org">Ari Johnson</a> provides a C++ wrapper <a href="mailto:ari@lusis.org">Ari Johnson</a> provides a C++ wrapper
for libxml:<br> for libxml:<br>
Website: <a href="http://lusis.org/~ari/xml++/">http://lusis.org/~ari/xml++/</a><br> Website: <a href="http://lusis.org/~ari/xml%2B%2B/">http://lusis.org/~ari/xml++/</a><br>
Download: <a href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a> Download: <a href="http://lusis.org/~ari/xml%2B%2B/libxml%2B%2B.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a>
</li> </li>
<li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper
based on the gdome2 </a>bindings maintained by Tobias Peters.</li> based on the gdome2 bindings</a> maintained by Tobias Peters.</li>
<li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt; <li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt;
<p>Website: <a href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a> <p>Website: <a href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a>
</p> </p>
</li> </li>
<li> <li>
<a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt <a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
application server</a> application server</a>.</li>
</li> <li>
<li>
<a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an <a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an
earlier version of the libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a> earlier version of the libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li>
</li> <li>Gopal.V and Peter Minten develop <a href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of
<li>Gopal.V and Peter Minten develop <a href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of C# libxml2 bindings.</li>
C# libxml2 bindings</li> <li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
<li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue libxml2</a> with Kylix, Delphi and other Pascal compilers.</li>
libxml2</a> with Kylix, Delphi and other Pascal compilers</li> <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
<li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 implementation for Kylix2/D5/D6 from Borland.</li>
implementation for Kylix2/D5/D6 from Borland</li> <li>Wai-Sun &quot;Squidster&quot; Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and
<li>Wai-Sun &quot;Squidster&quot; Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and
libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
maintained by Tobias Peters.</li> maintained by Tobias Peters.</li>
<li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
Tcl</a> Tcl</a>.</li>
</li> <li>There is support for libxml2 in the DOM module of PHP.</li>
<li>There is support for libxml2 in the DOM module of PHP.</li>
</ul> </ul>
<p>The distribution includes a set of Python bindings, which are guaranteed <p>The distribution includes a set of Python bindings, which are guaranteed
to be maintained as part of the library in the future, though the Python to be maintained as part of the library in the future, though the Python
@ -137,7 +134,7 @@ interface have not yet reached the maturity of the C API.</p>
<li>If you use an RPM based distribution, simply install the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python <li>If you use an RPM based distribution, simply install the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python
RPM</a> (and if needed the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python RPM</a> (and if needed the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python
RPM</a>).</li> RPM</a>).</li>
<li>Otherwise use the <a href="ftp://xmlsoft.org/python/">libxml2-python <li>Otherwise use the <a href="ftp://xmlsoft.org/python/">libxml2-python
module distribution</a> corresponding to your installed version of module distribution</a> corresponding to your installed version of
libxml2 and libxslt. Note that to install it you will need both libxml2 libxml2 and libxslt. Note that to install it you will need both libxml2
and libxslt installed and run &quot;python setup.py build install&quot; in the and libxslt installed and run &quot;python setup.py build install&quot; in the
@ -145,7 +142,7 @@ interface have not yet reached the maturity of the C API.</p>
</ul> </ul>
<p>The distribution includes a set of examples and regression tests for the <p>The distribution includes a set of examples and regression tests for the
python bindings in the <code>python/tests</code> directory. Here are some python bindings in the <code>python/tests</code> directory. Here are some
excepts from those tests:</p> excerpts from those tests:</p>
<h3>tst.py:</h3> <h3>tst.py:</h3>
<p>This is a basic test of the file interface and DOM navigation:</p> <p>This is a basic test of the file interface and DOM navigation:</p>
<pre>import libxml2 <pre>import libxml2
@ -163,19 +160,19 @@ if child.name != &quot;foo&quot;:
print &quot;child.name failed&quot; print &quot;child.name failed&quot;
sys.exit(1) sys.exit(1)
doc.freeDoc()</pre> doc.freeDoc()</pre>
<p>The Python module is called libxml2, parseFile is the equivalent of <p>The Python module is called libxml2; parseFile is the equivalent of
xmlParseFile (most of the bindings are automatically generated, and the xml xmlParseFile (most of the bindings are automatically generated, and the xml
prefix is removed and the casing convention are kept). All node seen at the prefix is removed and the casing convention are kept). All node seen at the
binding level share the same subset of accessors:</p> binding level share the same subset of accessors:</p>
<ul> <ul>
<li> <li>
<code>name</code> : returns the node name</li> <code>name</code> : returns the node name</li>
<li> <li>
<code>type</code> : returns a string indicating the node type</li> <code>type</code> : returns a string indicating the node type</li>
<li> <li>
<code>content</code> : returns the content of the node, it is based on <code>content</code> : returns the content of the node, it is based on
xmlNodeGetContent() and hence is recursive.</li> xmlNodeGetContent() and hence is recursive.</li>
<li> <li>
<code>parent</code> , <code>children</code>, <code>last</code>, <code>parent</code> , <code>children</code>, <code>last</code>,
<code>next</code>, <code>prev</code>, <code>doc</code>, <code>next</code>, <code>prev</code>, <code>doc</code>,
<code>properties</code>: pointing to the associated element in the tree, <code>properties</code>: pointing to the associated element in the tree,

View File

@ -92,7 +92,7 @@ threads can safely work in parallel parsing different documents. There is
however a couple of things to do to ensure it:</p> however a couple of things to do to ensure it:</p>
<ul> <ul>
<li>configure the library accordingly using the --with-threads options</li> <li>configure the library accordingly using the --with-threads options</li>
<li>call xmlInitParser() in the &quot;main&quot; thread before using any of the <li>call xmlInitParser() in the &quot;main&quot; thread before using any of the
libxml API (except possibly selecting a different memory allocator)</li> libxml API (except possibly selecting a different memory allocator)</li>
</ul> </ul>
<p>Note that the thread safety cannot be ensured for multiple threads sharing <p>Note that the thread safety cannot be ensured for multiple threads sharing
@ -101,13 +101,13 @@ exports a basic mutex and reentrant mutexes API in &lt;libxml/threads.h&gt;.
The parts of the library checked for thread safety are:</p> The parts of the library checked for thread safety are:</p>
<ul> <ul>
<li>concurrent loading</li> <li>concurrent loading</li>
<li>file access resolution</li> <li>file access resolution</li>
<li>catalog access</li> <li>catalog access</li>
<li>catalog building</li> <li>catalog building</li>
<li>entities lookup/accesses</li> <li>entities lookup/accesses</li>
<li>validation</li> <li>validation</li>
<li>global variables per-thread override</li> <li>global variables per-thread override</li>
<li>memory handling</li> <li>memory handling</li>
</ul> </ul>
<p>XPath is supposed to be thread safe now, but this wasn't tested <p>XPath is supposed to be thread safe now, but this wasn't tested
seriously.</p> seriously.</p>

View File

@ -94,10 +94,10 @@ incompatible changes. The main goals were:</p>
<li>a general cleanup. A number of mistakes inherited from the very early <li>a general cleanup. A number of mistakes inherited from the very early
versions couldn't be changed due to compatibility constraints. Example versions couldn't be changed due to compatibility constraints. Example
the &quot;childs&quot; element in the nodes.</li> the &quot;childs&quot; element in the nodes.</li>
<li>Uniformization of the various nodes, at least for their header and link <li>Uniformization of the various nodes, at least for their header and link
parts (doc, parent, children, prev, next), the goal is a simpler parts (doc, parent, children, prev, next), the goal is a simpler
programming model and simplifying the task of the DOM implementors.</li> programming model and simplifying the task of the DOM implementors.</li>
<li>better conformances to the XML specification, for example version 1.x <li>better conformances to the XML specification, for example version 1.x
had an heuristic to try to detect ignorable white spaces. As a result the had an heuristic to try to detect ignorable white spaces. As a result the
SAX event generated were ignorableWhitespace() while the spec requires SAX event generated were ignorableWhitespace() while the spec requires
character() in that case. This also mean that a number of DOM node character() in that case. This also mean that a number of DOM node
@ -108,16 +108,16 @@ incompatible changes. The main goals were:</p>
<p>So client code of libxml designed to run with version 1.x may have to be <p>So client code of libxml designed to run with version 1.x may have to be
changed to compile against version 2.x of libxml. Here is a list of changes changed to compile against version 2.x of libxml. Here is a list of changes
that I have collected, they may not be sufficient, so in case you find other that I have collected, they may not be sufficient, so in case you find other
change which are required, <a href="mailto:Daniel.<EFBFBD>eillardw3.org">drop me a change which are required, <a href="mailto:Daniel.%C3%8Feillardw3.org">drop me a
mail</a>:</p> mail</a>:</p>
<ol> <ol>
<li>The package name have changed from libxml to libxml2, the library name <li>The package name have changed from libxml to libxml2, the library name
is now -lxml2 . There is a new xml2-config script which should be used to is now -lxml2 . There is a new xml2-config script which should be used to
select the right parameters libxml2</li> select the right parameters libxml2</li>
<li>Node <strong>childs</strong> field has been renamed <li>Node <strong>childs</strong> field has been renamed
<strong>children</strong> so s/childs/children/g should be applied <strong>children</strong> so s/childs/children/g should be applied
(probability of having &quot;childs&quot; anywhere else is close to 0+</li> (probability of having &quot;childs&quot; anywhere else is close to 0+</li>
<li>The document don't have anymore a <strong>root</strong> element it has <li>The document don't have anymore a <strong>root</strong> element it has
been replaced by <strong>children</strong> and usually you will get a been replaced by <strong>children</strong> and usually you will get a
list of element here. For example a Dtd element for the internal subset list of element here. For example a Dtd element for the internal subset
and it's declaration may be found in that list, as well as processing and it's declaration may be found in that list, as well as processing
@ -126,7 +126,7 @@ mail</a>:</p>
a document. Alternatively if you are sure to not reference DTDs nor have a document. Alternatively if you are sure to not reference DTDs nor have
PIs or comments before or after the root element PIs or comments before or after the root element
s/-&gt;root/-&gt;children/g will probably do it.</li> s/-&gt;root/-&gt;children/g will probably do it.</li>
<li>The white space issue, this one is more complex, unless special case of <li>The white space issue, this one is more complex, unless special case of
validating parsing, the line breaks and spaces usually used for indenting validating parsing, the line breaks and spaces usually used for indenting
and formatting the document content becomes significant. So they are and formatting the document content becomes significant. So they are
reported by SAX and if your using the DOM tree, corresponding nodes are reported by SAX and if your using the DOM tree, corresponding nodes are
@ -137,25 +137,25 @@ mail</a>:</p>
relying on a special (and possibly broken) set of heuristics of relying on a special (and possibly broken) set of heuristics of
libxml to detect ignorable blanks. Don't complain if it breaks or libxml to detect ignorable blanks. Don't complain if it breaks or
make your application not 100% clean w.r.t. to it's input.</li> make your application not 100% clean w.r.t. to it's input.</li>
<li>the Right Way: change you code to accept possibly insignificant <li>the Right Way: change you code to accept possibly insignificant
blanks characters, or have your tree populated with weird blank text blanks characters, or have your tree populated with weird blank text
nodes. You can spot them using the commodity function nodes. You can spot them using the commodity function
<strong>xmlIsBlankNode(node)</strong> returning 1 for such blank <strong>xmlIsBlankNode(node)</strong> returning 1 for such blank
nodes.</li> nodes.</li>
</ol> </ol>
<p>Note also that with the new default the output functions don't add any <p>Note also that with the new default the output functions don't add any
extra indentation when saving a tree in order to be able to round trip extra indentation when saving a tree in order to be able to round trip
(read and save) without inflating the document with extra formatting (read and save) without inflating the document with extra formatting
chars.</p> chars.</p>
</li> </li>
<li>The include path has changed to $prefix/libxml/ and the includes <li>The include path has changed to $prefix/libxml/ and the includes
themselves uses this new prefix in includes instructions... If you are themselves uses this new prefix in includes instructions... If you are
using (as expected) the using (as expected) the
<pre>xml2-config --cflags</pre> <pre>xml2-config --cflags</pre>
<p>output to generate you compile commands this will probably work out of <p>output to generate you compile commands this will probably work out of
the box</p> the box</p>
</li> </li>
<li>xmlDetectCharEncoding takes an extra argument indicating the length in <li>xmlDetectCharEncoding takes an extra argument indicating the length in
byte of the head of the document available for character detection.</li> byte of the head of the document available for character detection.</li>
</ol> </ol>
<h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3> <h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3>
@ -165,35 +165,35 @@ compatibility. They offers the following:</p>
<ol> <ol>
<li>similar include naming, one should use <li>similar include naming, one should use
<strong>#include&lt;libxml/...&gt;</strong> in both cases.</li> <strong>#include&lt;libxml/...&gt;</strong> in both cases.</li>
<li>similar identifiers defined via macros for the child and root fields: <li>similar identifiers defined via macros for the child and root fields:
respectively <strong>xmlChildrenNode</strong> and respectively <strong>xmlChildrenNode</strong> and
<strong>xmlRootNode</strong> <strong>xmlRootNode</strong>
</li> </li>
<li>a new macro <strong>LIBXML_TEST_VERSION</strong> which should be <li>a new macro <strong>LIBXML_TEST_VERSION</strong> which should be
inserted once in the client code</li> inserted once in the client code</li>
</ol> </ol>
<p>So the roadmap to upgrade your existing libxml applications is the <p>So the roadmap to upgrade your existing libxml applications is the
following:</p> following:</p>
<ol> <ol>
<li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li> <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li>
<li>find all occurrences where the xmlDoc <strong>root</strong> field is <li>find all occurrences where the xmlDoc <strong>root</strong> field is
used and change it to <strong>xmlRootNode</strong> used and change it to <strong>xmlRootNode</strong>
</li> </li>
<li>similarly find all occurrences where the xmlNode <li>similarly find all occurrences where the xmlNode
<strong>childs</strong> field is used and change it to <strong>childs</strong> field is used and change it to
<strong>xmlChildrenNode</strong> <strong>xmlChildrenNode</strong>
</li> </li>
<li>add a <strong>LIBXML_TEST_VERSION</strong> macro somewhere in your <li>add a <strong>LIBXML_TEST_VERSION</strong> macro somewhere in your
<strong>main()</strong> or in the library init entry point</li> <strong>main()</strong> or in the library init entry point</li>
<li>Recompile, check compatibility, it should still work</li> <li>Recompile, check compatibility, it should still work</li>
<li>Change your configure script to look first for xml2-config and fall <li>Change your configure script to look first for xml2-config and fall
back using xml-config . Use the --cflags and --libs output of the command back using xml-config . Use the --cflags and --libs output of the command
as the Include and Linking parameters needed to use libxml.</li> as the Include and Linking parameters needed to use libxml.</li>
<li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and <li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and
libxml-devel-1.8.y can be kept simultaneously)</li> libxml-devel-1.8.y can be kept simultaneously)</li>
<li>remove your config.cache, relaunch your configuration mechanism, and <li>remove your config.cache, relaunch your configuration mechanism, and
recompile, if steps 2 and 3 were done right it should compile as-is</li> recompile, if steps 2 and 3 were done right it should compile as-is</li>
<li>Test that your application is still running correctly, if not this may <li>Test that your application is still running correctly, if not this may
be due to extra empty nodes due to formating spaces being kept in libxml2 be due to extra empty nodes due to formating spaces being kept in libxml2
contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your
code before calling the parser (next to code before calling the parser (next to

View File

@ -20,9 +20,9 @@ site</a></h1>
<p>Libxml is the XML C library developed for the Gnome project. XML itself <p>Libxml is the XML C library developed for the Gnome project. XML itself
is a metalanguage to design markup languages, i.e. text language where is a metalanguage to design markup languages, i.e. text language where
semantic and structure are added to the content using extra "markup" semantic and structure are added to the content using extra "markup"
information enclosed between angle bracket. HTML is the most well-known information enclosed between angle brackets. HTML is the most well-known
markup language. Though the library is written in C <a href="python.html">a markup language. Though the library is written in C <a href="python.html">a
variety of language binding</a> makes it available in other environments.</p> variety of language bindings</a> make it available in other environments.</p>
<p>Libxml2 implements a number of existing standards related to markup <p>Libxml2 implements a number of existing standards related to markup
languages:</p> languages:</p>
@ -58,16 +58,16 @@ languages:</p>
</ul> </ul>
<p>In most cases libxml tries to implement the specifications in a relatively <p>In most cases libxml tries to implement the specifications in a relatively
strict way. As of release 2.4.16, libxml2 passes all 1800+ tests from the <a strictly compliant way. As of release 2.4.16, libxml2 passes all 1800+ tests from the <a
href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
Suite</a>.</p> Suite</a>.</p>
<p>To some extent libxml2 provide some support for the following other <p>To some extent libxml2 provides support for the following additional
specification but don't claim to implement them:</p> specifications but doesn't claim to implement them completely:</p>
<ul> <ul>
<li>Document Object Model (DOM) <a <li>Document Object Model (DOM) <a
href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a> href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
it doesn't implement the API itself, gdome2 does this in top of it doesn't implement the API itself, gdome2 does this on top of
libxml2</li> libxml2</li>
<li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> : <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
libxml implements a basic FTP client code</li> libxml implements a basic FTP client code</li>
@ -84,7 +84,7 @@ conformance statement about it at the moment.</p>
<p>Libxml2 is known to be very portable, the library should build and work <p>Libxml2 is known to be very portable, the library should build and work
without serious troubles on a variety of systems (Linux, Unix, Windows, without serious troubles on a variety of systems (Linux, Unix, Windows,
CygWin, MacOs, MacOsX, RISC Os, OS/2, VMS, QNX, MVS, ...)</p> CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)</p>
<p>Separate documents:</p> <p>Separate documents:</p>
<ul> <ul>
@ -122,7 +122,7 @@ structured documents/data.</p>
sticking closely to ANSI C/POSIX for easy embedding. Works on sticking closely to ANSI C/POSIX for easy embedding. Works on
Linux/Unix/Windows, ported to a number of other platforms.</li> Linux/Unix/Windows, ported to a number of other platforms.</li>
<li>Basic support for HTTP and FTP client allowing applications to fetch <li>Basic support for HTTP and FTP client allowing applications to fetch
remote resources</li> remote resources.</li>
<li>The design is modular, most of the extensions can be compiled out.</li> <li>The design is modular, most of the extensions can be compiled out.</li>
<li>The internal document representation is as close as possible to the <a <li>The internal document representation is as close as possible to the <a
href="http://www.w3.org/DOM/">DOM</a> interfaces.</li> href="http://www.w3.org/DOM/">DOM</a> interfaces.</li>
@ -131,7 +131,7 @@ structured documents/data.</p>
href="http://www.jclark.com/xml/expat.html">Expat</a>.</li> href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
<li>This library is released under the <a <li>This library is released under the <a
href="http://www.opensource.org/licenses/mit-license.html">MIT href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a> see the Copyright file in the distribution for the precise License</a>. See the Copyright file in the distribution for the precise
wording.</li> wording.</li>
</ul> </ul>
@ -142,7 +142,7 @@ libxml2</p>
<h2><a name="FAQ">FAQ</a></h2> <h2><a name="FAQ">FAQ</a></h2>
<p>Table of Content:</p> <p>Table of Contents:</p>
<ul> <ul>
<li><a href="FAQ.html#License">License(s)</a></li> <li><a href="FAQ.html#License">License(s)</a></li>
<li><a href="FAQ.html#Installati">Installation</a></li> <li><a href="FAQ.html#Installati">Installation</a></li>
@ -155,14 +155,14 @@ libxml2</p>
<li><em>Licensing Terms for libxml</em> <li><em>Licensing Terms for libxml</em>
<p>libxml is released under the <a <p>libxml is released under the <a
href="http://www.opensource.org/licenses/mit-license.html">MIT href="http://www.opensource.org/licenses/mit-license.html">MIT
License</a>, see the file Copyright in the distribution for the precise License</a>; see the file Copyright in the distribution for the precise
wording</p> wording</p>
</li> </li>
<li><em>Can I embed libxml in a proprietary application ?</em> <li><em>Can I embed libxml in a proprietary application ?</em>
<p>Yes. The MIT License allows you to also keep proprietary the changes <p>Yes. The MIT License allows you to keep proprietary the changes
you made to libxml, but it would be graceful to provide back bug fixes you made to libxml, but it would be graceful to send-back bug fixes
and improvements as patches for possible incorporation in the main and improvements as patches for possible incorporation in the main
development tree</p> development tree.</p>
</li> </li>
</ol> </ol>
@ -176,19 +176,19 @@ libxml2</p>
href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a
href="ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/">gnome.org</a></p> href="ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/">gnome.org</a></p>
<p>Most Linux and BSD distributions include libxml, this is probably the <p>Most Linux and BSD distributions include libxml, this is probably the
safer way for end-users</p> safer way for end-users to use libxml.</p>
<p>David Doolin provides precompiled Windows versions at <a <p>David Doolin provides precompiled Windows versions at <a
href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p> href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p>
</li> </li>
<li><em>I see libxml and libxml2 releases, which one should I install ?</em> <li><em>I see libxml and libxml2 releases, which one should I install ?</em>
<ul> <ul>
<li>If you are not concerned by any existing backward compatibility <li>If you are not constrained by backward compatibility issues
with existing application, install libxml2 only</li> with existing applications, install libxml2 only</li>
<li>If you are not doing development, you can safely install both. <li>If you are not doing development, you can safely install both.
usually the packages <a Usually the packages <a
href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a
href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are
compatible (this is not the case for development packages)</li> compatible (this is not the case for development packages).</li>
<li>If you are a developer and your system provides separate packaging <li>If you are a developer and your system provides separate packaging
for shared libraries and the development components, it is possible for shared libraries and the development components, it is possible
to install libxml and libxml2, and also <a to install libxml and libxml2, and also <a
@ -200,20 +200,20 @@ libxml2</p>
libxml2(-devel)</li> libxml2(-devel)</li>
</ul> </ul>
</li> </li>
<li><em>I can't install the libxml package it conflicts with libxml0</em> <li><em>I can't install the libxml package, it conflicts with libxml0</em>
<p>You probably have an old libxml0 package used to provide the shared <p>You probably have an old libxml0 package used to provide the shared
library for libxml.so.0, you can probably safely remove it. Anyway the library for libxml.so.0, you can probably safely remove it. The
libxml packages provided on <a libxml packages provided on <a
href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> provides href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> provide
libxml.so.0</p> libxml.so.0</p>
</li> </li>
<li><em>I can't install the libxml(2) RPM package due to failed <li><em>I can't install the libxml(2) RPM package due to failed
dependencies</em> dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and <p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p> rebuild it locally with</p>
<p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code></p> <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
<p>if everything goes well it will generate two binary rpm (one providing <p>If everything goes well it will generate two binary rpm packages (one providing
the shared libs and xmllint, and the other one, the -devel package the shared libs and xmllint, and the other one, the -devel package,
providing includes, static libraries and scripts needed to build providing includes, static libraries and scripts needed to build
applications with libxml(2)) that you can install locally.</p> applications with libxml(2)) that you can install locally.</p>
</li> </li>
@ -230,21 +230,21 @@ libxml2</p>
<p><code>./configure [possible options]</code></p> <p><code>./configure [possible options]</code></p>
<p><code>make</code></p> <p><code>make</code></p>
<p><code>make install</code></p> <p><code>make install</code></p>
<p>At that point you may have to rerun ldconfig or similar utility to <p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p> update your list of installed shared libs.</p>
</li> </li>
<li><em>What other libraries are needed to compile/install libxml ?</em> <li><em>What other libraries are needed to compile/install libxml ?</em>
<p>Libxml does not requires any other library, the normal C ANSI API <p>Libxml does not require any other library, the normal C ANSI API
should be sufficient (please report any violation to this rule you may should be sufficient (please report any violation to this rule you may
find).</p> find).</p>
<p>However if found at configuration time libxml will detect and use the <p>However if found at configuration time libxml will detect and use the
following libs:</p> following libs:</p>
<ul> <ul>
<li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a <li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
highly portable and available widely compression library</li> highly portable and available widely compression library.</li>
<li>iconv: a powerful character encoding conversion library. It's <li>iconv: a powerful character encoding conversion library. It is
included by default on recent glibc libraries, so it doesn't need to included by default in recent glibc libraries, so it doesn't need to
be installed specifically on Linux. It seems it's now <a be installed specifically on Linux. It now seems a <a
href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part
of the official UNIX</a> specification. Here is one <a of the official UNIX</a> specification. Here is one <a
href="http://clisp.cons.org/~haible/packages-libiconv.html">implementation href="http://clisp.cons.org/~haible/packages-libiconv.html">implementation
@ -252,40 +252,40 @@ libxml2</p>
href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li> href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li>
</ul> </ul>
</li> </li>
<li><em>make check fails on some platforms</em> <li><em>Make check fails on some platforms</em>
<p>Sometime the regression tests results don't completely match the value <p>Sometimes the regression tests' results don't completely match the value
produced by the parser, and the makefile uses diff to print the delta. On produced by the parser, and the makefile uses diff to print the delta. On
some platforms the diff return breaks the compilation process, if the some platforms the diff return breaks the compilation process; if the
diff is small this is probably not a serious problem.</p> diff is small this is probably not a serious problem.</p>
<p>Sometimes (especially on Solaris) make checks fails due to limitations <p>Sometimes (especially on Solaris) make checks fail due to limitations
in make. Try using GNU-make instead.</p> in make. Try using GNU-make instead.</p>
</li> </li>
<li><em>I use the CVS version and there is no configure script</em> <li><em>I use the CVS version and there is no configure script</em>
<p>The configure (and other Makefiles) are generated. Use the autogen.sh <p>The configure script (and other Makefiles) are generated. Use the autogen.sh
script to regenerate the configure and Makefiles, like:</p> script to regenerate the configure script and Makefiles, like:</p>
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p> <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
</li> </li>
<li><em>I have troubles when running make tests with gcc-3.0</em> <li><em>I have troubles when running make tests with gcc-3.0</em>
<p>It seems the initial release of gcc-3.0 has a problem with the <p>It seems the initial release of gcc-3.0 has a problem with the
optimizer which miscompiles the URI module. Please use another optimizer which miscompiles the URI module. Please use another
compiler</p> compiler.</p>
</li> </li>
</ol> </ol>
<h3><a name="Developer">Developer</a> corner</h3> <h3><a name="Developer">Developer</a> corner</h3>
<ol> <ol>
<li><em>xmlDocDump() generates output on one line</em> <li><em>xmlDocDump() generates output on one line.</em>
<p>libxml will not <strong>invent</strong> spaces in the content of a <p>Libxml will not <strong>invent</strong> spaces in the content of a
document since <strong>all spaces in the content of a document are document since <strong>all spaces in the content of a document are
significant</strong>. If you build a tree from the API and want significant</strong>. If you build a tree from the API and want
indentation:</p> indentation:</p>
<ol> <ol>
<li>the correct way is to generate those yourself too</li> <li>the correct way is to generate those yourself too.</li>
<li>the dangerous way is to ask libxml to add those blanks to your <li>the dangerous way is to ask libxml to add those blanks to your
content <strong>modifying the content of your document in the content <strong>modifying the content of your document in the
process</strong>. The result may not be what you expect. There is process</strong>. The result may not be what you expect. There is
<strong>NO</strong> way to guarantee that such a modification won't <strong>NO</strong> way to guarantee that such a modification won't
impact other part of the content of your document. See <a affect other parts of the content of your document. See <a
href="http://xmlsoft.org/html/libxml-parser.html#XMLKEEPBLANKSDEFAULT">xmlKeepBlanksDefault href="http://xmlsoft.org/html/libxml-parser.html#XMLKEEPBLANKSDEFAULT">xmlKeepBlanksDefault
()</a> and <a ()</a> and <a
href="http://xmlsoft.org/html/libxml-tree.html#XMLSAVEFORMATFILE">xmlSaveFormatFile href="http://xmlsoft.org/html/libxml-tree.html#XMLSAVEFORMATFILE">xmlSaveFormatFile
@ -317,11 +317,11 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
to forget. There is a function <a to forget. There is a function <a
href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
()</a> to remove those at parse time, but that's an heuristic, and its ()</a> to remove those at parse time, but that's an heuristic, and its
use should be limited to case where you are sure there is no use should be limited to cases where you are certain there is no
mixed-content in the document.</p> mixed-content in the document.</p>
</li> </li>
<li><em>I get compilation errors of existing code like when accessing <li><em>I get compilation errors of existing code like when accessing
<strong>root</strong> or <strong>childs fields</strong> of nodes</em> <strong>root</strong> or <strong>child fields</strong> of nodes.</em>
<p>You are compiling code developed for libxml version 1 and using a <p>You are compiling code developed for libxml version 1 and using a
libxml2 development environment. Either switch back to libxml v1 devel or libxml2 development environment. Either switch back to libxml v1 devel or
even better fix the code to compile with libxml2 (or both) by <a even better fix the code to compile with libxml2 (or both) by <a
@ -329,31 +329,31 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
</li> </li>
<li><em>I get compilation errors about non existing <li><em>I get compilation errors about non existing
<strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong> <strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong>
fields</em> fields.</em>
<p>The source code you are using has been <a <p>The source code you are using has been <a
href="upgrade.html">upgraded</a> to be able to compile with both libxml href="upgrade.html">upgraded</a> to be able to compile with both libxml
and libxml2, but you need to install a more recent version: and libxml2, but you need to install a more recent version:
libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p> libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
</li> </li>
<li><em>XPath implementation looks seriously broken</em> <li><em>XPath implementation looks seriously broken</em>
<p>XPath implementation prior to 2.3.0 was really incomplete, upgrade to <p>XPath implementation prior to 2.3.0 was really incomplete. Upgrade to
a recent version, there is no known bug in the current version.</p> a recent version, there are no known bugs in the current version.</p>
</li> </li>
<li><em>The example provided in the web page does not compile</em> <li><em>The example provided in the web page does not compile.</em>
<p>It's hard to maintain the documentation in sync with the code <p>It's hard to maintain the documentation in sync with the code
&lt;grin/&gt; ...</p> &lt;grin/&gt; ...</p>
<p>Check the previous points 1/ and 2/ raised before, and send <p>Check the previous points 1/ and 2/ raised before, and please send
patches.</p> patches.</p>
</li> </li>
<li><em>Where can I get more examples and informations than in the web <li><em>Where can I get more examples and information than privoded on the web
page</em> page?</em>
<p>Ideally a libxml book would be nice. I have no such plan ... But you <p>Ideally a libxml book would be nice. I have no such plan ... But you
can:</p> can:</p>
<ul> <ul>
<li>check more deeply the <a href="html/libxml-lib.html">existing <li>check more deeply the <a href="html/libxml-lib.html">existing
generated doc</a></li> generated doc</a></li>
<li>looks for examples of use for libxml function using the Gnome code <li>look for examples of use for libxml function using the Gnome code.
for example the following will query the full Gnome CVS base for the For example the following will query the full Gnome CVS base for the
use of the <strong>xmlAddChild()</strong> function: use of the <strong>xmlAddChild()</strong> function:
<p><a <p><a
href="http://cvs.gnome.org/lxr/search?string=xmlAddChild">http://cvs.gnome.org/lxr/search?string=xmlAddChild</a></p> href="http://cvs.gnome.org/lxr/search?string=xmlAddChild">http://cvs.gnome.org/lxr/search?string=xmlAddChild</a></p>
@ -363,16 +363,16 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<li><a <li><a
href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Browse href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Browse
the libxml source</a> , I try to write code as clean and documented the libxml source</a> , I try to write code as clean and documented
as possible, so looking at it may be helpful. Especially the code of as possible, so looking at it may be helpful. In particular the code of
xmllint.c and of the various testXXX.c tests programs should provide xmllint.c and of the various testXXX.c test programs should provide
good example on how to do things with the library.</li> good examples of how to do things with the library.</li>
</ul> </ul>
</li> </li>
<li>What about C++ ? <li>What about C++ ?
<p>libxml is written in pure C in order to allow easy reuse on a number <p>libxml is written in pure C in order to allow easy reuse on a number
of platforms, including embedded systems. I don't intend to convert to of platforms, including embedded systems. I don't intend to convert to
C++.</p> C++.</p>
<p>There is however a few C++ wrappers which may fulfill your needs:</p> <p>There are however a few C++ wrappers which may fulfill your needs:</p>
<ul> <ul>
<li>by Ari Johnson &lt;ari@btigate.com&gt;: <li>by Ari Johnson &lt;ari@btigate.com&gt;:
<p>Website: <a <p>Website: <a
@ -388,13 +388,14 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
</li> </li>
<li>How to validate a document a posteriori ? <li>How to validate a document a posteriori ?
<p>It is possible to validate documents which had not been validated at <p>It is possible to validate documents which had not been validated at
initial parsing time or documents who have been built from scratch using initial parsing time or documents which have been built from scratch using
the API. Use the <a the API. Use the <a
href="http://xmlsoft.org/html/libxml-valid.html#XMLVALIDATEDTD">xmlValidateDtd()</a> href="http://xmlsoft.org/html/libxml-valid.html#XMLVALIDATEDTD">xmlValidateDtd()</a>
function. It is also possible to simply add a DTD to an existing function. It is also possible to simply add a DTD to an existing
document:</p> document:</p>
<pre>xmlDocPtr doc; /* your existing document */ <pre>xmlDocPtr doc; /* your existing document */
xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */ dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
doc-&gt;intSubset = dtd; doc-&gt;intSubset = dtd;
@ -409,18 +410,18 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<h2><a name="Documentat">Documentation</a></h2> <h2><a name="Documentat">Documentation</a></h2>
<p>There are some on-line resources about using libxml:</p> <p>There are several on-line resources related to using libxml:</p>
<ol> <ol>
<li>Check the <a href="FAQ.html">FAQ</a></li> <li>Check the <a href="FAQ.html">FAQ.</a></li>
<li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
documentation</a> automatically extracted from code comments (using <a documentation</a> automatically extracted from code comments (using <a
href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk
doc</a>).</li> doc</a>).</li>
<li>Look at the documentation about <a href="encoding.html">libxml <li>Look at the documentation about <a href="encoding.html">libxml
internationalization support</a></li> internationalization support</a>.</li>
<li>This page provides a global overview and <a href="example.html">some <li>This page provides a global overview and <a href="example.html">some
examples</a> on how to use libxml.</li> examples</a> on how to use libxml.</li>
<li>John Fleck's <a href="tutorial/index.html">libxml tutorial</a></li> <li>John Fleck's <a href="tutorial/index.html">libxml tutorial</a>.</li>
<li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a <li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a
href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice
documentation</a> explaining how to use the libxml SAX interface.</li> documentation</a> explaining how to use the libxml SAX interface.</li>
@ -428,8 +429,8 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
href="http://www-4.ibm.com/software/developer/library/gnome3/">an article href="http://www-4.ibm.com/software/developer/library/gnome3/">an article
for IBM developerWorks</a> about using libxml.</li> for IBM developerWorks</a> about using libxml.</li>
<li>Check <a href="http://cvs.gnome.org/lxr/source/gnome-xml/TODO">the TODO <li>Check <a href="http://cvs.gnome.org/lxr/source/gnome-xml/TODO">the TODO
file</a></li> file</a>.</li>
<li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a>. If you are <li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a> description. If you are
starting a new project using libxml you should really use the 2.x starting a new project using libxml you should really use the 2.x
version.</li> version.</li>
<li>And don't forget to look at the <a <li>And don't forget to look at the <a
@ -457,32 +458,32 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
<p>Check the following <strong><span style="color: #FF0000">before <p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p> posting</span></strong>:</p>
<ul> <ul>
<li>read the <a href="FAQ.html">FAQ</a></li> <li>Read the <a href="FAQ.html">FAQ</a>.</li>
<li>make sure you are <a href="ftp://xmlsoft.org/">using a recent <li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent
version</a>, and that the problem still shows up in those</li> version</a>, and that the problem still shows up in a recent version.</li>
<li>check the <a href="http://mail.gnome.org/archives/xml/">list <li>Check the <a href="http://mail.gnome.org/archives/xml/">list
archives</a> to see if the problem was reported already, in this case archives</a> to see if the problem was reported already. In this case
there is probably a fix available, similarly check the <a there is probably a fix available, similarly check the <a
href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">registered href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">registered
open bugs</a></li> open bugs</a>.</li>
<li>make sure you can reproduce the bug with xmllint or one of the test <li>Make sure you can reproduce the bug with xmllint or one of the test
programs found in source in the distribution</li> programs found in source in the distribution.</li>
<li>Please send the command showing the error as well as the input (as an <li>Please send the command showing the error as well as the input (as an
attachment)</li> attachment)</li>
</ul> </ul>
<p>Then send the bug with associated informations to reproduce it to the <a <p>Then send the bug with associated informations to reproduce it to the <a
href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it.. Please do not send me mail directly, it makes related I will approve it.. Please do not send mail to me directly, it makes
things really harder to track and in some cases I'm not the best person to things really hard to track and in some cases I am not the best person to
answer a given question, ask the list instead.</p> answer a given question. Ask the list instead.</p>
<p>Of course, bugs reported with a suggested patch for fixing them will <p>Of course, bugs reported with a suggested patch for fixing them will
probably be processed faster.</p> probably be processed faster than those without.</p>
<p>If you're looking for help, a quick look at <a <p>If you're looking for help, a quick look at <a
href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually
provide the answer, I usually send source samples when answering libxml usage provide the answer. I usually send source samples when answering libxml usage
questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated
documentation</a> is not as polished as I would like (i need to learn more documentation</a> is not as polished as I would like (i need to learn more
about DocBook), but it's a good starting point.</p> about DocBook), but it's a good starting point.</p>
@ -493,17 +494,17 @@ about DocBook), but it's a good starting point.</p>
subscribe to the mailing-list as explained before, check the <a subscribe to the mailing-list as explained before, check the <a
href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a
href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome bug href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome bug
database:</a>:</p> database</a>:</p>
<ol> <ol>
<li>provide patches when you find problems</li> <li>Provide patches when you find problems.</li>
<li>provide the diffs when you port libxml to a new platform. They may not <li>Provide the diffs when you port libxml to a new platform. They may not
be integrated in all cases but help pinpointing portability problems be integrated in all cases but help pinpointing portability problems
and</li> and</li>
<li>provide documentation fixes (either as patches to the code comments or <li>Provide documentation fixes (either as patches to the code comments or
as HTML diffs).</li> as HTML diffs).</li>
<li>provide new documentations pieces (translations, examples, etc ...)</li> <li>Provide new documentations pieces (translations, examples, etc ...).</li>
<li>Check the TODO file and try to close one of the items</li> <li>Check the TODO file and try to close one of the items.</li>
<li>take one of the points raised in the archive or the bug database and <li>Take one of the points raised in the archive or the bug database and
provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me
</a>before to avoid synchronization problems and check that the suggested </a>before to avoid synchronization problems and check that the suggested
fix will fit in nicely :-)</li> fix will fit in nicely :-)</li>
@ -535,9 +536,9 @@ binaries</a>. <a href="mailto:Steve.Ball@zveno.com">Steve Ball</a> provides <a h
<p><a name="Snapshot">Snapshot:</a></p> <p><a name="Snapshot">Snapshot:</a></p>
<ul> <ul>
<li>Code from the W3C cvs base libxml <a <li>Code from the W3C cvs base libxml <a
href="ftp://xmlsoft.org/cvs-snapshot.tar.gz">cvs-snapshot.tar.gz</a></li> href="ftp://xmlsoft.org/cvs-snapshot.tar.gz">cvs-snapshot.tar.gz</a>.</li>
<li>Docs, content of the web site, the list archive included <a <li>Docs, content of the web site, the list archive included <a
href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a></li> href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
</ul> </ul>
<p><a name="Contribs">Contributions:</a></p> <p><a name="Contribs">Contributions:</a></p>
@ -1368,8 +1369,8 @@ document</a>:</p>
&lt;/chapter&gt; &lt;/chapter&gt;
&lt;/EXAMPLE&gt;</pre> &lt;/EXAMPLE&gt;</pre>
<p>The first line specifies that it's an XML document and gives useful <p>The first line specifies that it is an XML document and gives useful
information about its encoding. Then the document is a text format whose information about its encoding. Then the rest of the document is a text format whose
structure is specified by tags between brackets. <strong>Each tag opened has structure is specified by tags between brackets. <strong>Each tag opened has
to be closed</strong>. XML is pedantic about this. However, if a tag is empty to be closed</strong>. XML is pedantic about this. However, if a tag is empty
(no content), a single tag can serve as both the opening and closing tag if (no content), a single tag can serve as both the opening and closing tag if
@ -1377,7 +1378,7 @@ it ends with <code>/&gt;</code> rather than with <code>&gt;</code>. Note
that, for example, the image tag has no content (just an attribute) and is that, for example, the image tag has no content (just an attribute) and is
closed by ending the tag with <code>/&gt;</code>.</p> closed by ending the tag with <code>/&gt;</code>.</p>
<p>XML can be applied successfully to a wide range of uses, from long term <p>XML can be applied successfully to a wide range of tasks, ranging from long term
structured document maintenance (where it follows the steps of SGML) to structured document maintenance (where it follows the steps of SGML) to
simple data encoding mechanisms like configuration file formatting (glade), simple data encoding mechanisms like configuration file formatting (glade),
spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where
@ -1391,18 +1392,18 @@ it is used to encode remote calls between a client and a server.</p>
language for transforming XML documents into other XML documents (or language for transforming XML documents into other XML documents (or
HTML/textual output).</p> HTML/textual output).</p>
<p>A separate library called libxslt is being built on top of libxml2. This <p>A separate library called libxslt is being developed on top of libxml2. This
module "libxslt" can be found in the Gnome CVS base too.</p> module "libxslt" too can be found in the Gnome CVS base.</p>
<p>You can check the <a <p>You can check the <a
href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a>
supported and the progresses on the <a supported and the progresses on the <a
href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog" href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog"
name="Changelog">Changelog</a></p> name="Changelog">Changelog</a>.</p>
<h2><a name="Python">Python and bindings</a></h2> <h2><a name="Python">Python and bindings</a></h2>
<p>There is a number of language bindings and wrappers available for libxml2, <p>There are a number of language bindings and wrappers available for libxml2,
the list below is not exhaustive. Please contact the <a the list below is not exhaustive. Please contact the <a
href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a> href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>
(<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in (<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in
@ -1416,7 +1417,7 @@ or libxslt wrappers or bindings:</p>
Download: <a Download: <a
href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a></li> href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a></li>
<li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper
based on the gdome2 </a>bindings maintained by Tobias Peters.</li> based on the gdome2 bindings</a> maintained by Tobias Peters.</li>
<li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt; <li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt;
<p>Website: <a <p>Website: <a
href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p> href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p>
@ -1426,19 +1427,19 @@ or libxslt wrappers or bindings:</p>
Sergeant</a> developed <a Sergeant</a> developed <a
href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
application server</a></li> application server</a>.</li>
<li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an
earlier version of the libxml/libxslt <a earlier version of the libxml/libxslt <a
href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li> href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li>
<li>Gopal.V and Peter Minten develop <a <li>Gopal.V and Peter Minten develop <a
href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of
C# libxml2 bindings</li> C# libxml2 bindings.</li>
<li>Petr Kozelka provides <a <li>Petr Kozelka provides <a
href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
libxml2</a> with Kylix, Delphi and other Pascal compilers</li> libxml2</a> with Kylix, Delphi and other Pascal compilers.</li>
<li>Uwe Fechner also provides <a <li>Uwe Fechner also provides <a
href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
implementation for Kylix2/D5/D6 from Borland</li> implementation for Kylix2/D5/D6 from Borland.</li>
<li>Wai-Sun "Squidster" Chia provides <a <li>Wai-Sun "Squidster" Chia provides <a
href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and
libxml2 bindings are also available in Ruby through the <a libxml2 bindings are also available in Ruby through the <a
@ -1446,7 +1447,7 @@ or libxslt wrappers or bindings:</p>
maintained by Tobias Peters.</li> maintained by Tobias Peters.</li>
<li>Steve Ball and contributors maintains <a <li>Steve Ball and contributors maintains <a
href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
Tcl</a></li> Tcl</a>.</li>
<li>There is support for libxml2 in the DOM module of PHP.</li> <li>There is support for libxml2 in the DOM module of PHP.</li>
</ul> </ul>
@ -1470,7 +1471,7 @@ interface have not yet reached the maturity of the C API.</p>
<p>The distribution includes a set of examples and regression tests for the <p>The distribution includes a set of examples and regression tests for the
python bindings in the <code>python/tests</code> directory. Here are some python bindings in the <code>python/tests</code> directory. Here are some
excepts from those tests:</p> excerpts from those tests:</p>
<h3>tst.py:</h3> <h3>tst.py:</h3>
@ -1491,7 +1492,7 @@ if child.name != "foo":
sys.exit(1) sys.exit(1)
doc.freeDoc()</pre> doc.freeDoc()</pre>
<p>The Python module is called libxml2, parseFile is the equivalent of <p>The Python module is called libxml2; parseFile is the equivalent of
xmlParseFile (most of the bindings are automatically generated, and the xml xmlParseFile (most of the bindings are automatically generated, and the xml
prefix is removed and the casing convention are kept). All node seen at the prefix is removed and the casing convention are kept). All node seen at the
binding level share the same subset of accessors:</p> binding level share the same subset of accessors:</p>
@ -1885,19 +1886,19 @@ interface.</p>
<p>DTD is the acronym for Document Type Definition. This is a description of <p>DTD is the acronym for Document Type Definition. This is a description of
the content for a family of XML files. This is part of the XML 1.0 the content for a family of XML files. This is part of the XML 1.0
specification, and allows to describe and check that a given document specification, and allows one to describe and verify that a given document
instance conforms to a set of rules detailing its structure and content.</p> instance conforms to the set of rules detailing its structure and content.</p>
<p>Validation is the process of checking a document against a DTD (more <p>Validation is the process of checking a document against a DTD (more
generally against a set of construction rules).</p> generally against a set of construction rules).</p>
<p>The validation process and building DTDs are the two most difficult parts <p>The validation process and building DTDs are the two most difficult parts
of the XML life cycle. Briefly a DTD defines all the possibles element to be of the XML life cycle. Briefly a DTD defines all the possible elements to be
found within your document, what is the formal shape of your document tree found within your document, what is the formal shape of your document tree
(by defining the allowed content of an element, either text, a regular (by defining the allowed content of an element; either text, a regular
expression for the allowed list of children, or mixed content i.e. both text expression for the allowed list of children, or mixed content i.e. both text
and children). The DTD also defines the allowed attributes for all elements and children). The DTD also defines the valid attributes for all elements
and the types of the attributes.</p> and the types of those attributes.</p>
<h3><a name="definition1">The definition</a></h3> <h3><a name="definition1">The definition</a></h3>
@ -1916,9 +1917,9 @@ ancient...</p>
<h3><a name="Simple1">Simple rules</a></h3> <h3><a name="Simple1">Simple rules</a></h3>
<p>Writing DTD can be done in multiple ways, the rules to build them if you <p>Writing DTDs can be done in many ways. The rules to build them if you
need something fixed or something which can evolve over time can be radically need something permanent or something which can evolve over time can be radically
different. Really complex DTD like DocBook ones are flexible but quite harder different. Really complex DTDs like DocBook ones are flexible but quite harder
to design. I will just focus on DTDs for a formats with a fixed simple to design. I will just focus on DTDs for a formats with a fixed simple
structure. It is just a set of basic rules, and definitely not exhaustive nor structure. It is just a set of basic rules, and definitely not exhaustive nor
usable for complex DTD design.</p> usable for complex DTD design.</p>
@ -1933,14 +1934,14 @@ is placed in the file <code>mydtd</code> in the subdirectory
<p>Notes:</p> <p>Notes:</p>
<ul> <ul>
<li>the system string is actually an URI-Reference (as defined in <a <li>The system string is actually an URI-Reference (as defined in <a
href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a
full URL string indicating the location of your DTD on the Web, this is a full URL string indicating the location of your DTD on the Web. This is a
really good thing to do if you want others to validate your document</li> really good thing to do if you want others to validate your document.</li>
<li>it is also possible to associate a <code>PUBLIC</code> identifier (a <li>It is also possible to associate a <code>PUBLIC</code> identifier (a
magic string) so that the DTD is looked up in catalogs on the client side magic string) so that the DTD is looked up in catalogs on the client side
without having to locate it on the web</li> without having to locate it on the web.</li>
<li>a dtd contains a set of elements and attributes declarations, but they <li>A DTD contains a set of element and attribute declarations, but they
don't define what the root of the document should be. This is explicitly don't define what the root of the document should be. This is explicitly
told to the parser/validator as the first element of the told to the parser/validator as the first element of the
<code>DOCTYPE</code> declaration.</li> <code>DOCTYPE</code> declaration.</li>
@ -1952,7 +1953,7 @@ is placed in the file <code>mydtd</code> in the subdirectory
<p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p> <p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p>
<p>it also expresses that the spec element contains one <code>front</code>, <p>It also expresses that the spec element contains one <code>front</code>,
one <code>body</code> and one optional <code>back</code> children elements in one <code>body</code> and one optional <code>back</code> children elements in
this order. The declaration of one element of the structure and its content this order. The declaration of one element of the structure and its content
are done in a single declaration. Similarly the following declares are done in a single declaration. Similarly the following declares
@ -1960,7 +1961,7 @@ are done in a single declaration. Similarly the following declares
<p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p> <p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p>
<p>means div1 contains one <code>head</code> then a series of optional <p>which means div1 contains one <code>head</code> then a series of optional
<code>p</code>, <code>list</code>s and <code>note</code>s and then an <code>p</code>, <code>list</code>s and <code>note</code>s and then an
optional <code>div2</code>. And last but not least an element can contain optional <code>div2</code>. And last but not least an element can contain
text:</p> text:</p>
@ -1978,7 +1979,7 @@ order.</p>
<h4><a name="Declaring1">Declaring attributes</a>:</h4> <h4><a name="Declaring1">Declaring attributes</a>:</h4>
<p>again the attributes declaration includes their content definition:</p> <p>Again the attributes declaration includes their content definition:</p>
<p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p> <p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p>
@ -2012,36 +2013,36 @@ meaning that it is optional, or the default value (possibly prefixed by
<p>Notes:</p> <p>Notes:</p>
<ul> <ul>
<li>usually the attributes pertaining to a given element are declared in a <li>Usually the attributes pertaining to a given element are declared in a
single expression, but it is just a convention adopted by a lot of DTD single expression, but it is just a convention adopted by a lot of DTD
writers: writers:
<pre>&lt;!ATTLIST termdef <pre>&lt;!ATTLIST termdef
id ID #REQUIRED id ID #REQUIRED
name CDATA #IMPLIED&gt;</pre> name CDATA #IMPLIED&gt;</pre>
<p>The previous construct defines both <code>id</code> and <p>The previous construct defines both <code>id</code> and
<code>name</code> attributes for the element <code>termdef</code></p> <code>name</code> attributes for the element <code>termdef</code>.</p>
</li> </li>
</ul> </ul>
<h3><a name="Some1">Some examples</a></h3> <h3><a name="Some1">Some examples</a></h3>
<p>The directory <code>test/valid/dtds/</code> in the libxml distribution <p>The directory <code>test/valid/dtds/</code> in the libxml distribution
contains some complex DTD examples. The <code>test/valid/dia.xml</code> contains some complex DTD examples. The example in the file <code>test/valid/dia.xml</code>
example shows an XML file where the simple DTD is directly included within shows an XML file where the simple DTD is directly included within
the document.</p> the document.</p>
<h3><a name="validate1">How to validate</a></h3> <h3><a name="validate1">How to validate</a></h3>
<p>The simplest is to use the xmllint program coming with libxml. The <p>The simplest way is to use the xmllint program included with libxml. The
<code>--valid</code> option turn on validation of the files given as input, <code>--valid</code> option turns-on validation of the files given as input.
for example the following validates a copy of the first revision of the XML For example the following validates a copy of the first revision of the XML
1.0 specification:</p> 1.0 specification:</p>
<p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p> <p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p>
<p>the -- noout is used to not output the resulting tree.</p> <p>the -- noout is used to disable output of the resulting tree.</p>
<p>The <code>--dtdvalid dtd</code> allows to validate the document(s) against <p>The <code>--dtdvalid dtd</code> allows validation of the document(s) against
a given DTD.</p> a given DTD.</p>
<p>Libxml exports an API to handle DTDs and validation, check the <a <p>Libxml exports an API to handle DTDs and validation, check the <a

View File

@ -90,48 +90,49 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>Table of Content:</p> <p>Table of Content:</p>
<ol> <ol>
<li><a href="#General5">General overview</a></li> <li><a href="#General5">General overview</a></li>
<li><a href="#definition">The definition</a></li> <li><a href="#definition">The definition</a></li>
<li> <li>
<a href="#Simple">Simple rules</a><ol> <a href="#Simple">Simple rules</a>
<ol>
<li><a href="#reference">How to reference a DTD from a document</a></li> <li><a href="#reference">How to reference a DTD from a document</a></li>
<li><a href="#Declaring">Declaring elements</a></li> <li><a href="#Declaring">Declaring elements</a></li>
<li><a href="#Declaring1">Declaring attributes</a></li> <li><a href="#Declaring1">Declaring attributes</a></li>
</ol> </ol>
</li> </li>
<li><a href="#Some">Some examples</a></li> <li><a href="#Some">Some examples</a></li>
<li><a href="#validate">How to validate</a></li> <li><a href="#validate">How to validate</a></li>
<li><a href="#Other">Other resources</a></li> <li><a href="#Other">Other resources</a></li>
</ol> </ol>
<h3><a name="General5">General overview</a></h3> <h3><a name="General5">General overview</a></h3>
<p>Well what is validation and what is a DTD ?</p> <p>Well what is validation and what is a DTD ?</p>
<p>DTD is the acronym for Document Type Definition. This is a description of <p>DTD is the acronym for Document Type Definition. This is a description of
the content for a family of XML files. This is part of the XML 1.0 the content for a family of XML files. This is part of the XML 1.0
specification, and allows to describe and check that a given document specification, and allows one to describe and verify that a given document
instance conforms to a set of rules detailing its structure and content.</p> instance conforms to the set of rules detailing its structure and content.</p>
<p>Validation is the process of checking a document against a DTD (more <p>Validation is the process of checking a document against a DTD (more
generally against a set of construction rules).</p> generally against a set of construction rules).</p>
<p>The validation process and building DTDs are the two most difficult parts <p>The validation process and building DTDs are the two most difficult parts
of the XML life cycle. Briefly a DTD defines all the possibles element to be of the XML life cycle. Briefly a DTD defines all the possible elements to be
found within your document, what is the formal shape of your document tree found within your document, what is the formal shape of your document tree
(by defining the allowed content of an element, either text, a regular (by defining the allowed content of an element; either text, a regular
expression for the allowed list of children, or mixed content i.e. both text expression for the allowed list of children, or mixed content i.e. both text
and children). The DTD also defines the allowed attributes for all elements and children). The DTD also defines the valid attributes for all elements
and the types of the attributes.</p> and the types of those attributes.</p>
<h3><a name="definition1">The definition</a></h3> <h3><a name="definition1">The definition</a></h3>
<p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a href="http://www.xml.com/axml/axml.html">Tim Bray's annotated version of <p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a href="http://www.xml.com/axml/axml.html">Tim Bray's annotated version of
Rev1</a>):</p> Rev1</a>):</p>
<ul> <ul>
<li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring <li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring
elements</a></li> elements</a></li>
<li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring <li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring
attributes</a></li> attributes</a></li>
</ul> </ul>
<p>(unfortunately) all this is inherited from the SGML world, the syntax is <p>(unfortunately) all this is inherited from the SGML world, the syntax is
ancient...</p> ancient...</p>
<h3><a name="Simple1">Simple rules</a></h3> <h3><a name="Simple1">Simple rules</a></h3>
<p>Writing DTD can be done in multiple ways, the rules to build them if you <p>Writing DTDs can be done in many ways. The rules to build them if you
need something fixed or something which can evolve over time can be radically need something permanent or something which can evolve over time can be radically
different. Really complex DTD like DocBook ones are flexible but quite harder different. Really complex DTDs like DocBook ones are flexible but quite harder
to design. I will just focus on DTDs for a formats with a fixed simple to design. I will just focus on DTDs for a formats with a fixed simple
structure. It is just a set of basic rules, and definitely not exhaustive nor structure. It is just a set of basic rules, and definitely not exhaustive nor
usable for complex DTD design.</p> usable for complex DTD design.</p>
@ -143,13 +144,13 @@ is placed in the file <code>mydtd</code> in the subdirectory
<p><code>&lt;!DOCTYPE spec SYSTEM &quot;dtds/mydtd&quot;&gt;</code></p> <p><code>&lt;!DOCTYPE spec SYSTEM &quot;dtds/mydtd&quot;&gt;</code></p>
<p>Notes:</p> <p>Notes:</p>
<ul> <ul>
<li>the system string is actually an URI-Reference (as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a <li>The system string is actually an URI-Reference (as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a
full URL string indicating the location of your DTD on the Web, this is a full URL string indicating the location of your DTD on the Web. This is a
really good thing to do if you want others to validate your document</li> really good thing to do if you want others to validate your document.</li>
<li>it is also possible to associate a <code>PUBLIC</code> identifier (a <li>It is also possible to associate a <code>PUBLIC</code> identifier (a
magic string) so that the DTD is looked up in catalogs on the client side magic string) so that the DTD is looked up in catalogs on the client side
without having to locate it on the web</li> without having to locate it on the web.</li>
<li>a dtd contains a set of elements and attributes declarations, but they <li>A DTD contains a set of element and attribute declarations, but they
don't define what the root of the document should be. This is explicitly don't define what the root of the document should be. This is explicitly
told to the parser/validator as the first element of the told to the parser/validator as the first element of the
<code>DOCTYPE</code> declaration.</li> <code>DOCTYPE</code> declaration.</li>
@ -158,13 +159,13 @@ is placed in the file <code>mydtd</code> in the subdirectory
<a name="Declaring2">Declaring elements</a>:</h4> <a name="Declaring2">Declaring elements</a>:</h4>
<p>The following declares an element <code>spec</code>:</p> <p>The following declares an element <code>spec</code>:</p>
<p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p> <p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p>
<p>it also expresses that the spec element contains one <code>front</code>, <p>It also expresses that the spec element contains one <code>front</code>,
one <code>body</code> and one optional <code>back</code> children elements in one <code>body</code> and one optional <code>back</code> children elements in
this order. The declaration of one element of the structure and its content this order. The declaration of one element of the structure and its content
are done in a single declaration. Similarly the following declares are done in a single declaration. Similarly the following declares
<code>div1</code> elements:</p> <code>div1</code> elements:</p>
<p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p> <p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p>
<p>means div1 contains one <code>head</code> then a series of optional <p>which means div1 contains one <code>head</code> then a series of optional
<code>p</code>, <code>list</code>s and <code>note</code>s and then an <code>p</code>, <code>list</code>s and <code>note</code>s and then an
optional <code>div2</code>. And last but not least an element can contain optional <code>div2</code>. And last but not least an element can contain
text:</p> text:</p>
@ -179,7 +180,7 @@ in no particular order):</p>
order.</p> order.</p>
<h4> <h4>
<a name="Declaring1">Declaring attributes</a>:</h4> <a name="Declaring1">Declaring attributes</a>:</h4>
<p>again the attributes declaration includes their content definition:</p> <p>Again the attributes declaration includes their content definition:</p>
<p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p> <p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p>
<p>means that the element <code>termdef</code> can have a <code>name</code> <p>means that the element <code>termdef</code> can have a <code>name</code>
attribute containing text (<code>CDATA</code>) and which is optional attribute containing text (<code>CDATA</code>) and which is optional
@ -204,36 +205,39 @@ IDREF:</p>
meaning that it is optional, or the default value (possibly prefixed by meaning that it is optional, or the default value (possibly prefixed by
<code>#FIXED</code> if it is the only allowed).</p> <code>#FIXED</code> if it is the only allowed).</p>
<p>Notes:</p> <p>Notes:</p>
<ul><li>usually the attributes pertaining to a given element are declared in a <ul>
<li>Usually the attributes pertaining to a given element are declared in a
single expression, but it is just a convention adopted by a lot of DTD single expression, but it is just a convention adopted by a lot of DTD
writers: writers:
<pre>&lt;!ATTLIST termdef <pre>&lt;!ATTLIST termdef
id ID #REQUIRED id ID #REQUIRED
name CDATA #IMPLIED&gt;</pre> name CDATA #IMPLIED&gt;</pre>
<p>The previous construct defines both <code>id</code> and <p>The previous construct defines both <code>id</code> and
<code>name</code> attributes for the element <code>termdef</code> <code>name</code> attributes for the element <code>termdef</code>.</p>
</p> </li>
</li></ul> </ul>
<h3><a name="Some1">Some examples</a></h3> <h3><a name="Some1">Some examples</a></h3>
<p>The directory <code>test/valid/dtds/</code> in the libxml distribution <p>The directory <code>test/valid/dtds/</code> in the libxml distribution
contains some complex DTD examples. The <code>test/valid/dia.xml</code> contains some complex DTD examples. The example in the file <code>test/valid/dia.xml</code>
example shows an XML file where the simple DTD is directly included within shows an XML file where the simple DTD is directly included within
the document.</p> the document.</p>
<h3><a name="validate1">How to validate</a></h3> <h3><a name="validate1">How to validate</a></h3>
<p>The simplest is to use the xmllint program coming with libxml. The <p>The simplest way is to use the xmllint program included with libxml. The
<code>--valid</code> option turn on validation of the files given as input, <code>--valid</code> option turns-on validation of the files given as input.
for example the following validates a copy of the first revision of the XML For example the following validates a copy of the first revision of the XML
1.0 specification:</p> 1.0 specification:</p>
<p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p> <p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p>
<p>the -- noout is used to not output the resulting tree.</p> <p>the -- noout is used to disable output of the resulting tree.</p>
<p>The <code>--dtdvalid dtd</code> allows to validate the document(s) against <p>The <code>--dtdvalid dtd</code> allows validation of the document(s) against
a given DTD.</p> a given DTD.</p>
<p>Libxml exports an API to handle DTDs and validation, check the <a href="http://xmlsoft.org/html/libxml-valid.html">associated <p>Libxml exports an API to handle DTDs and validation, check the <a href="http://xmlsoft.org/html/libxml-valid.html">associated
description</a>.</p> description</a>.</p>
<h3><a name="Other1">Other resources</a></h3> <h3><a name="Other1">Other resources</a></h3>
<p>DTDs are as old as SGML. So there may be a number of examples on-line, I <p>DTDs are as old as SGML. So there may be a number of examples on-line, I
will just list one for now, others pointers welcome:</p> will just list one for now, others pointers welcome:</p>
<ul><li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li></ul> <ul>
<li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li>
</ul>
<p>I suggest looking at the examples found under test/valid/dtd and any of <p>I suggest looking at the examples found under test/valid/dtd and any of
the large number of books available on XML. The dia example in test/valid the large number of books available on XML. The dia example in test/valid
should be both simple and complete enough to allow you to build your own.</p> should be both simple and complete enough to allow you to build your own.</p>

View File

@ -90,11 +90,11 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>Table of Content:</p> <p>Table of Content:</p>
<ol> <ol>
<li><a href="#General1">General overview</a></li> <li><a href="#General1">General overview</a></li>
<li><a href="#basic">The basic buffer type</a></li> <li><a href="#basic">The basic buffer type</a></li>
<li><a href="#Input">Input I/O handlers</a></li> <li><a href="#Input">Input I/O handlers</a></li>
<li><a href="#Output">Output I/O handlers</a></li> <li><a href="#Output">Output I/O handlers</a></li>
<li><a href="#entities">The entities loader</a></li> <li><a href="#entities">The entities loader</a></li>
<li><a href="#Example2">Example of customized I/O</a></li> <li><a href="#Example2">Example of customized I/O</a></li>
</ol> </ol>
<h3><a name="General1">General overview</a></h3> <h3><a name="General1">General overview</a></h3>
<p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides <p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides
@ -107,35 +107,35 @@ the interfaces to the libxml I/O system. This consists of 4 main parts:</p>
<code>xmlGetExternalEntityLoader()</code> and <code>xmlGetExternalEntityLoader()</code> and
<code>xmlSetExternalEntityLoader()</code>. <a href="#entities">Check the <code>xmlSetExternalEntityLoader()</code>. <a href="#entities">Check the
example</a>.</li> example</a>.</li>
<li>Input I/O buffers which are a commodity structure used by the parser(s) <li>Input I/O buffers which are a commodity structure used by the parser(s)
input layer to handle fetching the informations to feed the parser. This input layer to handle fetching the informations to feed the parser. This
provides buffering and is also a placeholder where the encoding provides buffering and is also a placeholder where the encoding
converters to UTF8 are piggy-backed.</li> converters to UTF8 are piggy-backed.</li>
<li>Output I/O buffers are similar to the Input ones and fulfill similar <li>Output I/O buffers are similar to the Input ones and fulfill similar
task but when generating a serialization from a tree.</li> task but when generating a serialization from a tree.</li>
<li>A mechanism to register sets of I/O callbacks and associate them with <li>A mechanism to register sets of I/O callbacks and associate them with
specific naming schemes like the protocol part of the URIs. specific naming schemes like the protocol part of the URIs.
<p>This affect the default I/O operations and allows to use specific I/O <p>This affect the default I/O operations and allows to use specific I/O
handlers for certain names.</p> handlers for certain names.</p>
</li> </li>
</ul> </ul>
<p>The general mechanism used when loading http://rpmfind.net/xml.html for <p>The general mechanism used when loading http://rpmfind.net/xml.html for
example in the HTML parser is the following:</p> example in the HTML parser is the following:</p>
<ol> <ol>
<li>The default entity loader calls <code>xmlNewInputFromFile()</code> with <li>The default entity loader calls <code>xmlNewInputFromFile()</code> with
the parsing context and the URI string.</li> the parsing context and the URI string.</li>
<li>the URI string is checked against the existing registered handlers <li>the URI string is checked against the existing registered handlers
using their match() callback function, if the HTTP module was compiled using their match() callback function, if the HTTP module was compiled
in, it is registered and its match() function will succeeds</li> in, it is registered and its match() function will succeeds</li>
<li>the open() function of the handler is called and if successful will <li>the open() function of the handler is called and if successful will
return an I/O Input buffer</li> return an I/O Input buffer</li>
<li>the parser will the start reading from this buffer and progressively <li>the parser will the start reading from this buffer and progressively
fetch information from the resource, calling the read() function of the fetch information from the resource, calling the read() function of the
handler until the resource is exhausted</li> handler until the resource is exhausted</li>
<li>if an encoding change is detected it will be installed on the input <li>if an encoding change is detected it will be installed on the input
buffer, providing buffering and efficient use of the conversion buffer, providing buffering and efficient use of the conversion
routines</li> routines</li>
<li>once the parser has finished, the close() function of the handler is <li>once the parser has finished, the close() function of the handler is
called once and the Input buffer and associated resources are called once and the Input buffer and associated resources are
deallocated.</li> deallocated.</li>
</ol> </ol>
@ -143,7 +143,7 @@ example in the HTML parser is the following:</p>
default libxml I/O routines.</p> default libxml I/O routines.</p>
<h3><a name="basic">The basic buffer type</a></h3> <h3><a name="basic">The basic buffer type</a></h3>
<p>All the buffer manipulation handling is done using the <p>All the buffer manipulation handling is done using the
<code>xmlBuffer</code> type define in <code><a href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a></code>which is a <code>xmlBuffer</code> type define in <code><a href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a> </code>which is a
resizable memory buffer. The buffer allocation strategy can be selected to be resizable memory buffer. The buffer allocation strategy can be selected to be
either best-fit or use an exponential doubling one (CPU vs. memory use either best-fit or use an exponential doubling one (CPU vs. memory use
trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and
@ -239,8 +239,8 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre> } </pre>
</li> </li>
<li>And then use it to save the document: <li>And then use it to save the document:
<pre>FILE *f; <pre>FILE *f;
xmlOutputBufferPtr output; xmlOutputBufferPtr output;
xmlDocPtr doc; xmlDocPtr doc;
@ -252,7 +252,7 @@ doc = ....
output = xmlOutputBufferCreateOwn(f, NULL); output = xmlOutputBufferCreateOwn(f, NULL);
res = xmlSaveFileTo(output, doc, NULL); res = xmlSaveFileTo(output, doc, NULL);
</pre> </pre>
</li> </li>
</ol> </ol>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>

View File

@ -90,10 +90,10 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>Table of Content:</p> <p>Table of Content:</p>
<ol> <ol>
<li><a href="#General3">General overview</a></li> <li><a href="#General3">General overview</a></li>
<li><a href="#setting">Setting libxml set of memory routines</a></li> <li><a href="#setting">Setting libxml set of memory routines</a></li>
<li><a href="#cleanup">Cleaning up after parsing</a></li> <li><a href="#cleanup">Cleaning up after parsing</a></li>
<li><a href="#Debugging">Debugging routines</a></li> <li><a href="#Debugging">Debugging routines</a></li>
<li><a href="#General4">General memory requirements</a></li> <li><a href="#General4">General memory requirements</a></li>
</ol> </ol>
<h3><a name="General3">General overview</a></h3> <h3><a name="General3">General overview</a></h3>
<p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code> <p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code>
@ -101,9 +101,9 @@ provides the interfaces to the libxml memory system:</p>
<ul> <ul>
<li>libxml does not use the libc memory allocator directly but xmlFree(), <li>libxml does not use the libc memory allocator directly but xmlFree(),
xmlMalloc() and xmlRealloc()</li> xmlMalloc() and xmlRealloc()</li>
<li>those routines can be reallocated to a specific set of routine, by <li>those routines can be reallocated to a specific set of routine, by
default the libc ones i.e. free(), malloc() and realloc()</li> default the libc ones i.e. free(), malloc() and realloc()</li>
<li>the xmlmemory.c module includes a set of debugging routine</li> <li>the xmlmemory.c module includes a set of debugging routine</li>
</ul> </ul>
<h3><a name="setting">Setting libxml set of memory routines</a></h3> <h3><a name="setting">Setting libxml set of memory routines</a></h3>
<p>It is sometimes useful to not use the default memory allocator, either for <p>It is sometimes useful to not use the default memory allocator, either for
@ -113,7 +113,7 @@ debugging, analysis or to implement a specific behaviour on memory management
<li> <li>
<a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet
()</a> which return the current set of functions in use by the parser</li> ()</a> which return the current set of functions in use by the parser</li>
<li> <li>
<a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a> <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a>
which allow to set up a new set of memory allocation functions</li> which allow to set up a new set of memory allocation functions</li>
</ul> </ul>
@ -132,7 +132,7 @@ reuse the parser immediately:</p>
()</a> is a centralized routine to free the parsing states. Note that it ()</a> is a centralized routine to free the parsing states. Note that it
won't deallocate any produced tree if any (use the xmlFreeDoc() and won't deallocate any produced tree if any (use the xmlFreeDoc() and
related routines for this).</li> related routines for this).</li>
<li> <li>
<a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser <a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser
()</a> is the dual routine allowing to preallocate the parsing state ()</a> is the dual routine allowing to preallocate the parsing state
which can be useful for example to avoid initialization reentrancy which can be useful for example to avoid initialization reentrancy
@ -149,10 +149,11 @@ other debugging routines allow to dump the memory allocated infos to a file
or call a specific routine when a given block number is allocated:</p> or call a specific routine when a given block number is allocated:</p>
<ul> <ul>
<li> <li>
<a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a> <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a>
<a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a>
and <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a> and <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a>
are the memory debugging replacement allocation routines</li> are the memory debugging replacement allocation routines</li>
<li> <li>
<a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump
()</a> dumps all the informations about the allocated memory block lefts ()</a> dumps all the informations about the allocated memory block lefts
in the <code>.memdump</code> file</li> in the <code>.memdump</code> file</li>
@ -170,15 +171,15 @@ but not always. Assuming the allocation problem is reproducible, it is
possible to find more easily:</p> possible to find more easily:</p>
<ol> <ol>
<li>write down the block number xxxx not allocated</li> <li>write down the block number xxxx not allocated</li>
<li>export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest <li>export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest
when using GDB is to simply give the command when using GDB is to simply give the command
<p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p> <p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p>
<p>before running the program.</p> <p>before running the program.</p>
</li> </li>
<li>run the program under a debugger and set a breakpoint on <li>run the program under a debugger and set a breakpoint on
xmlMallocBreakpoint() a specific function called when this precise block xmlMallocBreakpoint() a specific function called when this precise block
is allocated</li> is allocated</li>
<li>when the breakpoint is reached you can then do a fine analysis of the <li>when the breakpoint is reached you can then do a fine analysis of the
allocation an step to see the condition resulting in the missing allocation an step to see the condition resulting in the missing
deallocation.</li> deallocation.</li>
</ol> </ol>
@ -197,7 +198,7 @@ of a number of things:</p>
The I/O and encoding handlers will probably account for a few KBytes. The I/O and encoding handlers will probably account for a few KBytes.
This is true for both the XML and HTML parser (though the HTML parser This is true for both the XML and HTML parser (though the HTML parser
need more state).</li> need more state).</li>
<li>If you are generating the DOM tree then memory requirements will grow <li>If you are generating the DOM tree then memory requirements will grow
nearly linear with the size of the data. In general for a balanced nearly linear with the size of the data. In general for a balanced
textual document the internal memory requirement is about 4 times the textual document the internal memory requirement is about 4 times the
size of the UTF8 serialization of this document (example the XML-1.0 size of the UTF8 serialization of this document (example the XML-1.0
@ -205,7 +206,7 @@ of a number of things:</p>
memory when parsed). Validation will add a amount of memory required for memory when parsed). Validation will add a amount of memory required for
maintaining the external Dtd state which should be linear with the maintaining the external Dtd state which should be linear with the
complexity of the content model defined by the Dtd</li> complexity of the content model defined by the Dtd</li>
<li>If you don't care about the advanced features of libxml like <li>If you don't care about the advanced features of libxml like
validation, DOM, XPath or XPointer, but really need to work fixed memory validation, DOM, XPath or XPointer, but really need to work fixed memory
requirements, then the SAX interface should be used.</li> requirements, then the SAX interface should be used.</li>
</ul> </ul>