From bc40b40e494f3ee4311e20b1226f2b752ffead13 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 14 Dec 2007 02:21:44 +0000 Subject: [PATCH] MFB: Upgrade to the new-reference-structure - Split reference.xml into book.xml and setup.xml - Moved from reference.xml to book.xml: - The intro text (partintro), and link to constants and the new examples page - Moved from reference.xml to setup.xml: - The rest: requirements, installation, configuration, and resources - Changed the constants section to be an - Changed the intro ID from .intro to intro. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248208 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/yaz/book.xml | 69 ++++++++++++++++++ reference/yaz/constants.xml | 29 ++++++++ reference/yaz/examples.xml | 99 ++++++++++++++++++++++++++ reference/yaz/reference.xml | 135 ++---------------------------------- reference/yaz/setup.xml | 51 ++++++++++++++ 5 files changed, 253 insertions(+), 130 deletions(-) create mode 100644 reference/yaz/book.xml create mode 100644 reference/yaz/constants.xml create mode 100644 reference/yaz/examples.xml create mode 100644 reference/yaz/setup.xml diff --git a/reference/yaz/book.xml b/reference/yaz/book.xml new file mode 100644 index 0000000000..cdcfe98a4f --- /dev/null +++ b/reference/yaz/book.xml @@ -0,0 +1,69 @@ + + + + + + + YAZ + + + + &reftitle.intro; + + This extension offers a PHP interface to the + YAZ toolkit that implements the + Z39.50 + Protocol for Information Retrieval. + With this extension you can easily implement a Z39.50 origin (client) + that searches or scans Z39.50 targets (servers) in parallel. + + + The module hides most of the complexity of Z39.50 so it should be + fairly easy to use. It supports persistent stateless connections very + similar to those offered by the various RDB APIs that are available + for PHP. This means that sessions are stateless but shared among + users, thus saving the connect and initialize phase steps in most + cases. + + + YAZ is available at &url.yaz;. You can find news information, + example scripts, etc. for this extension at &url.yaz-phpyaz;. + + + + &pecl.moved-ver;5.0.0. + + + + + + &reference.yaz.setup; + &reference.yaz.constants; + &reference.yaz.examples; + &reference.yaz.reference; + + + + + diff --git a/reference/yaz/constants.xml b/reference/yaz/constants.xml new file mode 100644 index 0000000000..8d2a71eff2 --- /dev/null +++ b/reference/yaz/constants.xml @@ -0,0 +1,29 @@ + + + + + &reftitle.constants; + &no.constants; + + + + diff --git a/reference/yaz/examples.xml b/reference/yaz/examples.xml new file mode 100644 index 0000000000..fc9427d64e --- /dev/null +++ b/reference/yaz/examples.xml @@ -0,0 +1,99 @@ + + + + + &reftitle.examples; + + PHP/YAZ keeps track of connections with targets + (Z-Associations). A resource represents a connection to a + target. + + + The script below demonstrates the parallel searching feature of + the API. When invoked with no arguments it prints a query form; else + (arguments are supplied) it searches the targets as given in array + host. + + + + Parallel searching using Yaz + + + + GILS test + + local test + + Library of Congress +
+ RPN Query: + + + + '; +} else { + echo 'You searched for ' . htmlspecialchars($query) . '
'; + 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 '
' . $host[$i] . ':'; + $error = yaz_error($id[$i]); + if (!empty($error)) { + echo "Error: $error"; + } else { + $hits = yaz_hits($id[$i]); + echo "Result Count $hits"; + } + echo '
'; + for ($p = 1; $p <= 10; $p++) { + $rec = yaz_record($id[$i], $p, "string"); + if (empty($rec)) continue; + echo "
$p
"; + echo nl2br($rec); + echo "
"; + } + echo '
'; + } +} +?> +]]> +
+
+
+
+ + + diff --git a/reference/yaz/reference.xml b/reference/yaz/reference.xml index ef10513a5e..089f8880b6 100644 --- a/reference/yaz/reference.xml +++ b/reference/yaz/reference.xml @@ -1,137 +1,12 @@ - - - + + + YAZ &Functions; - - YAZ Functions - YAZ + &reference.yaz.entities.functions; - -
- &reftitle.intro; - - This extension offers a PHP interface to the - YAZ toolkit that implements the - Z39.50 - Protocol for Information Retrieval. - With this extension you can easily implement a Z39.50 origin (client) - that searches or scans Z39.50 targets (servers) in parallel. - - - The module hides most of the complexity of Z39.50 so it should be - fairly easy to use. It supports persistent stateless connections very - similar to those offered by the various RDB APIs that are available - for PHP. This means that sessions are stateless but shared among - users, thus saving the connect and initialize phase steps in most - cases. - - - YAZ is available at &url.yaz;. You can find news information, - example scripts, etc. for this extension at &url.yaz-phpyaz;. - - - - &pecl.moved-ver;5.0.0. - - -
- - &reference.yaz.configure; - - &reference.yaz.ini; +
-
- &reftitle.resources; - &no.resource; -
- -
- &reftitle.constants; - &no.constants; -
- -
- &reftitle.examples; - - PHP/YAZ keeps track of connections with targets - (Z-Associations). A resource represents a connection to a - target. - - - The script below demonstrates the parallel searching feature of - the API. When invoked with no arguments it prints a query form; else - (arguments are supplied) it searches the targets as given in array - host. - - - - Parallel searching using Yaz - - - - GILS test - - local test - - Library of Congress -
- RPN Query: - - - - '; -} else { - echo 'You searched for ' . htmlspecialchars($query) . '
'; - 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 '
' . $host[$i] . ':'; - $error = yaz_error($id[$i]); - if (!empty($error)) { - echo "Error: $error"; - } else { - $hits = yaz_hits($id[$i]); - echo "Result Count $hits"; - } - echo '
'; - for ($p = 1; $p <= 10; $p++) { - $rec = yaz_record($id[$i], $p, "string"); - if (empty($rec)) continue; - echo "
$p
"; - echo nl2br($rec); - echo "
"; - } - echo '
'; - } -} -?> -]]> -
-
-
-
- - -&reference.yaz.entities.functions; - -
+ + + &reftitle.setup; + + +
+ &reftitle.required; + &no.requirement; +
+ + + + &reference.yaz.configure; + + + + &reference.yaz.ini; + + + +
+ &reftitle.resources; + &no.resource; +
+ + +
+ + +