MFB: Upgrade to the new-reference-structure

- Moved the intro from reference.xml to book.xml
    - Change the intro ID to intro.<extname>
    - Moved the requirement&resources section to setup.xml
    - Moved examples into its own chapter


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@247970 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2007-12-11 06:51:54 +00:00
parent 3c3dbdd75c
commit a336fc5041
5 changed files with 207 additions and 87 deletions

46
reference/bzip2/book.xml Normal file
View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<!-- Purpose: compression -->
<!-- Membership: bundled, external -->
<book xml:id="book.bzip2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Bzip2 Compression</title>
<!-- {{{ preface -->
<preface xml:id="intro.bzip2">
&reftitle.intro;
<para>
The bzip2 functions are used to transparently read and write bzip2 (.bz2)
compressed files.
</para>
</preface>
<!-- }}} -->
&reference.bzip2.setup;
&reference.bzip2.constants;
&reference.bzip2.examples;
&reference.bzip2.reference;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<appendix xml:id="bzip2.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
&no.constants;
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="bzip2.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<para>
This example opens a temporary file and writes a test string to
it, then prints out the contents of the file.
</para>
<example>
<title>Small bzip2 Example</title>
<programlisting role="php">
<![CDATA[
<?php
$filename = "/tmp/testfile.bz2";
$str = "This is a test string.\n";
// open file for writing
$bz = bzopen($filename, "w");
// write string to file
bzwrite($bz, $str);
// close file
bzclose($bz);
// open file for reading
$bz = bzopen($filename, "r");
// read 10 characters
echo bzread($bz, 10);
// output until end of the file (or the next 1024 char) and close it.
echo bzread($bz);
bzclose($bz);
?>
]]>
</programlisting>
</example>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,95 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- Purpose: compression -->
<!-- Membership: bundled, external -->
<!-- $Revision: 1.10 $ -->
<reference xml:id="ref.bzip2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Bzip2 Compression Functions</title>
<titleabbrev>Bzip2</titleabbrev>
<reference xml:id="ref.bzip2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Bzip2 &Functions;</title>
<titleabbrev>Bzip2</titleabbrev>
<partintro>
<section xml:id="bzip2.intro">
&reftitle.intro;
<para>
The bzip2 functions are used to transparently read and write bzip2 (.bz2)
compressed files.
</para>
</section>
<section xml:id="bzip2.requirements">
&reftitle.required;
<para>
This module uses the functions of the <link xlink:href="&url.bzip2;">bzip2
</link> library by Julian Seward. This module requires bzip2/libbzip2
version &gt;= 1.0.x.
</para>
</section>
&reference.bzip2.entities.functions;
&reference.bzip2.configure;
</reference>
<section xml:id="bzip2.configuration">
&reftitle.runtime;
&no.config;
</section>
<section xml:id="bzip2.resources">
&reftitle.resources;
<para>
This extension defines one resource type: a file pointer identifying
the bz2-file to work on.
</para>
</section>
<section xml:id="bzip2.constants">
&reftitle.constants;
&no.constants;
</section>
<section xml:id="bzip2.examples">
&reftitle.examples;
<para>
This example opens a temporary file and writes a test string to
it, then prints out the contents of the file.
</para>
<example>
<title>Small bzip2 Example</title>
<programlisting role="php">
<![CDATA[
<?php
$filename = "/tmp/testfile.bz2";
$str = "This is a test string.\n";
// open file for writing
$bz = bzopen($filename, "w");
// write string to file
bzwrite($bz, $str);
// close file
bzclose($bz);
// open file for reading
$bz = bzopen($filename, "r");
// read 10 characters
echo bzread($bz, 10);
// output until end of the file (or the next 1024 char) and close it.
echo bzread($bz);
bzclose($bz);
?>
]]>
</programlisting>
</example>
</section>
</partintro>
&reference.bzip2.entities.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

61
reference/bzip2/setup.xml Normal file
View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="bzip2.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="bzip2.requirements">
&reftitle.required;
<para>
This module uses the functions of the <link xlink:href="&url.bzip2;">bzip2
</link> library by Julian Seward. This module requires bzip2/libbzip2
version &gt;= 1.0.x.
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation -->
&reference.bzip2.configure;
<!-- }}} -->
<!-- {{{ Configuration -->
<section xml:id="bzip2.configuration">
&reftitle.runtime;
&no.config;
</section>
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="bzip2.resources">
&reftitle.resources;
<para>
This extension defines one resource type: a file pointer identifying
the bz2-file to work on.
</para>
</section>
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->