[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[382abcaf] | 7 | <!-- Also update the download, md5, size entities in libxml2py2.xml -->
|
---|
[8180b89] | 8 | <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.gz">
|
---|
| 9 | <!ENTITY libxml2-download-ftp "ftp://xmlsoft.org/libxml2/libxml2-&libxml2-version;.tar.gz">
|
---|
[cbb1dd2] | 10 | <!ENTITY libxml2-md5sum "f433a39be087a9f0b197eb2307ad9f75">
|
---|
[df013c7f] | 11 | <!ENTITY libxml2-size "5.4 MB">
|
---|
[cbb1dd2] | 12 | <!ENTITY libxml2-buildsize "116 MB (with tests)">
|
---|
| 13 | <!ENTITY libxml2-time "0.4 SBU (with tests)">
|
---|
[6b262734] | 14 | <!ENTITY testsuite-version "20130923">
|
---|
[52d29f7] | 15 | ]>
|
---|
| 16 |
|
---|
[f45b1953] | 17 | <sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
|
---|
[1515ed8a] | 18 | <?dbhtml filename="libxml2.html"?>
|
---|
[8e75f8b9] | 19 |
|
---|
[1515ed8a] | 20 | <sect1info>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
[8e75f8b9] | 23 |
|
---|
[437700ae] | 24 | <title>libxml2-&libxml2-version;</title>
|
---|
[8e75f8b9] | 25 |
|
---|
[1515ed8a] | 26 | <indexterm zone="libxml2">
|
---|
[8180b89] | 27 | <primary sortas="a-libxml2">libxml2</primary>
|
---|
[1515ed8a] | 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
[437700ae] | 31 | <title>Introduction to libxml2</title>
|
---|
[8e75f8b9] | 32 |
|
---|
[325113f8] | 33 | <para>
|
---|
[8180b89] | 34 | The <application>libxml2</application> package contains libraries
|
---|
| 35 | and utilities used for parsing XML files.
|
---|
[325113f8] | 36 | </para>
|
---|
[8e75f8b9] | 37 |
|
---|
[bfbc72a] | 38 | &lfs101_checked;
|
---|
[7f4cdbc0] | 39 |
|
---|
[1515ed8a] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
[8180b89] | 43 | <para>
|
---|
| 44 | Download (HTTP): <ulink url="&libxml2-download-http;"/>
|
---|
| 45 | </para>
|
---|
[1515ed8a] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[8180b89] | 48 | <para>
|
---|
| 49 | Download (FTP): <ulink url="&libxml2-download-ftp;"/>
|
---|
| 50 | </para>
|
---|
[1515ed8a] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[8180b89] | 53 | <para>
|
---|
| 54 | Download MD5 sum: &libxml2-md5sum;
|
---|
| 55 | </para>
|
---|
[1515ed8a] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[8180b89] | 58 | <para>
|
---|
| 59 | Download size: &libxml2-size;
|
---|
| 60 | </para>
|
---|
[1515ed8a] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[8180b89] | 63 | <para>
|
---|
| 64 | Estimated disk space required: &libxml2-buildsize;
|
---|
| 65 | </para>
|
---|
[1515ed8a] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[8180b89] | 68 | <para>
|
---|
| 69 | Estimated build time: &libxml2-time;
|
---|
| 70 | </para>
|
---|
[1515ed8a] | 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
[8e75f8b9] | 73 |
|
---|
[9a788838] | 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[8180b89] | 75 | <itemizedlist spacing="compact">
|
---|
[5da63eb] | 76 | <listitem>
|
---|
[325113f8] | 77 | <para>
|
---|
| 78 | Optional Testsuite:
|
---|
[c6b192c] | 79 | <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
---|
[325113f8] | 80 | enables <command>make check</command> to do complete testing.
|
---|
| 81 | </para>
|
---|
[5da63eb] | 82 | </listitem>
|
---|
[9a788838] | 83 | </itemizedlist>
|
---|
[5da63eb] | 84 |
|
---|
[437700ae] | 85 | <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
---|
[0b312a7] | 86 | <!-- do not advertize python2 here, except in the note below
|
---|
| 87 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 88 | <para role="optional">
|
---|
| 89 | <xref linkend="python2"/>
|
---|
| 90 | </para>
|
---|
| 91 | -->
|
---|
[60ddbaf] | 92 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 93 | <para role="optional">
|
---|
[0b312a7] | 94 | <xref linkend="icu"/> (see below) and
|
---|
| 95 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
[325113f8] | 96 | </para>
|
---|
[0af6ce1] | 97 |
|
---|
[1aadfdf] | 98 | <note>
|
---|
[cd964c8] | 99 | <para>
|
---|
| 100 | The old <application>Python2</application> module can be built after
|
---|
| 101 | <filename class="libraryfile">libxml2.so</filename> has been installed,
|
---|
| 102 | see <xref linkend="libxml2py2"/>.
|
---|
[325113f8] | 103 | </para>
|
---|
[1aadfdf] | 104 | </note>
|
---|
| 105 |
|
---|
[325113f8] | 106 | <para condition="html" role="usernotes">
|
---|
| 107 | User Notes: <ulink url="&blfs-wiki;/libxml2"/>
|
---|
| 108 | </para>
|
---|
[1515ed8a] | 109 | </sect2>
|
---|
[8e75f8b9] | 110 |
|
---|
[1515ed8a] | 111 | <sect2 role="installation">
|
---|
[437700ae] | 112 | <title>Installation of libxml2</title>
|
---|
[1b8bba3] | 113 |
|
---|
[325113f8] | 114 | <para>
|
---|
| 115 | Install <application>libxml2</application> by running the following
|
---|
| 116 | commands:
|
---|
| 117 | </para>
|
---|
[1515ed8a] | 118 |
|
---|
[f2e7e668] | 119 | <screen><userinput>./configure --prefix=/usr \
|
---|
[60ddbaf] | 120 | --disable-static \
|
---|
| 121 | --with-history \
|
---|
| 122 | --with-python=/usr/bin/python3 &&
|
---|
[1515ed8a] | 123 | make</userinput></screen>
|
---|
| 124 |
|
---|
[d56e7df] | 125 | <para>
|
---|
| 126 | If you downloaded the testsuite, issue the following command:
|
---|
| 127 | </para>
|
---|
[6000a3e] | 128 |
|
---|
| 129 | <screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
---|
| 130 |
|
---|
[8180b89] | 131 | <para>
|
---|
[beee921] | 132 | To test the results, issue: <command>make check > check.log</command>.
|
---|
| 133 | A summary of the results can be obtained with <command>grep -E
|
---|
| 134 | '^Total|expected' check.log</command>. If <xref linkend="valgrind"/> is
|
---|
[cbb1dd2] | 135 | installed and you want to check for memory leaks, replace
|
---|
[beee921] | 136 | <command>check</command> with <command>check-valgrind</command>.
|
---|
[8180b89] | 137 | </para>
|
---|
[8e75f8b9] | 138 |
|
---|
[cf83ea8] | 139 | <note>
|
---|
| 140 | <para>
|
---|
| 141 | The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
---|
| 142 | to test parsing of external entities. If the machine where you run the
|
---|
| 143 | tests serves as a web site, the tests may hang, depending on the
|
---|
| 144 | content of the file served. It is therefore recommended to shut down
|
---|
| 145 | the server during the tests, as the <systemitem
|
---|
| 146 | class="username">root</systemitem> user:
|
---|
| 147 | </para>
|
---|
| 148 |
|
---|
| 149 | <screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
---|
| 150 | <screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
---|
| 151 |
|
---|
| 152 | </note>
|
---|
[0b312a7] | 153 |
|
---|
[325113f8] | 154 | <para>
|
---|
| 155 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 156 | </para>
|
---|
[8e75f8b9] | 157 |
|
---|
[1515ed8a] | 158 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 159 | </sect2>
|
---|
[8e75f8b9] | 160 |
|
---|
[1515ed8a] | 161 | <sect2 role="commands">
|
---|
| 162 | <title>Command Explanations</title>
|
---|
| 163 |
|
---|
[325113f8] | 164 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 165 | href="../../xincludes/static-libraries.xml"/>
|
---|
[0b312a7] | 166 |
|
---|
[325113f8] | 167 | <para>
|
---|
[f48df219] | 168 | <parameter>--with-history</parameter>: This switch enables
|
---|
[325113f8] | 169 | <application>Readline</application> support when running
|
---|
| 170 | <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
---|
| 171 | </para>
|
---|
[8180b89] | 172 |
|
---|
[f48df219] | 173 | <para>
|
---|
[177d84bd] | 174 | <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
|
---|
[6c6f393] | 175 | the libxml2 module with Python3 instead of Python2.
|
---|
[f48df219] | 176 | </para>
|
---|
| 177 |
|
---|
[ca25773c] | 178 | <para>
|
---|
| 179 | <option>--with-icu</option>: Add this switch if you have built
|
---|
| 180 | <xref linkend="icu"/>, for better unicode support.
|
---|
| 181 | </para>
|
---|
| 182 |
|
---|
| 183 | <para>
|
---|
| 184 | <option>--with-threads</option>: Add this switch to enable multithread
|
---|
| 185 | support.
|
---|
| 186 | </para>
|
---|
| 187 |
|
---|
[1515ed8a] | 188 | </sect2>
|
---|
[8e75f8b9] | 189 |
|
---|
[1515ed8a] | 190 | <sect2 role="content">
|
---|
| 191 | <title>Contents</title>
|
---|
| 192 |
|
---|
| 193 | <segmentedlist>
|
---|
| 194 | <segtitle>Installed Programs</segtitle>
|
---|
| 195 | <segtitle>Installed Libraries</segtitle>
|
---|
| 196 | <segtitle>Installed Directories</segtitle>
|
---|
[8e75f8b9] | 197 |
|
---|
[1515ed8a] | 198 | <seglistitem>
|
---|
[325113f8] | 199 | <seg>
|
---|
[177d84bd] | 200 | xml2-config,
|
---|
| 201 | xmlcatalog, and
|
---|
| 202 | xmllint <!--and the
|
---|
[cd964c8] | 203 | drv_libxml2.py and libxml2.py <application>Python3</application>
|
---|
[177d84bd] | 204 | modules. These are pythin modules, not programs -->
|
---|
[325113f8] | 205 | </seg>
|
---|
| 206 | <seg>
|
---|
[177d84bd] | 207 | libxml2.so and
|
---|
| 208 | libxml2mod.so (<application>Python3</application> module)
|
---|
[325113f8] | 209 | </seg>
|
---|
| 210 | <seg>
|
---|
| 211 | /usr/include/libxml2,
|
---|
[ec91d9f2] | 212 | /usr/lib/cmake/libxml2,
|
---|
[325113f8] | 213 | /usr/share/doc/libxml2-&libxml2-version;,
|
---|
[ec91d9f2] | 214 | /usr/share/doc/libxml2-python-&libxml2-version;, and
|
---|
[325113f8] | 215 | /usr/share/gtk-doc/html/libxml2
|
---|
| 216 | </seg>
|
---|
[1515ed8a] | 217 | </seglistitem>
|
---|
| 218 | </segmentedlist>
|
---|
[8e75f8b9] | 219 |
|
---|
[1515ed8a] | 220 | <variablelist>
|
---|
| 221 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 222 | <?dbfo list-presentation="list"?>
|
---|
| 223 | <?dbhtml list-presentation="table"?>
|
---|
[8e75f8b9] | 224 |
|
---|
[1515ed8a] | 225 | <varlistentry id="xml2-config">
|
---|
| 226 | <term><command>xml2-config</command></term>
|
---|
| 227 | <listitem>
|
---|
[325113f8] | 228 | <para>
|
---|
| 229 | determines the compile and linker flags that should be used to
|
---|
| 230 | compile and link programs that use
|
---|
[4c24eb0a] | 231 | <filename class="libraryfile">libxml2</filename>
|
---|
[325113f8] | 232 | </para>
|
---|
[1515ed8a] | 233 | <indexterm zone="libxml2 xml2-config">
|
---|
| 234 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
[8e75f8b9] | 238 |
|
---|
[1515ed8a] | 239 | <varlistentry id="xmlcatalog">
|
---|
| 240 | <term><command>xmlcatalog</command></term>
|
---|
| 241 | <listitem>
|
---|
[325113f8] | 242 | <para>
|
---|
[4c24eb0a] | 243 | is used to monitor and manipulate XML and SGML catalogs
|
---|
[325113f8] | 244 | </para>
|
---|
[1515ed8a] | 245 | <indexterm zone="libxml2 xmlcatalog">
|
---|
| 246 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
[8e75f8b9] | 250 |
|
---|
[1515ed8a] | 251 | <varlistentry id="xmllint">
|
---|
| 252 | <term><command>xmllint</command></term>
|
---|
| 253 | <listitem>
|
---|
[325113f8] | 254 | <para>
|
---|
| 255 | parses XML files and outputs reports (based upon options) to detect
|
---|
[4c24eb0a] | 256 | errors in XML coding
|
---|
[325113f8] | 257 | </para>
|
---|
[1515ed8a] | 258 | <indexterm zone="libxml2 xmllint">
|
---|
| 259 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
[177d84bd] | 263 | <!--
|
---|
[cd964c8] | 264 | <varlistentry id="drv_libxml2.py3">
|
---|
| 265 | <term><command>drv_libxml2.py</command></term>
|
---|
| 266 | <listitem>
|
---|
| 267 | <para>
|
---|
| 268 | is a SAX <application>Python3</application> driver for libxml2.
|
---|
| 269 | </para>
|
---|
| 270 | <indexterm zone="libxml2 drv_libxml2.py3">
|
---|
[4f29081] | 271 | <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
|
---|
[cd964c8] | 272 | </indexterm>
|
---|
| 273 | </listitem>
|
---|
| 274 | </varlistentry>
|
---|
| 275 |
|
---|
| 276 | <varlistentry id="libxml2.py3">
|
---|
| 277 | <term><command>libxml2.py</command></term>
|
---|
| 278 | <listitem>
|
---|
| 279 | <para>
|
---|
| 280 | is the <application>Python3</application> binding for libxml2.
|
---|
| 281 | </para>
|
---|
| 282 | <indexterm zone="libxml2 libxml2.py3">
|
---|
[4f29081] | 283 | <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
|
---|
[cd964c8] | 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
[177d84bd] | 287 | -->
|
---|
[1515ed8a] | 288 | <varlistentry id="libxml2-lib">
|
---|
[8180b89] | 289 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
[1515ed8a] | 290 | <listitem>
|
---|
[325113f8] | 291 | <para>
|
---|
| 292 | provides functions for programs to parse files that use the XML
|
---|
[4c24eb0a] | 293 | format
|
---|
[325113f8] | 294 | </para>
|
---|
[1515ed8a] | 295 | <indexterm zone="libxml2 libxml2-lib">
|
---|
[325113f8] | 296 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
[1515ed8a] | 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
[8180b89] | 300 |
|
---|
[cd964c8] | 301 | <varlistentry id="libxml2mod3">
|
---|
| 302 | <term><filename class="libraryfile">libxml2mod.so</filename></term>
|
---|
| 303 | <listitem>
|
---|
| 304 | <para>
|
---|
| 305 | is the interface for <application>Python3</application>
|
---|
[4c24eb0a] | 306 | to use <filename class="libraryfile">libxml2.so</filename>
|
---|
[cd964c8] | 307 | </para>
|
---|
| 308 | <indexterm zone="libxml2 libxml2mod3">
|
---|
| 309 | <primary sortas="c-libxml2mod">libxml2mod.so</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
[1515ed8a] | 314 | </variablelist>
|
---|
[8180b89] | 315 |
|
---|
[1515ed8a] | 316 | </sect2>
|
---|
[8180b89] | 317 |
|
---|
[f45b1953] | 318 | </sect1>
|
---|