[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 -->
|
---|
[b4282bdb] | 8 | <!ENTITY libxml2-download-http "https://download.gnome.org/sources/libxml2/2.10/libxml2-&libxml2-version;.tar.xz">
|
---|
| 9 | <!-- <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.xz">-->
|
---|
[1a699f7] | 10 | <!ENTITY libxml2-download-ftp " ">
|
---|
[6cd8a9a] | 11 | <!ENTITY libxml2-md5sum "f9edac7fac232b3657a003fd9a5bbe42">
|
---|
[8294b3df] | 12 | <!ENTITY libxml2-size "2.5 MB">
|
---|
[6cd8a9a] | 13 | <!ENTITY libxml2-buildsize "105 MB (with tests)">
|
---|
[0a73eba] | 14 | <!ENTITY libxml2-time "0.4 SBU (Using parallelism=4; 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 |
|
---|
| 21 |
|
---|
[437700ae] | 22 | <title>libxml2-&libxml2-version;</title>
|
---|
[8e75f8b9] | 23 |
|
---|
[1515ed8a] | 24 | <indexterm zone="libxml2">
|
---|
[8180b89] | 25 | <primary sortas="a-libxml2">libxml2</primary>
|
---|
[1515ed8a] | 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
[437700ae] | 29 | <title>Introduction to libxml2</title>
|
---|
[8e75f8b9] | 30 |
|
---|
[325113f8] | 31 | <para>
|
---|
[8180b89] | 32 | The <application>libxml2</application> package contains libraries
|
---|
| 33 | and utilities used for parsing XML files.
|
---|
[325113f8] | 34 | </para>
|
---|
[8e75f8b9] | 35 |
|
---|
[d0c42be] | 36 | &lfs113_checked;
|
---|
[7f4cdbc0] | 37 |
|
---|
[1515ed8a] | 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
[8180b89] | 41 | <para>
|
---|
| 42 | Download (HTTP): <ulink url="&libxml2-download-http;"/>
|
---|
| 43 | </para>
|
---|
[1515ed8a] | 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
[8180b89] | 46 | <para>
|
---|
| 47 | Download (FTP): <ulink url="&libxml2-download-ftp;"/>
|
---|
| 48 | </para>
|
---|
[1515ed8a] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[8180b89] | 51 | <para>
|
---|
| 52 | Download MD5 sum: &libxml2-md5sum;
|
---|
| 53 | </para>
|
---|
[1515ed8a] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[8180b89] | 56 | <para>
|
---|
| 57 | Download size: &libxml2-size;
|
---|
| 58 | </para>
|
---|
[1515ed8a] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[8180b89] | 61 | <para>
|
---|
| 62 | Estimated disk space required: &libxml2-buildsize;
|
---|
| 63 | </para>
|
---|
[1515ed8a] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[8180b89] | 66 | <para>
|
---|
| 67 | Estimated build time: &libxml2-time;
|
---|
| 68 | </para>
|
---|
[1515ed8a] | 69 | </listitem>
|
---|
| 70 | </itemizedlist>
|
---|
[8e75f8b9] | 71 |
|
---|
[9a788838] | 72 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[8180b89] | 73 | <itemizedlist spacing="compact">
|
---|
[5da63eb] | 74 | <listitem>
|
---|
[325113f8] | 75 | <para>
|
---|
[48771ae] | 76 | Optional Test Suite:
|
---|
[c6b192c] | 77 | <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
|
---|
[325113f8] | 78 | enables <command>make check</command> to do complete testing.
|
---|
| 79 | </para>
|
---|
[5da63eb] | 80 | </listitem>
|
---|
[9a788838] | 81 | </itemizedlist>
|
---|
[5da63eb] | 82 |
|
---|
[437700ae] | 83 | <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
|
---|
[0b312a7] | 84 | <!-- do not advertize python2 here, except in the note below
|
---|
| 85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 86 | <para role="optional">
|
---|
| 87 | <xref linkend="python2"/>
|
---|
| 88 | </para>
|
---|
| 89 | -->
|
---|
[60ddbaf] | 90 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 91 | <para role="optional">
|
---|
[0b312a7] | 92 | <xref linkend="icu"/> (see below) and
|
---|
| 93 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
[325113f8] | 94 | </para>
|
---|
[0af6ce1] | 95 |
|
---|
[1aadfdf] | 96 | <note>
|
---|
[cd964c8] | 97 | <para>
|
---|
| 98 | The old <application>Python2</application> module can be built after
|
---|
| 99 | <filename class="libraryfile">libxml2.so</filename> has been installed,
|
---|
| 100 | see <xref linkend="libxml2py2"/>.
|
---|
[325113f8] | 101 | </para>
|
---|
[1aadfdf] | 102 | </note>
|
---|
| 103 |
|
---|
[325113f8] | 104 | <para condition="html" role="usernotes">
|
---|
| 105 | User Notes: <ulink url="&blfs-wiki;/libxml2"/>
|
---|
| 106 | </para>
|
---|
[1515ed8a] | 107 | </sect2>
|
---|
[8e75f8b9] | 108 |
|
---|
[1515ed8a] | 109 | <sect2 role="installation">
|
---|
[437700ae] | 110 | <title>Installation of libxml2</title>
|
---|
[b4282bdb] | 111 |
|
---|
[325113f8] | 112 | <para>
|
---|
| 113 | Install <application>libxml2</application> by running the following
|
---|
| 114 | commands:
|
---|
| 115 | </para>
|
---|
[1515ed8a] | 116 |
|
---|
[f0505850] | 117 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 118 | --sysconfdir=/etc \
|
---|
| 119 | --disable-static \
|
---|
| 120 | --with-history \
|
---|
[c78420c] | 121 | PYTHON=/usr/bin/python3 \
|
---|
[3f6cf45] | 122 | --docdir=/usr/share/doc/libxml2-&libxml2-version; &&
|
---|
[1515ed8a] | 123 | make</userinput></screen>
|
---|
| 124 |
|
---|
[d56e7df] | 125 | <para>
|
---|
[48771ae] | 126 | If you downloaded the test suite, issue the following command:
|
---|
[d56e7df] | 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>
|
---|
[16f7f0e] | 174 | <parameter>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 |
|
---|
[1515ed8a] | 183 | </sect2>
|
---|
[8e75f8b9] | 184 |
|
---|
[1515ed8a] | 185 | <sect2 role="content">
|
---|
| 186 | <title>Contents</title>
|
---|
| 187 |
|
---|
| 188 | <segmentedlist>
|
---|
| 189 | <segtitle>Installed Programs</segtitle>
|
---|
| 190 | <segtitle>Installed Libraries</segtitle>
|
---|
| 191 | <segtitle>Installed Directories</segtitle>
|
---|
[8e75f8b9] | 192 |
|
---|
[1515ed8a] | 193 | <seglistitem>
|
---|
[325113f8] | 194 | <seg>
|
---|
[8558044] | 195 | xml2-config,
|
---|
| 196 | xmlcatalog, and
|
---|
[6cd8a9a] | 197 | xmllint
|
---|
[325113f8] | 198 | </seg>
|
---|
| 199 | <seg>
|
---|
[6cd8a9a] | 200 | libxml2.so
|
---|
[325113f8] | 201 | </seg>
|
---|
| 202 | <seg>
|
---|
| 203 | /usr/include/libxml2,
|
---|
[ec91d9f2] | 204 | /usr/lib/cmake/libxml2,
|
---|
[6cd8a9a] | 205 | /usr/share/doc/libxml2-&libxml2-version;, and
|
---|
[325113f8] | 206 | /usr/share/gtk-doc/html/libxml2
|
---|
| 207 | </seg>
|
---|
[1515ed8a] | 208 | </seglistitem>
|
---|
| 209 | </segmentedlist>
|
---|
[8e75f8b9] | 210 |
|
---|
[1515ed8a] | 211 | <variablelist>
|
---|
| 212 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 213 | <?dbfo list-presentation="list"?>
|
---|
| 214 | <?dbhtml list-presentation="table"?>
|
---|
[8e75f8b9] | 215 |
|
---|
[1515ed8a] | 216 | <varlistentry id="xml2-config">
|
---|
| 217 | <term><command>xml2-config</command></term>
|
---|
| 218 | <listitem>
|
---|
[325113f8] | 219 | <para>
|
---|
| 220 | determines the compile and linker flags that should be used to
|
---|
| 221 | compile and link programs that use
|
---|
[4c24eb0a] | 222 | <filename class="libraryfile">libxml2</filename>
|
---|
[325113f8] | 223 | </para>
|
---|
[1515ed8a] | 224 | <indexterm zone="libxml2 xml2-config">
|
---|
| 225 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
[8e75f8b9] | 229 |
|
---|
[1515ed8a] | 230 | <varlistentry id="xmlcatalog">
|
---|
| 231 | <term><command>xmlcatalog</command></term>
|
---|
| 232 | <listitem>
|
---|
[325113f8] | 233 | <para>
|
---|
[4c24eb0a] | 234 | is used to monitor and manipulate XML and SGML catalogs
|
---|
[325113f8] | 235 | </para>
|
---|
[1515ed8a] | 236 | <indexterm zone="libxml2 xmlcatalog">
|
---|
| 237 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
[8e75f8b9] | 241 |
|
---|
[1515ed8a] | 242 | <varlistentry id="xmllint">
|
---|
| 243 | <term><command>xmllint</command></term>
|
---|
| 244 | <listitem>
|
---|
[325113f8] | 245 | <para>
|
---|
| 246 | parses XML files and outputs reports (based upon options) to detect
|
---|
[4c24eb0a] | 247 | errors in XML coding
|
---|
[325113f8] | 248 | </para>
|
---|
[1515ed8a] | 249 | <indexterm zone="libxml2 xmllint">
|
---|
| 250 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
| 251 | </indexterm>
|
---|
| 252 | </listitem>
|
---|
| 253 | </varlistentry>
|
---|
[cd964c8] | 254 |
|
---|
[1515ed8a] | 255 | <varlistentry id="libxml2-lib">
|
---|
[8180b89] | 256 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
[1515ed8a] | 257 | <listitem>
|
---|
[325113f8] | 258 | <para>
|
---|
| 259 | provides functions for programs to parse files that use the XML
|
---|
[4c24eb0a] | 260 | format
|
---|
[325113f8] | 261 | </para>
|
---|
[1515ed8a] | 262 | <indexterm zone="libxml2 libxml2-lib">
|
---|
[325113f8] | 263 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
[1515ed8a] | 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
[8180b89] | 267 |
|
---|
[1515ed8a] | 268 | </variablelist>
|
---|
[8180b89] | 269 |
|
---|
[1515ed8a] | 270 | </sect2>
|
---|
[8180b89] | 271 |
|
---|
[f45b1953] | 272 | </sect1>
|
---|