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