[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 |
|
---|
[325113f] | 33 | <para>
|
---|
[8180b89] | 34 | The <application>libxml2</application> package contains libraries
|
---|
| 35 | and utilities used for parsing XML files.
|
---|
[325113f] | 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">
|
---|
[277c9f4e] | 76 | <listitem>
|
---|
| 77 | <para>
|
---|
| 78 | Required patch:
|
---|
| 79 | <ulink url="&patch-root;/libxml2-&libxml2-version;-security_fixes-1.patch"/>
|
---|
| 80 | </para>
|
---|
| 81 | </listitem>
|
---|
[5da63eb] | 82 | <listitem>
|
---|
[325113f] | 83 | <para>
|
---|
| 84 | Optional Testsuite:
|
---|
[c6b192c] | 85 | <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
---|
[325113f] | 86 | enables <command>make check</command> to do complete testing.
|
---|
| 87 | </para>
|
---|
[5da63eb] | 88 | </listitem>
|
---|
[9a788838] | 89 | </itemizedlist>
|
---|
[5da63eb] | 90 |
|
---|
[437700ae] | 91 | <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
---|
[0b312a7] | 92 | <!-- do not advertize python2 here, except in the note below
|
---|
| 93 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 94 | <para role="optional">
|
---|
| 95 | <xref linkend="python2"/>
|
---|
| 96 | </para>
|
---|
| 97 | -->
|
---|
[60ddbaf] | 98 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 99 | <para role="optional">
|
---|
[0b312a7] | 100 | <xref linkend="icu"/> (see below) and
|
---|
| 101 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
[325113f] | 102 | </para>
|
---|
[0af6ce1] | 103 |
|
---|
[1aadfdf] | 104 | <note>
|
---|
[cd964c8] | 105 | <para>
|
---|
| 106 | The old <application>Python2</application> module can be built after
|
---|
| 107 | <filename class="libraryfile">libxml2.so</filename> has been installed,
|
---|
| 108 | see <xref linkend="libxml2py2"/>.
|
---|
[325113f] | 109 | </para>
|
---|
[1aadfdf] | 110 | </note>
|
---|
| 111 |
|
---|
[325113f] | 112 | <para condition="html" role="usernotes">
|
---|
| 113 | User Notes: <ulink url="&blfs-wiki;/libxml2"/>
|
---|
| 114 | </para>
|
---|
[1515ed8a] | 115 | </sect2>
|
---|
[8e75f8b9] | 116 |
|
---|
[1515ed8a] | 117 | <sect2 role="installation">
|
---|
[437700ae] | 118 | <title>Installation of libxml2</title>
|
---|
[1b8bba3] | 119 |
|
---|
[325113f] | 120 | <para>
|
---|
| 121 | Install <application>libxml2</application> by running the following
|
---|
| 122 | commands:
|
---|
| 123 | </para>
|
---|
[1515ed8a] | 124 |
|
---|
[f2e7e668] | 125 | <screen><userinput>./configure --prefix=/usr \
|
---|
[60ddbaf] | 126 | --disable-static \
|
---|
| 127 | --with-history \
|
---|
| 128 | --with-python=/usr/bin/python3 &&
|
---|
[1515ed8a] | 129 | make</userinput></screen>
|
---|
| 130 |
|
---|
[d56e7df] | 131 | <para>
|
---|
| 132 | If you downloaded the testsuite, issue the following command:
|
---|
| 133 | </para>
|
---|
[6000a3e] | 134 |
|
---|
| 135 | <screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
---|
| 136 |
|
---|
[8180b89] | 137 | <para>
|
---|
[beee921] | 138 | To test the results, issue: <command>make check > check.log</command>.
|
---|
| 139 | A summary of the results can be obtained with <command>grep -E
|
---|
| 140 | '^Total|expected' check.log</command>. If <xref linkend="valgrind"/> is
|
---|
[cbb1dd2] | 141 | installed and you want to check for memory leaks, replace
|
---|
[beee921] | 142 | <command>check</command> with <command>check-valgrind</command>.
|
---|
[8180b89] | 143 | </para>
|
---|
[8e75f8b9] | 144 |
|
---|
[cf83ea8] | 145 | <note>
|
---|
| 146 | <para>
|
---|
| 147 | The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
---|
| 148 | to test parsing of external entities. If the machine where you run the
|
---|
| 149 | tests serves as a web site, the tests may hang, depending on the
|
---|
| 150 | content of the file served. It is therefore recommended to shut down
|
---|
| 151 | the server during the tests, as the <systemitem
|
---|
| 152 | class="username">root</systemitem> user:
|
---|
| 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
---|
| 156 | <screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
---|
| 157 |
|
---|
| 158 | </note>
|
---|
[0b312a7] | 159 |
|
---|
[325113f] | 160 | <para>
|
---|
| 161 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 162 | </para>
|
---|
[8e75f8b9] | 163 |
|
---|
[1515ed8a] | 164 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 165 | </sect2>
|
---|
[8e75f8b9] | 166 |
|
---|
[1515ed8a] | 167 | <sect2 role="commands">
|
---|
| 168 | <title>Command Explanations</title>
|
---|
| 169 |
|
---|
[325113f] | 170 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 171 | href="../../xincludes/static-libraries.xml"/>
|
---|
[0b312a7] | 172 |
|
---|
[325113f] | 173 | <para>
|
---|
[f48df219] | 174 | <parameter>--with-history</parameter>: This switch enables
|
---|
[325113f] | 175 | <application>Readline</application> support when running
|
---|
| 176 | <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
---|
| 177 | </para>
|
---|
[8180b89] | 178 |
|
---|
[f48df219] | 179 | <para>
|
---|
[177d84bd] | 180 | <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
|
---|
[6c6f393] | 181 | the libxml2 module with Python3 instead of Python2.
|
---|
[f48df219] | 182 | </para>
|
---|
| 183 |
|
---|
[ca25773] | 184 | <para>
|
---|
| 185 | <option>--with-icu</option>: Add this switch if you have built
|
---|
| 186 | <xref linkend="icu"/>, for better unicode support.
|
---|
| 187 | </para>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
| 190 | <option>--with-threads</option>: Add this switch to enable multithread
|
---|
| 191 | support.
|
---|
| 192 | </para>
|
---|
| 193 |
|
---|
[1515ed8a] | 194 | </sect2>
|
---|
[8e75f8b9] | 195 |
|
---|
[1515ed8a] | 196 | <sect2 role="content">
|
---|
| 197 | <title>Contents</title>
|
---|
| 198 |
|
---|
| 199 | <segmentedlist>
|
---|
| 200 | <segtitle>Installed Programs</segtitle>
|
---|
| 201 | <segtitle>Installed Libraries</segtitle>
|
---|
| 202 | <segtitle>Installed Directories</segtitle>
|
---|
[8e75f8b9] | 203 |
|
---|
[1515ed8a] | 204 | <seglistitem>
|
---|
[325113f] | 205 | <seg>
|
---|
[177d84bd] | 206 | xml2-config,
|
---|
| 207 | xmlcatalog, and
|
---|
| 208 | xmllint <!--and the
|
---|
[cd964c8] | 209 | drv_libxml2.py and libxml2.py <application>Python3</application>
|
---|
[177d84bd] | 210 | modules. These are pythin modules, not programs -->
|
---|
[325113f] | 211 | </seg>
|
---|
| 212 | <seg>
|
---|
[177d84bd] | 213 | libxml2.so and
|
---|
| 214 | libxml2mod.so (<application>Python3</application> module)
|
---|
[325113f] | 215 | </seg>
|
---|
| 216 | <seg>
|
---|
| 217 | /usr/include/libxml2,
|
---|
[ec91d9f] | 218 | /usr/lib/cmake/libxml2,
|
---|
[325113f] | 219 | /usr/share/doc/libxml2-&libxml2-version;,
|
---|
[ec91d9f] | 220 | /usr/share/doc/libxml2-python-&libxml2-version;, and
|
---|
[325113f] | 221 | /usr/share/gtk-doc/html/libxml2
|
---|
| 222 | </seg>
|
---|
[1515ed8a] | 223 | </seglistitem>
|
---|
| 224 | </segmentedlist>
|
---|
[8e75f8b9] | 225 |
|
---|
[1515ed8a] | 226 | <variablelist>
|
---|
| 227 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 228 | <?dbfo list-presentation="list"?>
|
---|
| 229 | <?dbhtml list-presentation="table"?>
|
---|
[8e75f8b9] | 230 |
|
---|
[1515ed8a] | 231 | <varlistentry id="xml2-config">
|
---|
| 232 | <term><command>xml2-config</command></term>
|
---|
| 233 | <listitem>
|
---|
[325113f] | 234 | <para>
|
---|
| 235 | determines the compile and linker flags that should be used to
|
---|
| 236 | compile and link programs that use
|
---|
[4c24eb0a] | 237 | <filename class="libraryfile">libxml2</filename>
|
---|
[325113f] | 238 | </para>
|
---|
[1515ed8a] | 239 | <indexterm zone="libxml2 xml2-config">
|
---|
| 240 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
[8e75f8b9] | 244 |
|
---|
[1515ed8a] | 245 | <varlistentry id="xmlcatalog">
|
---|
| 246 | <term><command>xmlcatalog</command></term>
|
---|
| 247 | <listitem>
|
---|
[325113f] | 248 | <para>
|
---|
[4c24eb0a] | 249 | is used to monitor and manipulate XML and SGML catalogs
|
---|
[325113f] | 250 | </para>
|
---|
[1515ed8a] | 251 | <indexterm zone="libxml2 xmlcatalog">
|
---|
| 252 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
[8e75f8b9] | 256 |
|
---|
[1515ed8a] | 257 | <varlistentry id="xmllint">
|
---|
| 258 | <term><command>xmllint</command></term>
|
---|
| 259 | <listitem>
|
---|
[325113f] | 260 | <para>
|
---|
| 261 | parses XML files and outputs reports (based upon options) to detect
|
---|
[4c24eb0a] | 262 | errors in XML coding
|
---|
[325113f] | 263 | </para>
|
---|
[1515ed8a] | 264 | <indexterm zone="libxml2 xmllint">
|
---|
| 265 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
[177d84bd] | 269 | <!--
|
---|
[cd964c8] | 270 | <varlistentry id="drv_libxml2.py3">
|
---|
| 271 | <term><command>drv_libxml2.py</command></term>
|
---|
| 272 | <listitem>
|
---|
| 273 | <para>
|
---|
| 274 | is a SAX <application>Python3</application> driver for libxml2.
|
---|
| 275 | </para>
|
---|
| 276 | <indexterm zone="libxml2 drv_libxml2.py3">
|
---|
[4f29081] | 277 | <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
|
---|
[cd964c8] | 278 | </indexterm>
|
---|
| 279 | </listitem>
|
---|
| 280 | </varlistentry>
|
---|
| 281 |
|
---|
| 282 | <varlistentry id="libxml2.py3">
|
---|
| 283 | <term><command>libxml2.py</command></term>
|
---|
| 284 | <listitem>
|
---|
| 285 | <para>
|
---|
| 286 | is the <application>Python3</application> binding for libxml2.
|
---|
| 287 | </para>
|
---|
| 288 | <indexterm zone="libxml2 libxml2.py3">
|
---|
[4f29081] | 289 | <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
|
---|
[cd964c8] | 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
[177d84bd] | 293 | -->
|
---|
[1515ed8a] | 294 | <varlistentry id="libxml2-lib">
|
---|
[8180b89] | 295 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
[1515ed8a] | 296 | <listitem>
|
---|
[325113f] | 297 | <para>
|
---|
| 298 | provides functions for programs to parse files that use the XML
|
---|
[4c24eb0a] | 299 | format
|
---|
[325113f] | 300 | </para>
|
---|
[1515ed8a] | 301 | <indexterm zone="libxml2 libxml2-lib">
|
---|
[325113f] | 302 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
[1515ed8a] | 303 | </indexterm>
|
---|
| 304 | </listitem>
|
---|
| 305 | </varlistentry>
|
---|
[8180b89] | 306 |
|
---|
[cd964c8] | 307 | <varlistentry id="libxml2mod3">
|
---|
| 308 | <term><filename class="libraryfile">libxml2mod.so</filename></term>
|
---|
| 309 | <listitem>
|
---|
| 310 | <para>
|
---|
| 311 | is the interface for <application>Python3</application>
|
---|
[4c24eb0a] | 312 | to use <filename class="libraryfile">libxml2.so</filename>
|
---|
[cd964c8] | 313 | </para>
|
---|
| 314 | <indexterm zone="libxml2 libxml2mod3">
|
---|
| 315 | <primary sortas="c-libxml2mod">libxml2mod.so</primary>
|
---|
| 316 | </indexterm>
|
---|
| 317 | </listitem>
|
---|
| 318 | </varlistentry>
|
---|
| 319 |
|
---|
[1515ed8a] | 320 | </variablelist>
|
---|
[8180b89] | 321 |
|
---|
[1515ed8a] | 322 | </sect2>
|
---|
[8180b89] | 323 |
|
---|
[f45b1953] | 324 | </sect1>
|
---|