<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-expat" role="wrap">
  <?dbhtml filename="expat.html"?>

  <sect1info condition="script">
    <productname>expat</productname>
    <productnumber>&expat-version;</productnumber>
    <address>&expat-url;</address>
  </sect1info>

  <title>Expat-&expat-version;</title>

  <indexterm zone="ch-system-expat">
    <primary sortas="a-Expat">Expat</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>Expat 软件包包含用于解析 XML 文件的面向流的 C 语言库。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&expat-ch6-sbu;</seg>
        <seg>&expat-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 Expat</title>

	<para>首先修正 LFS 环境中退化测试的一个问题：</para>

<screen><userinput remap="pre">sed -i 's|usr/bin/env |bin/|' run.sh.in</userinput></screen>

    <para>准备安装 Expat：</para>

<screen><userinput remap="configure">./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/expat-&expat-version;</userinput></screen>

    <para>编译该软件包：</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>运行以下命令以测试编译结果：</para>

<screen><userinput remap="test">make check</userinput></screen>

    <para>安装该软件包：</para>

<screen><userinput remap="install">make install</userinput></screen>

    <para>如果需要，安装该软件包的文档：</para>

<screen><userinput remap="install">install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-&expat-version;</userinput></screen>

  </sect2>

  <sect2 id="contents-expat" role="content">
    <title>Expat 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的库</segtitle>
      <segtitle>安装的目录</segtitle>

      <seglistitem>
        <seg>xmlwf</seg>
        <seg>libexpat.so</seg>
        <seg>/usr/share/doc/expat-&expat-version;</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">简要描述</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="xmlwf">
        <term><command>xmlwf </command></term>
        <listitem>
          <para>是一个用于检验 XML 文档是否良好的非验证性工具</para>
          <indexterm zone="ch-system-expat xmlwf">
            <primary sortas="b-xmlwf">xmlwf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libexpat">
        <term><filename class="libraryfile">libexpat</filename></term>
        <listitem>
          <para>包含解析 XML 文档的 API 函数</para>
          <indexterm zone="ch-system-expat libexpat">
            <primary sortas="c-libexpat">libexpat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
