[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 -->
|
---|
[808f2b85] | 8 | <!ENTITY libxml2-download-http "https://download.gnome.org/sources/libxml2/2.11/libxml2-&libxml2-version;.tar.xz">
|
---|
[b4282bdb] | 9 | <!-- <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.xz">-->
|
---|
[1a699f7] | 10 | <!ENTITY libxml2-download-ftp " ">
|
---|
[808f2b85] | 11 | <!ENTITY libxml2-md5sum "b2e7332289f5784087448a0717f45ac3">
|
---|
| 12 | <!ENTITY libxml2-size "2.6 MB">
|
---|
| 13 | <!ENTITY libxml2-buildsize "109 MB (with tests)">
|
---|
[0a73ebad] | 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 |
|
---|
[ed345e7] | 36 | &lfs120_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>
|
---|
[44b3f440] | 84 |
|
---|
[60ddbaf] | 85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 86 | <para role="optional">
|
---|
[0b312a7] | 87 | <xref linkend="icu"/> (see below) and
|
---|
| 88 | <xref linkend="valgrind"/> (may be used in the tests)
|
---|
[325113f8] | 89 | </para>
|
---|
[1515ed8a] | 90 | </sect2>
|
---|
[8e75f8b9] | 91 |
|
---|
[1515ed8a] | 92 | <sect2 role="installation">
|
---|
[437700ae] | 93 | <title>Installation of libxml2</title>
|
---|
[b4282bdb] | 94 |
|
---|
[325113f8] | 95 | <para>
|
---|
| 96 | Install <application>libxml2</application> by running the following
|
---|
| 97 | commands:
|
---|
| 98 | </para>
|
---|
[1515ed8a] | 99 |
|
---|
[f0505850] | 100 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 101 | --sysconfdir=/etc \
|
---|
| 102 | --disable-static \
|
---|
| 103 | --with-history \
|
---|
[c78420c] | 104 | PYTHON=/usr/bin/python3 \
|
---|
[3f6cf45] | 105 | --docdir=/usr/share/doc/libxml2-&libxml2-version; &&
|
---|
[1515ed8a] | 106 | make</userinput></screen>
|
---|
| 107 |
|
---|
[d56e7df] | 108 | <para>
|
---|
[48771ae] | 109 | If you downloaded the test suite, issue the following command:
|
---|
[d56e7df] | 110 | </para>
|
---|
[6000a3e] | 111 |
|
---|
| 112 | <screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
|
---|
| 113 |
|
---|
[8180b89] | 114 | <para>
|
---|
[beee921] | 115 | To test the results, issue: <command>make check > check.log</command>.
|
---|
[808f2b85] | 116 | This command will print several lines of error messages like
|
---|
| 117 | <quote><computeroutput>Failed to parse
|
---|
| 118 | xstc/...</computeroutput></quote> because some test files are missing
|
---|
| 119 | and these messages can be safely ignored.
|
---|
[beee921] | 120 | A summary of the results can be obtained with <command>grep -E
|
---|
[808f2b85] | 121 | '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
|
---|
[cbb1dd2] | 122 | installed and you want to check for memory leaks, replace
|
---|
[beee921] | 123 | <command>check</command> with <command>check-valgrind</command>.
|
---|
[8180b89] | 124 | </para>
|
---|
[8e75f8b9] | 125 |
|
---|
[cf83ea8] | 126 | <note>
|
---|
| 127 | <para>
|
---|
| 128 | The tests use <ulink url="http://localhost/">http://localhost/</ulink>
|
---|
| 129 | to test parsing of external entities. If the machine where you run the
|
---|
| 130 | tests serves as a web site, the tests may hang, depending on the
|
---|
| 131 | content of the file served. It is therefore recommended to shut down
|
---|
| 132 | the server during the tests, as the <systemitem
|
---|
| 133 | class="username">root</systemitem> user:
|
---|
| 134 | </para>
|
---|
| 135 |
|
---|
| 136 | <screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
|
---|
| 137 | <screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
|
---|
| 138 |
|
---|
| 139 | </note>
|
---|
[0b312a7] | 140 |
|
---|
[325113f8] | 141 | <para>
|
---|
| 142 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 143 | </para>
|
---|
[8e75f8b9] | 144 |
|
---|
[1515ed8a] | 145 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 146 | </sect2>
|
---|
[8e75f8b9] | 147 |
|
---|
[1515ed8a] | 148 | <sect2 role="commands">
|
---|
| 149 | <title>Command Explanations</title>
|
---|
| 150 |
|
---|
[325113f8] | 151 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 152 | href="../../xincludes/static-libraries.xml"/>
|
---|
[0b312a7] | 153 |
|
---|
[325113f8] | 154 | <para>
|
---|
[f48df219] | 155 | <parameter>--with-history</parameter>: This switch enables
|
---|
[325113f8] | 156 | <application>Readline</application> support when running
|
---|
| 157 | <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
|
---|
| 158 | </para>
|
---|
[8180b89] | 159 |
|
---|
[f48df219] | 160 | <para>
|
---|
[16f7f0e] | 161 | <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
|
---|
[6c6f393] | 162 | the libxml2 module with Python3 instead of Python2.
|
---|
[f48df219] | 163 | </para>
|
---|
| 164 |
|
---|
[ca25773c] | 165 | <para>
|
---|
| 166 | <option>--with-icu</option>: Add this switch if you have built
|
---|
| 167 | <xref linkend="icu"/>, for better unicode support.
|
---|
| 168 | </para>
|
---|
| 169 |
|
---|
[f6061807] | 170 | <note>
|
---|
| 171 | <para>
|
---|
[58acc3e] | 172 | If the <option>--with-icu</option> switch is used, the BLFS editors
|
---|
| 173 | recommend removing unneeded references to the ICU libraries. This
|
---|
| 174 | will prevent many packages that use libxml2 from unnecessarily linking
|
---|
| 175 | to the ICU libraries. This, in turn, will prevent the need for
|
---|
| 176 | rebuilding many packages when upgrading ICU to a new major version.
|
---|
| 177 | After installing libxml2, as the &root; user, issue:
|
---|
[f6061807] | 178 | </para>
|
---|
| 179 |
|
---|
| 180 | <screen role="nodump"><userinput>rm -vf /usr/lib/libxml2.la &&
|
---|
| 181 | sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
|
---|
| 182 | </note>
|
---|
| 183 |
|
---|
[1515ed8a] | 184 | </sect2>
|
---|
[8e75f8b9] | 185 |
|
---|
[1515ed8a] | 186 | <sect2 role="content">
|
---|
| 187 | <title>Contents</title>
|
---|
| 188 |
|
---|
| 189 | <segmentedlist>
|
---|
| 190 | <segtitle>Installed Programs</segtitle>
|
---|
| 191 | <segtitle>Installed Libraries</segtitle>
|
---|
| 192 | <segtitle>Installed Directories</segtitle>
|
---|
[8e75f8b9] | 193 |
|
---|
[1515ed8a] | 194 | <seglistitem>
|
---|
[325113f8] | 195 | <seg>
|
---|
[8558044] | 196 | xml2-config,
|
---|
| 197 | xmlcatalog, and
|
---|
[6cd8a9a] | 198 | xmllint
|
---|
[325113f8] | 199 | </seg>
|
---|
| 200 | <seg>
|
---|
[6cd8a9a] | 201 | libxml2.so
|
---|
[325113f8] | 202 | </seg>
|
---|
| 203 | <seg>
|
---|
| 204 | /usr/include/libxml2,
|
---|
[ec91d9f2] | 205 | /usr/lib/cmake/libxml2,
|
---|
[6cd8a9a] | 206 | /usr/share/doc/libxml2-&libxml2-version;, and
|
---|
[325113f8] | 207 | /usr/share/gtk-doc/html/libxml2
|
---|
| 208 | </seg>
|
---|
[1515ed8a] | 209 | </seglistitem>
|
---|
| 210 | </segmentedlist>
|
---|
[8e75f8b9] | 211 |
|
---|
[1515ed8a] | 212 | <variablelist>
|
---|
| 213 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 214 | <?dbfo list-presentation="list"?>
|
---|
| 215 | <?dbhtml list-presentation="table"?>
|
---|
[8e75f8b9] | 216 |
|
---|
[1515ed8a] | 217 | <varlistentry id="xml2-config">
|
---|
| 218 | <term><command>xml2-config</command></term>
|
---|
| 219 | <listitem>
|
---|
[325113f8] | 220 | <para>
|
---|
| 221 | determines the compile and linker flags that should be used to
|
---|
| 222 | compile and link programs that use
|
---|
[4c24eb0a] | 223 | <filename class="libraryfile">libxml2</filename>
|
---|
[325113f8] | 224 | </para>
|
---|
[1515ed8a] | 225 | <indexterm zone="libxml2 xml2-config">
|
---|
| 226 | <primary sortas="b-xml2-config">xml2-config</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
[8e75f8b9] | 230 |
|
---|
[1515ed8a] | 231 | <varlistentry id="xmlcatalog">
|
---|
| 232 | <term><command>xmlcatalog</command></term>
|
---|
| 233 | <listitem>
|
---|
[325113f8] | 234 | <para>
|
---|
[4c24eb0a] | 235 | is used to monitor and manipulate XML and SGML catalogs
|
---|
[325113f8] | 236 | </para>
|
---|
[1515ed8a] | 237 | <indexterm zone="libxml2 xmlcatalog">
|
---|
| 238 | <primary sortas="b-xmlcatalog">xmlcatalog</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
[8e75f8b9] | 242 |
|
---|
[1515ed8a] | 243 | <varlistentry id="xmllint">
|
---|
| 244 | <term><command>xmllint</command></term>
|
---|
| 245 | <listitem>
|
---|
[325113f8] | 246 | <para>
|
---|
| 247 | parses XML files and outputs reports (based upon options) to detect
|
---|
[4c24eb0a] | 248 | errors in XML coding
|
---|
[325113f8] | 249 | </para>
|
---|
[1515ed8a] | 250 | <indexterm zone="libxml2 xmllint">
|
---|
| 251 | <primary sortas="b-xmllint">xmllint</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 | </listitem>
|
---|
| 254 | </varlistentry>
|
---|
[cd964c8] | 255 |
|
---|
[1515ed8a] | 256 | <varlistentry id="libxml2-lib">
|
---|
[8180b89] | 257 | <term><filename class="libraryfile">libxml2.so</filename></term>
|
---|
[1515ed8a] | 258 | <listitem>
|
---|
[325113f8] | 259 | <para>
|
---|
| 260 | provides functions for programs to parse files that use the XML
|
---|
[4c24eb0a] | 261 | format
|
---|
[325113f8] | 262 | </para>
|
---|
[1515ed8a] | 263 | <indexterm zone="libxml2 libxml2-lib">
|
---|
[325113f8] | 264 | <primary sortas="c-libxml2">libxml2.so</primary>
|
---|
[1515ed8a] | 265 | </indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
[8180b89] | 268 |
|
---|
[1515ed8a] | 269 | </variablelist>
|
---|
[8180b89] | 270 |
|
---|
[1515ed8a] | 271 | </sect2>
|
---|
[8180b89] | 272 |
|
---|
[f45b1953] | 273 | </sect1>
|
---|