1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +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,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>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>
@ -100,15 +100,15 @@ 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>
@ -121,18 +121,18 @@ A:link, A:visited, A:active { text-decoration: underline }
<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>
@ -143,10 +143,10 @@ A:link, A:visited, A:active { text-decoration: underline }
</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>
@ -154,9 +154,10 @@ A:link, A:visited, A:active { text-decoration: underline }
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>
@ -173,12 +174,12 @@ A:link, A:visited, A:active { text-decoration: underline }
<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
@ -186,52 +187,52 @@ A:link, A:visited, A:active { text-decoration: underline }
<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>
@ -261,12 +262,12 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
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>
@ -274,34 +275,34 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<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
@ -310,21 +311,21 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<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;
@ -335,12 +336,13 @@ 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 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;

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

@ -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

@ -87,29 +87,26 @@ 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>

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,9 +109,11 @@ 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>
<li>The <strong>libxslt</strong> module is also present there</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>

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,9 +91,9 @@ 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>
@ -126,13 +126,13 @@ languages:</p>
</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> :
@ -149,7 +149,7 @@ specification but don't claim to implement them:</p>
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>

View File

@ -100,13 +100,13 @@ 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 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,9 +91,11 @@ 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>
@ -264,8 +266,10 @@ it's actually not compiled in by default. The real fixes are:</p>
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
@ -381,7 +385,9 @@ it's actually not compiled in by default. The real fixes are:</p>
<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>
@ -498,7 +504,9 @@ it's actually not compiled in by default. The real fixes are:</p>
<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>
@ -556,7 +564,9 @@ it's actually not compiled in by default. The real fixes are:</p>
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>
@ -686,8 +696,10 @@ it's actually not compiled in by default. The real fixes are:</p>
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

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,11 +96,11 @@ 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>
@ -109,24 +109,21 @@ or libxslt wrappers or bindings:</p>
<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
@ -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,7 +160,7 @@ 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>

View File

@ -108,7 +108,7 @@ 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

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

@ -92,7 +92,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<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>
@ -106,17 +107,17 @@ A:link, A:visited, A:active { text-decoration: underline }
<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>
@ -129,9 +130,9 @@ Rev1</a>):</p>
<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

@ -149,7 +149,8 @@ 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>