cvs: phpdoc-fr /reference/yaz book.xml constants.xml examples.xml setup.xml /reference/zip book.xml examples.xml setup.xml /reference/zlib book.xml
examples.xml setup.xml
| From: | Yannick Torres | Date: | Thu, 05 Jun 2008 21:03:13 +0000 |
| Subject: | cvs: phpdoc-fr /reference/yaz book.xml constants.xml examples.xml setup.xml /reference/zip book.xml examples.xml setup.xml /reference/zlib book.xml examples.xml setup.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-6016@lists.php.net to get a copy of this message | ||
yannick Thu Jun 5 21:03:13 2008 UTC
Added files:
/phpdoc-fr/reference/yaz book.xml constants.xml examples.xml
setup.xml
/phpdoc-fr/reference/zip book.xml examples.xml setup.xml
/phpdoc-fr/reference/zlib book.xml examples.xml setup.xml
Log:
new translation
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/book.xml +++ phpdoc-fr/reference/yaz/book.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: remote.other --> <!-- Membership: pecl, external --> <book xml:id="book.yaz" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>YAZ</title> <!-- {{{ preface --> <preface xml:id="intro.yaz"> &reftitle.intro; <para> Cette extension offre une interface PHP à la bibliothèque <productname>YAZ</productname> qui implémente le <link xlink:href="&url.yaz-loc;">protocole Z39.50 pour récupérer des informations</link>. Avec cette extension, vous pouvez simplement implémenter une origine Z39.50 (client) qui cherche ou analyse des cibles Z39.50 (serveurs) en parallèle. </para> <para> Ce module simplifie l'utilisation complèxe du protocole Z39.50. Il supporte les connexions persistantes de façon similaire aux APIs RDB, qui sont disponibles pour PHP. Cela signifie que les sessions sont conservées mais partagées entre les utilisateurs, évitant ainsi les étapes de connexion et d'initialisation dans la plupart des cas. </para> <para> <productname>YAZ</productname> est disponible sur <link xlink:href="&url.yaz;">&url.yaz;</link>. Vous pouvez trouver des informations supplémentaires, des exemples de scripts, etc. pour cette extension sur <link xlink:href="&url.yaz-phpyaz;">&url.yaz-phpyaz;</link>. </para> <note> <para> &pecl.moved-ver;5.0.0. </para> </note> </preface> <!-- }}} --> &reference.yaz.setup; &reference.yaz.constants; &reference.yaz.examples; &reference.yaz.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/constants.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/constants.xml +++ phpdoc-fr/reference/yaz/constants.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <appendix xml:id="yaz.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/examples.xml +++ phpdoc-fr/reference/yaz/examples.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="yaz.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <para> PHP/YAZ garde les traces des connexions avec les cibles (Z-Associations). Une ressource représente une connexion à une cible. </para> <para> Le script ci-dessous montre la fonctionnalité de recherche parallèle de l'API. Lorsqu'appelée sans argument, elle affiche une requête ; sinon, elle cherche la cible donnée dans le tableau <literal>host</literal>. </para> <para> <example> <title>Recherche parallèle en utilisant Yaz</title> <programlisting role="php"> <![CDATA[ <?php $host=$_REQUEST[host]; $query=$_REQUEST[query]; $num_hosts = count($host); if (empty($query) || count($host) == 0) { echo '<form method="get"> <input type="checkbox" name="host[]" value="bagel.indexdata.dk/gils" /> test GILS <input type="checkbox" name="host[]" value="localhost:9999/Default" /> test local <input type="checkbox" checked="checked" name="host[]" value="z3950.loc.gov:7090/voyager" /> Library of Congress <br /> Requête RPN: <input type="text" size="30" name="query" /> <input type="submit" name="action" value="Search" /> </form> '; } else { echo 'Votre recherche pour ' . htmlspecialchars($query) . '<br />'; for ($i = 0; $i < $num_hosts; $i++) { $id[] = yaz_connect($host[$i]); yaz_syntax($id[$i], "usmarc"); yaz_range($id[$i], 1, 10); yaz_search($id[$i], "rpn", $query); } yaz_wait(); for ($i = 0; $i < $num_hosts; $i++) { echo '<hr />' . $host[$i] . ':'; $error = yaz_error($id[$i]); if (!empty($error)) { echo "Erreur : $error"; } else { $hits = yaz_hits($id[$i]); echo "Nombre de résultat(s) : $hits"; } echo '<dl>'; for ($p = 1; $p <= 10; $p++) { $rec = yaz_record($id[$i], $p, "string"); if (empty($rec)) continue; echo "<dt><b>$p</b></dt><dd>"; echo nl2br($rec); echo "</dd>"; } echo '</dl>'; } } ?> ]]> </programlisting> </example> </para> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/setup.xml +++ phpdoc-fr/reference/yaz/setup.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <chapter xml:id="yaz.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="yaz.requirements"> &reftitle.required; &no.requirement; </section> <!-- }}} --> <!-- {{{ Installation --> &reference.yaz.configure; <!-- }}} --> <!-- {{{ Configuration --> &reference.yaz.ini; <!-- }}} --> <!-- {{{ Resources --> <section xml:id="yaz.resources"> &reftitle.resources; &no.resource; </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/book.xml +++ phpdoc-fr/reference/zip/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: compression --> <!-- Membership: bundled, pecl --> <book xml:id="book.zip" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Zip</title> <!-- {{{ preface --> <preface xml:id="intro.zip"> &reftitle.intro; <para> Cette extension active la possibilité de lire et d'écrire des archives compressées ZIP, ainsi que les fichiers s'y trouvant. </para> </preface> <!-- }}} --> &reference.zip.setup; &reference.zip.constants; &reference.zip.examples; &reference.zip.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/examples.xml +++ phpdoc-fr/reference/zip/examples.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zip.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <example> <title>Création d'une archive Zip</title> <programlisting role="php"> <![CDATA[ <?php $zip = new ZipArchive(); $filename = "./test112.zip"; if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { exit("Impossible d'ouvrir <$filename>\n"); } $zip->addFromString("testfilephp.txt" . time(), "#1 Ceci est une chaîne texte, ajoutée comme testfilephp.txt.\n"); $zip->addFromString("testfilephp2.txt" . time(), "#2 Ceci est une chaîne texte, ajoutée comme testfilephp2.txt.\n"); $zip->addFile($thisdir . "/too.php","/testfromfile.php"); echo "Nombre de fichiers : " . $zip->numFiles . "\n"; echo "statut :" . $zip->status . "\n"; $zip->close(); ?> ]]> </programlisting> </example> <example> <title>Affiche les détails de l'archive et liste son contenu</title> <programlisting role="php"> <![CDATA[ <?php $za = new ZipArchive(); $za->open('test_with_comment.zip'); print_r($za); var_dump($za); echo "Nombre de fichiers : " . $za->numFiles . "\n"; echo "statut : " . $za->status . "\n"; echo "statut du système : " . $za->statusSys . "\n"; echo "Nom du fichier : " . $za->filename . "\n"; echo "Commentaire : " . $za->comment . "\n"; for ($i=0; $i<$za->numFiles;$i++) { echo "index : $i\n"; print_r($za->statIndex($i)); } echo "Nombre de fichiers :" . $za->numFiles . "\n"; ?> ]]> </programlisting> </example> <example> <title>Flux ZIP ; lit les metainformations d'un fichier OpenOffice</title> <programlisting role="php"> <![CDATA[ <?php $reader = new XMLReader(); $reader->open('zip://' . dirname(__FILE__) . '/test.odt#meta.xml'); $odt_meta = array(); while ($reader->read()) { if ($reader->nodeType == XMLREADER::ELEMENT) { $elm = $reader->name; } else { if ($reader->nodeType == XMLREADER::END_ELEMENT && $reader->name == 'office:meta') { break; } if (!trim($reader->value)) { continue; } $odt_meta[$elm] = $reader->value; } } print_r($odt_meta); ?> ]]> </programlisting> </example> <para> Cet exemple utilise l'ancienne API (PHP 4) ; il ouvre une archive ZIP, lit chaque fichier del'archive et affiche son contenu. L'archive <filename>test2.zip</filename> utilisée dans cet exemple est une des archives de test, se trouvant dans les sources de ZZIPlib. </para> <example> <title>Exemple d'utilisation de Zip</title> <programlisting role="php"> <![CDATA[ <?php $zip = zip_open("/tmp/test2.zip"); if ($zip) { while ($zip_entry = zip_read($zip)) { echo "Nom : " . zip_entry_name($zip_entry) . "\n"; echo "Taille actuelle du fichier : " . zip_entry_filesize($zip_entry) . "\n"; echo "Taille compressée : " . zip_entry_compressedsize($zip_entry) . "\n"; echo "Méthode de compression : " . zip_entry_compressionmethod($zip_entry) . "\n"; if (zip_entry_open($zip, $zip_entry, "r")) { echo "Contenu du fichier :\n"; $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); echo "$buf\n"; zip_entry_close($zip_entry); } echo "\n"; } zip_close($zip); } ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/setup.xml +++ phpdoc-fr/reference/zip/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zip.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="zip.requirements"> &reftitle.required; <section xml:id="zip.requirements.old"> <title>PHP 4</title> <para> La version incluse dans PHP 4 nécessite la bibliothèque <link xlink:href="&url.zziplib;">ZZIPlib</link>, écrite par Guido Draheim, en version 0.10.6 ou supérieure. </para> </section> <section xml:id="zip.requirements.new"> <title>PHP 5.2.0 ou supérieure</title> <para> Cette extension utilise les fonctions <link xlink:href="&url.zlib;">zlib</link> écrite par Jean-loup Gailly et Mark Adler. </para> </section> </section> <!-- }}} --> <!-- {{{ Installation --> &reference.zip.configure; <!-- }}} --> <!-- {{{ Configuration --> <section xml:id="zip.configuration"> &reftitle.runtime; &no.config; </section> <!-- }}} --> <!-- {{{ Resources --> <section xml:id="zip.resources"> &reftitle.resources; <para> Il y a deux types de ressources utilisées par le module Zip. La première est le dossier Zip d'une archive Zip, et la seconde, l'entrée Zip de l'archives. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/book.xml +++ phpdoc-fr/reference/zlib/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: compression --> <!-- Membership: bundled --> <book xml:id="book.zlib" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Compression Zlib</title> <titleabbrev>Zlib</titleabbrev> <!-- {{{ preface --> <preface xml:id="intro.zlib"> &reftitle.intro; <para> Ce module vous permet de lire et d'écrire des fichiers compressés gzip (.gz), via la plupart des fonctions du <link linkend="book.filesystem">système de fichiers</link> qui fonctionnent avec les fichiers compressés gzip (ainsi qu'avec les fichiers non-compressés, mais sans sockets). </para> <note> <para> La version 4.0.4 introduit un gestionnaire fopen pour les fichiers .gz ; ainsi, vous pouvez utiliser l'URL spécial <filename>zlib:</filename> pour accéder aux fichiers compressés en utilisant les fonctions normales f*() si vous préfixez le nom du fichier ou le nom du chemin par <filename>zlib:</filename> lorsque vous appelez la fonction <function>fopen</function>. Cette fonctionnalité nécessite une bibliothèque C qui fournit la fonction <literal>fopencookie()</literal>. À ce jour, il semble que seule la bibliothèque GNU libc fournit cette fonctionnalité. </para> <para> En PHP 4.3.0, <filename>zlib:</filename> a été modifié en <filename>compress.zlib://</filename> afin d'éviter de confondre avec les noms de fichiers contenant les caractères '<literal>:</literal>'. La fonction <literal>fopencookie()</literal> n'est plus requise. Pour plus d'informations, repportez-vous à la section <xref linkend="wrappers.compression" />. </para> </note> </preface> <!-- }}} --> &reference.zlib.setup; &reference.zlib.constants; &reference.zlib.examples; &reference.zlib.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/examples.xml +++ phpdoc-fr/reference/zlib/examples.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zlib.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <para> Cette exemple ouvre un fichier temporaire et y écrit une chaîne de test, puis, affiche le contenu de ce fichier, deux fois. </para> <example> <title>Exemple avec Zlib</title> <programlisting role="php"> <![CDATA[ <?php $filename = tempnam('/tmp', 'zlibtest') . '.gz'; echo "<html>\n<head></head>\n<body>\n<pre>\n"; $s = "Seulement un test, test, test, test, test, test, test, test!\n"; // ouvre un fichier en écriture, avec une compression maximale $zp = gzopen($filename, "w9"); // écrit une chaîne dans le fichier gzwrite($zp, $s); // ferme le fichier gzclose($zp); // ouvre un fichier en lecture $zp = gzopen($filename, "r"); // lit 3 caractères echo gzread($zp, 3); // lit tout le contenu et ferme le fichier gzpassthru($zp); gzclose($zp); echo "\n"; // ouvre un fichier et affiche le contenu (pour la deuxième fois). if (readgzfile($filename) != strlen($s)) { echo "Erreur avec les fonctions zlib !"; } unlink($filename); echo "</pre>\n</body>\n</html>\n"; ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/setup.xml +++ phpdoc-fr/reference/zlib/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zlib.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="zlib.requirements"> &reftitle.required; <para> Ce module utilise les fonctions <link xlink:href="&url.zlib;">zlib</link> crées par Jean-loup Gailly et Mark Adler. Vous devez utiliser la bibliothèque zlib version >= 1.0.9 avec ce module. </para> </section> <!-- }}} --> <!-- {{{ Installation --> &reference.zlib.configure; <!-- }}} --> <!-- {{{ Configuration --> &reference.zlib.ini; <!-- }}} --> <!-- {{{ Resources --> <section xml:id="zlib.resources"> &reftitle.resources; <para> Cette extension définit une ressource de fichier, retournée par la fonction <function>gzopen</function>. </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 -->
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/book.xml +++ phpdoc-fr/reference/yaz/book.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: remote.other --> <!-- Membership: pecl, external --> <book xml:id="book.yaz" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>YAZ</title> <!-- {{{ preface --> <preface xml:id="intro.yaz"> &reftitle.intro; <para> Cette extension offre une interface PHP à la bibliothèque <productname>YAZ</productname> qui implémente le <link xlink:href="&url.yaz-loc;">protocole Z39.50 pour récupérer des informations</link>. Avec cette extension, vous pouvez simplement implémenter une origine Z39.50 (client) qui cherche ou analyse des cibles Z39.50 (serveurs) en parallèle. </para> <para> Ce module simplifie l'utilisation complèxe du protocole Z39.50. Il supporte les connexions persistantes de façon similaire aux APIs RDB, qui sont disponibles pour PHP. Cela signifie que les sessions sont conservées mais partagées entre les utilisateurs, évitant ainsi les étapes de connexion et d'initialisation dans la plupart des cas. </para> <para> <productname>YAZ</productname> est disponible sur <link xlink:href="&url.yaz;">&url.yaz;</link>. Vous pouvez trouver des informations supplémentaires, des exemples de scripts, etc. pour cette extension sur <link xlink:href="&url.yaz-phpyaz;">&url.yaz-phpyaz;</link>. </para> <note> <para> &pecl.moved-ver;5.0.0. </para> </note> </preface> <!-- }}} --> &reference.yaz.setup; &reference.yaz.constants; &reference.yaz.examples; &reference.yaz.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/constants.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/constants.xml +++ phpdoc-fr/reference/yaz/constants.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <appendix xml:id="yaz.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/examples.xml +++ phpdoc-fr/reference/yaz/examples.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="yaz.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <para> PHP/YAZ garde les traces des connexions avec les cibles (Z-Associations). Une ressource représente une connexion à une cible. </para> <para> Le script ci-dessous montre la fonctionnalité de recherche parallèle de l'API. Lorsqu'appelée sans argument, elle affiche une requête ; sinon, elle cherche la cible donnée dans le tableau <literal>host</literal>. </para> <para> <example> <title>Recherche parallèle en utilisant Yaz</title> <programlisting role="php"> <![CDATA[ <?php $host=$_REQUEST[host]; $query=$_REQUEST[query]; $num_hosts = count($host); if (empty($query) || count($host) == 0) { echo '<form method="get"> <input type="checkbox" name="host[]" value="bagel.indexdata.dk/gils" /> test GILS <input type="checkbox" name="host[]" value="localhost:9999/Default" /> test local <input type="checkbox" checked="checked" name="host[]" value="z3950.loc.gov:7090/voyager" /> Library of Congress <br /> Requête RPN: <input type="text" size="30" name="query" /> <input type="submit" name="action" value="Search" /> </form> '; } else { echo 'Votre recherche pour ' . htmlspecialchars($query) . '<br />'; for ($i = 0; $i < $num_hosts; $i++) { $id[] = yaz_connect($host[$i]); yaz_syntax($id[$i], "usmarc"); yaz_range($id[$i], 1, 10); yaz_search($id[$i], "rpn", $query); } yaz_wait(); for ($i = 0; $i < $num_hosts; $i++) { echo '<hr />' . $host[$i] . ':'; $error = yaz_error($id[$i]); if (!empty($error)) { echo "Erreur : $error"; } else { $hits = yaz_hits($id[$i]); echo "Nombre de résultat(s) : $hits"; } echo '<dl>'; for ($p = 1; $p <= 10; $p++) { $rec = yaz_record($id[$i], $p, "string"); if (empty($rec)) continue; echo "<dt><b>$p</b></dt><dd>"; echo nl2br($rec); echo "</dd>"; } echo '</dl>'; } } ?> ]]> </programlisting> </example> </para> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/yaz/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/yaz/setup.xml +++ phpdoc-fr/reference/yaz/setup.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <chapter xml:id="yaz.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="yaz.requirements"> &reftitle.required; &no.requirement; </section> <!-- }}} --> <!-- {{{ Installation --> &reference.yaz.configure; <!-- }}} --> <!-- {{{ Configuration --> &reference.yaz.ini; <!-- }}} --> <!-- {{{ Resources --> <section xml:id="yaz.resources"> &reftitle.resources; &no.resource; </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/book.xml +++ phpdoc-fr/reference/zip/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: compression --> <!-- Membership: bundled, pecl --> <book xml:id="book.zip" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Zip</title> <!-- {{{ preface --> <preface xml:id="intro.zip"> &reftitle.intro; <para> Cette extension active la possibilité de lire et d'écrire des archives compressées ZIP, ainsi que les fichiers s'y trouvant. </para> </preface> <!-- }}} --> &reference.zip.setup; &reference.zip.constants; &reference.zip.examples; &reference.zip.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/examples.xml +++ phpdoc-fr/reference/zip/examples.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zip.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <example> <title>Création d'une archive Zip</title> <programlisting role="php"> <![CDATA[ <?php $zip = new ZipArchive(); $filename = "./test112.zip"; if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { exit("Impossible d'ouvrir <$filename>\n"); } $zip->addFromString("testfilephp.txt" . time(), "#1 Ceci est une chaîne texte, ajoutée comme testfilephp.txt.\n"); $zip->addFromString("testfilephp2.txt" . time(), "#2 Ceci est une chaîne texte, ajoutée comme testfilephp2.txt.\n"); $zip->addFile($thisdir . "/too.php","/testfromfile.php"); echo "Nombre de fichiers : " . $zip->numFiles . "\n"; echo "statut :" . $zip->status . "\n"; $zip->close(); ?> ]]> </programlisting> </example> <example> <title>Affiche les détails de l'archive et liste son contenu</title> <programlisting role="php"> <![CDATA[ <?php $za = new ZipArchive(); $za->open('test_with_comment.zip'); print_r($za); var_dump($za); echo "Nombre de fichiers : " . $za->numFiles . "\n"; echo "statut : " . $za->status . "\n"; echo "statut du système : " . $za->statusSys . "\n"; echo "Nom du fichier : " . $za->filename . "\n"; echo "Commentaire : " . $za->comment . "\n"; for ($i=0; $i<$za->numFiles;$i++) { echo "index : $i\n"; print_r($za->statIndex($i)); } echo "Nombre de fichiers :" . $za->numFiles . "\n"; ?> ]]> </programlisting> </example> <example> <title>Flux ZIP ; lit les metainformations d'un fichier OpenOffice</title> <programlisting role="php"> <![CDATA[ <?php $reader = new XMLReader(); $reader->open('zip://' . dirname(__FILE__) . '/test.odt#meta.xml'); $odt_meta = array(); while ($reader->read()) { if ($reader->nodeType == XMLREADER::ELEMENT) { $elm = $reader->name; } else { if ($reader->nodeType == XMLREADER::END_ELEMENT && $reader->name == 'office:meta') { break; } if (!trim($reader->value)) { continue; } $odt_meta[$elm] = $reader->value; } } print_r($odt_meta); ?> ]]> </programlisting> </example> <para> Cet exemple utilise l'ancienne API (PHP 4) ; il ouvre une archive ZIP, lit chaque fichier del'archive et affiche son contenu. L'archive <filename>test2.zip</filename> utilisée dans cet exemple est une des archives de test, se trouvant dans les sources de ZZIPlib. </para> <example> <title>Exemple d'utilisation de Zip</title> <programlisting role="php"> <![CDATA[ <?php $zip = zip_open("/tmp/test2.zip"); if ($zip) { while ($zip_entry = zip_read($zip)) { echo "Nom : " . zip_entry_name($zip_entry) . "\n"; echo "Taille actuelle du fichier : " . zip_entry_filesize($zip_entry) . "\n"; echo "Taille compressée : " . zip_entry_compressedsize($zip_entry) . "\n"; echo "Méthode de compression : " . zip_entry_compressionmethod($zip_entry) . "\n"; if (zip_entry_open($zip, $zip_entry, "r")) { echo "Contenu du fichier :\n"; $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); echo "$buf\n"; zip_entry_close($zip_entry); } echo "\n"; } zip_close($zip); } ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zip/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zip/setup.xml +++ phpdoc-fr/reference/zip/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zip.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="zip.requirements"> &reftitle.required; <section xml:id="zip.requirements.old"> <title>PHP 4</title> <para> La version incluse dans PHP 4 nécessite la bibliothèque <link xlink:href="&url.zziplib;">ZZIPlib</link>, écrite par Guido Draheim, en version 0.10.6 ou supérieure. </para> </section> <section xml:id="zip.requirements.new"> <title>PHP 5.2.0 ou supérieure</title> <para> Cette extension utilise les fonctions <link xlink:href="&url.zlib;">zlib</link> écrite par Jean-loup Gailly et Mark Adler. </para> </section> </section> <!-- }}} --> <!-- {{{ Installation --> &reference.zip.configure; <!-- }}} --> <!-- {{{ Configuration --> <section xml:id="zip.configuration"> &reftitle.runtime; &no.config; </section> <!-- }}} --> <!-- {{{ Resources --> <section xml:id="zip.resources"> &reftitle.resources; <para> Il y a deux types de ressources utilisées par le module Zip. La première est le dossier Zip d'une archive Zip, et la seconde, l'entrée Zip de l'archives. </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/book.xml +++ phpdoc-fr/reference/zlib/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: compression --> <!-- Membership: bundled --> <book xml:id="book.zlib" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Compression Zlib</title> <titleabbrev>Zlib</titleabbrev> <!-- {{{ preface --> <preface xml:id="intro.zlib"> &reftitle.intro; <para> Ce module vous permet de lire et d'écrire des fichiers compressés gzip (.gz), via la plupart des fonctions du <link linkend="book.filesystem">système de fichiers</link> qui fonctionnent avec les fichiers compressés gzip (ainsi qu'avec les fichiers non-compressés, mais sans sockets). </para> <note> <para> La version 4.0.4 introduit un gestionnaire fopen pour les fichiers .gz ; ainsi, vous pouvez utiliser l'URL spécial <filename>zlib:</filename> pour accéder aux fichiers compressés en utilisant les fonctions normales f*() si vous préfixez le nom du fichier ou le nom du chemin par <filename>zlib:</filename> lorsque vous appelez la fonction <function>fopen</function>. Cette fonctionnalité nécessite une bibliothèque C qui fournit la fonction <literal>fopencookie()</literal>. À ce jour, il semble que seule la bibliothèque GNU libc fournit cette fonctionnalité. </para> <para> En PHP 4.3.0, <filename>zlib:</filename> a été modifié en <filename>compress.zlib://</filename> afin d'éviter de confondre avec les noms de fichiers contenant les caractères '<literal>:</literal>'. La fonction <literal>fopencookie()</literal> n'est plus requise. Pour plus d'informations, repportez-vous à la section <xref linkend="wrappers.compression" />. </para> </note> </preface> <!-- }}} --> &reference.zlib.setup; &reference.zlib.constants; &reference.zlib.examples; &reference.zlib.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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/examples.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/examples.xml +++ phpdoc-fr/reference/zlib/examples.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zlib.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <para> Cette exemple ouvre un fichier temporaire et y écrit une chaîne de test, puis, affiche le contenu de ce fichier, deux fois. </para> <example> <title>Exemple avec Zlib</title> <programlisting role="php"> <![CDATA[ <?php $filename = tempnam('/tmp', 'zlibtest') . '.gz'; echo "<html>\n<head></head>\n<body>\n<pre>\n"; $s = "Seulement un test, test, test, test, test, test, test, test!\n"; // ouvre un fichier en écriture, avec une compression maximale $zp = gzopen($filename, "w9"); // écrit une chaîne dans le fichier gzwrite($zp, $s); // ferme le fichier gzclose($zp); // ouvre un fichier en lecture $zp = gzopen($filename, "r"); // lit 3 caractères echo gzread($zp, 3); // lit tout le contenu et ferme le fichier gzpassthru($zp); gzclose($zp); echo "\n"; // ouvre un fichier et affiche le contenu (pour la deuxième fois). if (readgzfile($filename) != strlen($s)) { echo "Erreur avec les fonctions zlib !"; } unlink($filename); echo "</pre>\n</body>\n</html>\n"; ?> ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/zlib/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/zlib/setup.xml +++ phpdoc-fr/reference/zlib/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="zlib.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="zlib.requirements"> &reftitle.required; <para> Ce module utilise les fonctions <link xlink:href="&url.zlib;">zlib</link> crées par Jean-loup Gailly et Mark Adler. Vous devez utiliser la bibliothèque zlib version >= 1.0.9 avec ce module. </para> </section> <!-- }}} --> <!-- {{{ Installation --> &reference.zlib.configure; <!-- }}} --> <!-- {{{ Configuration --> &reference.zlib.ini; <!-- }}} --> <!-- {{{ Resources --> <section xml:id="zlib.resources"> &reftitle.resources; <para> Cette extension définit une ressource de fichier, retournée par la fonction <function>gzopen</function>. </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 -->